Saturday, January 8, 2011

Case 4: Dynamic and Relocatable Partition

There is a total memory size of 220 k. 15 k is allocated for the operating system.

Dynamic Partition

( a) Jobs 1 to 6 were loaded to the memory occupying 189 k. There is still 16 k of memory remaining. Job 7 cannot be loaded to the remaining memory because its size exceeds the size of the remaining memory.

( b) Jobs 2, 4, and 6 terminate, thus, releasing their memory. Job 7 still cannot be loaded because the released memory blocks are still not enough to hold it.

( c) Jobs 3 and 5 terminate and release their memory. This time, Job 7 found a released memory block that is enough to hold it. There are released memory blocks but not one of them is enough to hold Job 8.

( d) Jobs 1 and 7 terminate and release their memory. The memory block released by Job 1 is enough to hold Job 8. Job 9 has a size of 88 k. no free memory block is large enough to hold Job 9. Job 10 can neither be loaded because Job 9 should be the first one to be loaded.





Relocatable Dynamic Partition

( b) compaction is applied. Compaction means placing all free memory blocks together to form one large block. Jobs 3 and 5 were moved upward. The free memory blocks of sizes 10 k, 15 k, 6 k, and 16 k were compacted forming a memory block of size 47 k. now, Job 7 is loaded to the compacted memory block. There is a remaining memory of size 22 k. 22 k is not enough to hold Job 8.

( c) Jobs 3, 5, and 7 terminate and release their memory. Job 8 is loaded. There is a remaining memory of 50 k.

( d) Job 1 terminates and releases its memory. Job 8 is moved upward. The free memory block size is now 150 k. Job 9 is loaded. There is now a remaining memory of 62 k.

( e) Job 8 terminates, releasing 55 k of memory. The free memory has a size of 117 k. Job 10 is now loaded. There is a remaining memory of 17 k.