FreeJobAlert.Com

Government Jobs | Results | Admit Cards

operating system interview questions | Part9

If you would like to view All operating system interview questions only at one place visit below link

All operating system Interview Questions

81. What is Memory-Management Unit (MMU)?
Ans :Hardware device that maps virtual to physical address.
In MMU scheme, the value in the relocation register is added to every address generated by a user process at the time it is sent to memory.
->The user program deals with logical addresses; it never sees the real physical addresses

82. What are Dynamic Loading, Dynamic Linking and Overlays?
Ans :
Dynamic Loading:
->Routine is not loaded until it is called
->Better memory-space utilization; unused routine is never loaded.
->Useful when large amounts of code are needed to handle infrequently occurring cases.
->No special support from the operating system is required implemented through program design.
Dynamic Linking:
->Linking postponed until execution time.
->Small piece of code, stub, used to locate the appropriate memory-resident library routine.
->Stub replaces itself with the address of the routine, and executes the routine.
->Operating system needed to check if routine is in processes’ memory address.
->Dynamic linking is particularly useful for libraries.
Overlays:
->Keep in memory only those instructions and data that are needed at any given time.
->Needed when process is larger than amount of memory allocated to it.
->Implemented by user, no special support needed from operating system, programming design of overlay structure is complex.

83. What is fragmentation? Different types of fragmentation?
Ans : Fragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.
External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced.Total memory space exists to satisfy a request, but it is not contiguous
Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks.Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used Reduce external fragmentation by compaction
->Shuffle memory contents to place all free memory together in one large block.
->Compaction is possible only if relocation is dynamic, and is done at execution time.

84. Define Demand Paging, Page fault interrupt, and Trashing?
Ans :
Demand Paging: Demand paging is the paging policy that a page is not read into memory until it is requested, that is, until there is a page fault on the page.
Page fault interrupt: A page fault interrupt occurs when a memory reference is made to a page that is not in memory.The present bit in the page table entry will be found to be off by the virtual memory hardware and it will signal an interrupt.
Trashing: The problem of many page faults occurring in a short time, called “page thrashing,”

85. Explain Segmentation with paging?
Ans : Segments can be of different lengths, so it is harder to find a place for a segment in memory than a page. With segmented virtual memory, we get the benefits of virtual memory but we still have to do dynamic storage allocation of physical memory. In order to avoid this, it is possible to combine segmentation and paging into a two-level virtual memory system. Each segment descriptor points to page table for that segment.This give some of the advantages of paging (easy placement) with some of the advantages of segments (logical division of the program).

86. Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs?
Ans : A page fault occurs when an access to a page that has not been brought into main memory takes place. The operating system verifies the memory access, aborting the program if it is invalid. If it is valid, a free frame is located and I/O is requested to read the needed page into the free frame. Upon completion of I/O, the process table and page table are updated and the instruction is restarted

87. What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?
Ans : Thrashing is caused by under allocation of the minimum number of pages required by a process, forcing it to continuously page fault. The system can detect thrashing by evaluating the level of CPU utilization as compared to the level of multiprogramming. It can be eliminated by reducing the level of multiprogramming.

Tags: interview questions and answers, interview questions for operating system, Operating System, operating system interview, operating system interview questions, operating system interview questions 2009, operating system interview questions and answers for freshers, operating system interview questions and answers pdf, operating system interview questions answers, operating system questions, operating system tutorial

Responses to “operating system interview questions | Part9”

  1. Thank you so much.

Leave a Comment