Previous Next

Interview Questions on OS - Memory Management

1. What is swapping

A process must be in memory to be executed. A process, however, can be swapped temporarily out of memory to a backing store and then brought back into memory for continued execution. This process is called swapping.

2. What is fragmentation?

fragmentation is a phenomenon in which storage space is used inefficiently, reducing capacity or performance.

3. Explain External fragmentation?

As processes are loaded and removed from memory, the free memory space is broken into little pieces. External fragmentation exists when there is enough total memory space to satisfy a request, but the available spaces are not contiguous.

4. Explain Internal fragmentation?

Consider a multiple-partition allocation scheme with a hole of 18,464 bytes. Suppose that the next process requests 18,462 bytes. If we allocate exactly the requested block, we are left with a hole of 2 bytes. The overhead to keep track of this hole will be substantially larger than the hole itself. The general approach to avoiding this problem is to break the physical memory into fixed-sized blocks and allocate memory in units based on block size. With this approach, the memory allocated to a process may be slightly larger than the requested memory. The difference between these two numbers is internal fragmentation.

5. What is paging?

Paging is a memory-management scheme that permits the physical address space of a process to be noncontiguous. Paging avoids the considerable problem of fitting memory chunks of varying sizes onto the backing store.

6. What is frame?

Breaking main memory into fixed number of blocks called frames.

7. What is page?

Breaking logical memory into blocks of same size is page.

Previous Next