Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This diagram shows an example of memory configuration under dynamic partitioning

ID: 3793784 • Letter: T

Question

This diagram shows an example of memory configuration under dynamic partitioning, after a number of placement and swapping-out operations have been carried out. Addresses go from left to right: gray areas indicate blocks occupied by processes: white areas indicate free memory blocks. The last process placed is 2-Mbyte and is marked with an X. Only one process was swapped out after that. a. What was the maximum size of the swapped-out process? b. What was the size of the free block just before it was partitioned by X? c. A new 3-Mbyte allocation request must be satisfied next. Indicate the intervals of memory where a partition will be created for the new process under the following four placement algorithms: best-fit. first-fit. next-fit, and worst-fit. For each algorithm, draw a horizontal segment under the memory strip and label it clearly.

Explanation / Answer

As given in statement that last process placed is 2Mbyte.

Basically by the first fit scenario it is placed in the first larger block of memory i.e 8Mbytes in which first 1 Mbyte is swapped out after last process placed which is allocated in 8 Mbyte block.

b.The size of free block just before it partitioned by X was 7Mbytes.

c.

For best-fit :

3 Mbyte size process is allocated in last 3 Mbyte free block.

For first fit :

3 Mbyte size process is allocated in first 4Mbyte free block.

For next-fit :

3 Mbyte size process is allocated in first 5Mbyte free block.

For worst-fit :

3 Mbyte size process is allocated in 8Mbyte free block.