This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ow we would coalesce each of the four cases.
m1 m1 n n m2 m2 a a a a a a m1 m1 n n m2 m2 a a f f a a CHAPTER 10. VIRTUAL MEMORY m1 m1 n n m2 m2 a a a a f f m1 m1 n+m2 a a f n+m2 f Case 1.
m1 m1 n n m2 m2 f f a a a a n+m1 m2 m2 f a a n+m1 f m1 m1 n n m2 m2 f f a a f f Case 2.
n+m1+m2 f n+m1+m2 f Case 3. Case 4. Figure 10.42: Coalescing with boundary tags. Case 1: prev and next allocated. Case 2: prev allocated, next free. Case 3: prev free, next allocated. Case 4: next and prev free. In Case 1, both adjacent blocks are allocated and thus no coalescing is possible. So the status of the current block is simply changed from allocated to free. In Case 2, the current block is merged with the next block. The header of the current block and the footer of the next block are updated with the combined sizes of the current and next blocks. In Case 3, the previous block is merged with the current block. The header of the previous block and the footer of the current block are updated with the combined sizes of the two blocks. In Case 4, all th...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American