Please show all steps and logic to solve the problems This d

Please show all steps and logic to solve the problems.

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. What was the maximum size of the swapped-out process? What was the size of the free block just before it was partitioned by X? 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.

Solution

a.

The maximum size of the swapped-out process = 4M(first free memory block from left)

b.

The size of the free block just before it was partitoined by X = 1M+size of(X)+5M = (1+2+5)M = 8M

c. 3-Mbyte allocation

Allocation Algorithms

best-fit ----allocate to same size block = 3M

first-fit(allocate to first available free block)= 4M

next-fit (allocate to next free block,here next to X) = 5M

worst-fit(allocate to biggest block available) = 8M

4M 1M X 5M 8M 2M 4M 3M
Please show all steps and logic to solve the problems. This diagram shows an example of memory configuration under dynamic partitioning, after a number of place

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site