1,278 views
2 votes
2 votes
The number of page faults with a given string "S " using LRU algorithm is "N" and considering the reverse of string S^R the number of page faults will be

A)N.                    B)N/2

C)2N.                  D)3.75N

1 Answer

Best answer
0 votes
0 votes

Option A is right, yes it will be same.

by checking examples you can get this...

but we should have to understand why this is so?

 

if the string is  __ __ __ __ Y __ __ Y __ __ 

for the first time Y will be Page Fault, but  assume Y is hit. ( due to come within the range of no.of frames. )

 

Reverse of String is  __ __ Y __ __ Y __ __ __ __

for the first time Y will be Page Fault, but Y should be hit ( due to distance between them is not changed. )

 

Therefore hit's are preserved ===> No.of Faults Same

 

selected by

Related questions

512
views
1 answers
1 votes
Avik Chowdhury asked Jul 10, 2018
512 views
Assume that a memory with only 4 pages,each of 16 bytes,is initially empty.The CPU generates the following sequence of virtual addresses and uses the LRU page replacement policy.0,4,8,20,24,36,44 ... 1,2,4,5 . D)9 and 1,2,3,5
708
views
0 answers
0 votes
pream sagar asked Jan 23, 2019
708 views
Consider the system which has virtual address of 36 bits and physical address of 30 bits and page size of 8KB, page table entry contain 1 valid bit, 2 ... and 1 reference bit. Then the approximate pagetable size in (MB) is ________.
695
views
1 answers
0 votes
aambazinga asked Jan 8, 2019
695 views
TRUE/FALSE:statement 1: secondary index may or may not be dense.statement 2: disk is considered as the maximum size of virtual memory.
618
views
1 answers
0 votes
Vivekk asked Oct 30, 2018
618 views
Please explain the solution to this question