5k free block the general approach is to allocate

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: cent to a free block or blocks, it is merged with the free block or blocks to create a larger free block. In this manner, the number, size, and location of the partitions vary dynamically as processes come and go. Memory Fragmentation External Fragmentation Notice from Figure 14.13 that as processes come and go in a system that uses the scheme of variable number of memory partitions, the free memory blocks get broken into smaller pieces scattered throughout the memory. External fragmentation is a situation when enough total free memory space exists to satisfy the memory need of a process, but still the process cannot be loaded because the available free memory is not contiguous (is fragmented into multiple free blocks of memory). For example, in case of Figure 14.13(h), if the sizes of free blocks Free 1, Free 2 and Free 3 are 400K, 100K and 100K respectively, then the total available free memory is 600K. Now if a new process arrives whose memory requirement is 500K, it cannot be loaded because 500K of contiguous free memory space is not available. Thus this is an example of external fragmentation. The amount of unusable memory area due to external fragmentation depends on the total size of main memory and the average memory requirement of the processes. However, statistical analysis indicates that as much as one-third of memory may be unusable due to external fragmentation. Internal Fragmentation Internal fragmentation is a situation when a process is allocated more memory than its actual memory requirement and the additional memory allocated to the process remains unutilized because it is neither used by the process to which it is allocated nor it can be allocated to any other process for use. Internal fragmentation may occur in the following situations: 1. When the system uses fixed number of fixed-sized memory partitions, any space in a partition that is in excess of the actual memory requirement of the process loaded into it is an internally fragmented memory space. Figure 14.14 illustrates this situation with an example. Note that, on an average,...
View Full Document

This document was uploaded on 04/07/2014.

Ask a homework question - tutors are online