Implementing Non-contiguous Memory Management Techniques

Memory Management Techniques are basic techniques that are used in managing the memory in operating system. Memory Management Techniques are basically classified into two categories:

(i) Contiguous
(ii) Non-contiguous 

We have already discussed the implementation of contiguous in the article Implementation of Contiguous Memory Management Techniques. Here we will discuss the implementation of non-contiguous memory management techniques.

Non-contiguous Memory Management Techniques:
In this technique, memory is allotted in a non-continuous way to the processes. It has five types:

Paging:
Paging is a non-contiguous memory management technique that permits the physical address space of a process to be non–contiguous. Whenever the process is created paging will be applied on the process and page table will be created. Paging is related with respect to every process and every process will have its own page table.



There is no external fragmentation in the paging. The internal fragmentation exists in the last page and internal fragmentation in paging is considered as P/2 where P is the page size.

Multilevel Paging:
Multilevel Paging is a non-contiguous memory management technique which contains two or more levels of page tables in a hierarchical manner.
In the multilevel paging when the paging is applied on the page tables, the last page is called the first level page table. In multilevel paging, when the paging is applied on the page tables then all the page table will be stored in main memory.

Inverted Paging:
To avoid the overhead of maintaining page table process, the concept of Inverted Paging is implemented. In the inverted paging only one page table will be maintained for all the processes. The memory required to maintain the page tables of the processes will be less but searching time for corresponding page of a process will be more.

Segmentation:
Segmentation is a non-contiguous memory management technique in which the memory is divided into segments. Each process is allotted a segment. There are two types of segmentation:

(i) Simple
(ii) Virtual 

Segmented Paging:
To avoid the overhead of bringing large size segment into memory the concept of segmented paging is implemented. IN the segmented paging, paging will be applied on the segment and instead of bringing the entire segment into memory, the pages of segment will be brought into memory. The number of entries in the page table of segment is same as the number of pages on the segment.

Page size of segment is same as frame size of physical address space.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.


Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :