Assume tht a MM with only 4 pages ,each of 16 bytes,is initially empty.the cpu generates the following sequence of virtual addresses & uses the lru replacement policy.
0 ,4,8,20,24,36,44,12,68,72,80,28,32,88,92
How many page faults?Wht r the page no of the pages pages present in the MM at the end of the sequence.
plz anybody solve this.
solution:- 7 page faults with 1,2,4,5 at the end.......
each page size is 16 bytes..so, these virtual addresses are divided by 16 and so we get as 0 0 0 1 1 2 2 0 4 4 5 5 1 2 5 5 ............. with lru replacement statergy, we will get as 7 page faults.... with 2,5,1,4 at the end.......
Wednesday, December 16, 2009
Go Back N Protocol
Monday, December 14, 2009
Question Number 18 Gate 2009
Tuesday, December 8, 2009
question in orkut community.....!!!!!
Assume tht a MM with only 4 pages ,each of 16 bytes,is initially empty.the cpu generates the following sequence of virtual addresses & uses the lru replacement policy.
0 ,4,8,20,24,36,44,12,68,72,80,28,32,88,92
How many page faults?Wht r the page no of the pages pages present in the MM at the end of the sequence.
solution:
Consider this figure....
Till the first 4 page requests come total page faults are 4....

Now consider that main memory is full with 4 pages...now any new page request makes the replacement policy...so we have to go for replacement algorithms...since here we use lru..the least used page would be replaced....since page 20 is been used very recently...than page 8 than page 4 than page 0...therefore page 0 is replaced with page 24 which is 5th page fault....hence till now the observation is
initial 5 unique numbers so number of page faults are 5 and last 4 pages are placed in the memory...
consider this figure...just showed page fault of page 24 then page 36 and then showed final page memory contents

so totally
page faults: 15
final contents of the memory 28 32 88 92
0 ,4,8,20,24,36,44,12,68,72,80,28,32,88,92
How many page faults?Wht r the page no of the pages pages present in the MM at the end of the sequence.
solution:
Consider this figure....
Till the first 4 page requests come total page faults are 4....
Now consider that main memory is full with 4 pages...now any new page request makes the replacement policy...so we have to go for replacement algorithms...since here we use lru..the least used page would be replaced....since page 20 is been used very recently...than page 8 than page 4 than page 0...therefore page 0 is replaced with page 24 which is 5th page fault....hence till now the observation is
initial 5 unique numbers so number of page faults are 5 and last 4 pages are placed in the memory...
consider this figure...just showed page fault of page 24 then page 36 and then showed final page memory contents
so totally
page faults: 15
final contents of the memory 28 32 88 92
Subscribe to:
Posts (Atom)