4,183 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

807
views
1 answers
1 votes
377
views
0 answers
0 votes
admin asked Oct 26, 2019
377 views
Write a program that can be used to compare the effectiveness of adding a tag field to $TLB$ entries when control is toggled between two programs. The tag ... nontrivial) input example.Plot the number of $TLB$ updates per $1000$ references.
401
views
0 answers
0 votes
admin asked Oct 26, 2019
401 views
Write a program that simulates a toy paging system that uses the $\text{WSClock}$ algorithm. The system is a toy in that we will assume there are ... needed to extend the program to handle a page reference stream that also includes writes.