Friday, July 29, 2011

Paging

Hello friends in this post we are going to discuss on paging and how an operating system used it for memory management.

Paging is another memory management technique which widely uses virtual memory concept. When paging is used, the processor divides the linear address space into fixed-size pages (of 4KBytes, 2 MBytes, or 4 MBytes in length) that can be mapped into physical memory and/or disk storage. When a program (or task) references a logical address in memory, the processor translates the address into a linear address and then uses its paging mechanism to translate the linear address into a corresponding physical address.

Some physical memory is reserved for the operating system itself, and for its data structures. This is called wired memory, because it is not subject to paging. The rest of physical memory is managed via the paging mechanism, and is called the page pool. Whenever a virtual memory page that is not in physical memory is referenced, a page is allocated from the page pool’s free list and mapped to the required virtual memory address. Pages are returned to the free list when the memory has been unmapped or freed. Pages can be reclaimed from the free list if they are referenced again before the physical memory page has been reused.
OS performs an operation for storing and retrieving data from secondary storage devices for use in main memory. Paging is one of such memory management scheme. Data is retrieved from storage media by OS, in the same sized blocks called as pages. Paging allows the physical address space of the process to be non contiguous. The whole program had to fit into storage contiguously.

Paging is also used to deal with external fragmentation problem. This is to allow the logical address space of a process to be noncontiguous, which makes the process to be allocated physical memory.

You can also visit my other blogs:
Networking Concepts
Technomedia
Enter into world of Technology
Hina Rabbani Khar




0 comments: