4,053 views
2 votes
2 votes

If the total number of available frames is 50, and there are 2 processes one of 10 pages and the other of 5 pages then how much of memory would be proportionally allocated to each of these processes?

a. Depends on the process requirements

b. 33 and 16 frames respectively

c. Memory is allocated equally for both

d. 5 and 10 respectively

Source: http://nptel.ac.in/courses/106108101/pdf/Worked_Out_Problems/Mod_4.pdf

1 Answer

Best answer
2 votes
2 votes

In allocating free frames to the processes having different sizes which is measured in terms of number of pages as :

Logical address space of a process = No of pages * Page size

So more the number of pages of a process , the more priority it needs to be given..So for this we have proportional allocation technique which gives free frames according to the fraction of the total number of pages which is allocated to all the processes.

So here fraction of page occupied by process 1 = 10 / (10 + 5)  =  2 / 3

Total number of frames = 50

So frame allocated to process 1 = 2 / 3 * 50

                                               =  100 / 3  

                                               = 33

Similarly frames allocated to process 2 =  1/3 * 50

                                                          = 16 (approx)

So B) is the correct option.

selected by

Related questions

1 votes
1 votes
1 answer
1