To ensure correct memory addressing in case of paging

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 50% of the memory may remain unused in such systems due to internal fragmentation. 2. When the system uses variable number of variable-sized memory partitions, it may happen that there is a free block of size 200K and a new process arrives whose memory requirement is 199.5K. If we allocate exactly the requested size of memory, we will be left with a free block of size 0.5K. Considering the overhead involved in keeping track of this 0.5K free block, the general approach is to allocate such small memory areas as part of the process's memory request. Thus, the allocated memory may be slightly larger than the requested memory, and the additional memory that gets allocated to a process in this way is an internally fragmented memory space. Paging We saw in the discussion above that memory compaction is a mechanism used to solve the problem of external fragmentation. We also saw that memory compaction is an expensive operation requiring lot of CPU time because it involves copying memory contents from one memory location to another to make scattered free space contiguous. Paging is another mechanism used to solve the problem of external fragmentation. It is considered to be better than the memory compaction mechanism because it solves the problem of external fragmentation without the need to make scattered free space contiguous. Rather it allows a process's memory to be noncontiguous, thus allowing a process to be allocated physical memory wherever free memory blocks are available. Because of its advantage over memory compaction mechanism, paging mechanism (in its various forms) is used in many modern operating systems. How this mechanism works is explained below. In this mechanism, the physical memory of a computer system is partitioned into fixed-sized blocks called page frames. The total memory requirement of a process (including its instructions and data) is also partitioned into blocks of the same size called pages. Page sizes are typically of the order of 1 Kilobytes to 8 Kilobyte...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online