Consider a memory of size 8KB (8192 bytes) that allows dynamic , variable sized
ID: 3587458 • 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 WORST 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.
Note: 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 P1 is allocated, what is the BA? What is the updated free list? BA: ; Sz: BA: ; Sz: BA: ; Sz: BA: ; Sz
Question 2: If P6 is allocated, what is the BA? What is the updated free list? BA: ; Sz: BA: ; Sz: BA: ; Sz: BA: ; Sz
Question 3: If P4 is allocated, what is the BA? What is the updated free list? BA: ; Sz: BA: ; Sz: BA: ; Sz: BA: ; Sz
Please please please help me get these right
Explanation / Answer
6399
BA:6000
3799
BA:2700
2699 P6
BA:2500
2499 P1
BA:2000
1799
BA:1200
1099
BA:0
Worst Fit Policy
Question 1: P1 is allocated of size 500 . Highest free memory is 2000 to 3800 . So allocated 500 .and updated free list is:
BA: 0; Sz: 1100 BA: 1200; Sz: 600 BA: 2500; Sz: 1300 BA: 6000; Sz 400
Question 2: P6 is allocated of size 200 . Highest free memory is 2500 to 3800 . So allocated 200 .and updated free list is:
BA: 0; Sz: 1100 BA: 1200; Sz: 600 BA: 2700; Sz: 1100 BA: 6000; Sz 400
Question 3: P4 is allocated of size 2000 . Highest free memory is 2700 to 3800 and 0 to 1100 each of size 1100 which are not enough for P4 as it need 2000. So cannot be accomodated.
6399
BA:6000
3799
BA:2700
2699 P6
BA:2500
2499 P1
BA:2000
1799
BA:1200
1099
BA:0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.