Dale - Computer Science Illuminated 357

Dale - Computer Science Illuminated 357 - Which partition...

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

View Full Document Right Arrow Icon
Base register A register that holds the beginning address of the current partition Bounds register A register that holds the length of the current partition 330 Chapter 10 Operating Systems Figure 10.6 Address resolution in parti- tion memory management Operating system Process 1 Process 3 Empty Empty Process 2 A A + L length A Base register Bounds register Check: L < length? Yes beginning of that program’s partition into the base register . Similarly, the length of the partition is stored in the bounds register . When a logical address is referenced, it is first compared to the value in the bounds register to make sure the reference is in that program’s allocated memory space. If it is, the value of the logical address is added to the value in the base register to produce the physical address.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Which partition should we allocate to a new program? There are three general approaches to partition selection: ± First fit , in which the program is allocated to the first partition big enough to hold it ± Best fit , in which the program is allocated to the smallest partition big enough to hold it ± Worst fit , in which the program is allocated to the largest partition big enough to hold it Worst fit doesn’t make sense to use in fixed partitions because it would waste the larger partitions. First fit or best fit work for fixed partitions. But in dynamic partitions, worst fit often works best because it leaves the largest possible empty partition, which may accommodate another program later on....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online