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

Consider a memory of size 8KB (8192 bytes) that allows dynamic , variable sized

ID: 3796363 • Letter: C

Question

Consider a memory of size 8KB (8192 bytes) that allows dynamic, variable sized partitioning among processes and uses a linked list to keep track of free spaces (hereafter referred to as the free list) in the memory at any given time. Assume that there are 6 processes and assume that their memory size requirements (in bytes) are as given below:

P1: 500, P2: 600, P3: 1300, P4: 2000, P5: 100, P6: 200

Assume that the initial state of the free list is as shown below (BA is the base address and Sz is the size of each free space):

BA: 0; Sz: 1100 BA: 1200; Sz: 600 BA: 2000; Sz: 1800 BA: 6000; Sz 400

For these next questions assume the free list is in its initial state. Assume that the next fit policy is used for partition placement. Identify the base address of the region to which each of the following processes will be allocated, assuming that they are allocated in the order specified and show the updated free list state after each allocation.

If a partition cannot be allocated due to the state of the free list, simply type in the words cannot be accommodated as your answer.

Question 1: If P6 is allocated, what is the BA(base address)? __________

Question 2: The updated free list is:

BA: ________ ; Sz: _________ BA: _________ ; Sz: _________ BA: _________ ; Sz: _________ BA: ________; Sz _________

Explanation / Answer

As per the next fit policy, once the free region is found with size equal or more than the memory requirement of a process, the base address of that region is allocated to the process. Increment the base address of the free region by adding the memory size allocated and reduce the size of the region by the allocated size.

The pointer to start searching free space is where it left last time.

If the allocated size for a process equals the size of the region then remove the base address and the size entry for it from the free list as it has been completely allocated to a process.

Question 1: If P6 is allocated, what is the BA(base address)? 1300

Question 2: The updated free list is:

BA: 1500; Sz: 300 BA: 3300; Sz: 500 BA: 6000; Sz 400

Dynamic, variable sized partitioning (next fit) starting point for next allocation Initial State -> BA: 0; Sz: 1100 BA: 1200; Sz: 600 BA: 2000; Sz: 1800 BA: 6000; Sz 400 0 Process Base Address Updated Free List Where it stops from last allocation, it starts searching for the free space for the next process P1: 500 0 BA: 500; Sz: 600 BA: 1200; Sz: 600 BA: 2000; Sz: 1800 BA: 6000; Sz 400 500 P2: 600 500 BA: 1200; Sz: 600 BA: 2000; Sz: 1800 BA: 6000; Sz 400 1200 P3:1300 2000 BA: 1200; Sz: 600 BA: 3300; Sz: 500 BA: 6000; Sz 400 3300 P4:2000 cannot be accommodated 1200 checks at 3300, then at 6000 and finally at 1200 P5: 100 1200 BA: 1300; Sz: 500 BA: 3300; Sz: 500 BA: 6000; Sz 400 1300 P6: 200 1300 BA: 1500; Sz: 300 BA: 3300; Sz: 500 BA: 6000; Sz 400 1500
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote