edited by
1,234 views
1 votes
1 votes
Consider a computer system having 20 physical page frames numbered from 1 to 20 which are initially empty. Now, a program accesses the pages numbered 1, 2 ..........100 twice. The number of page fault generated by optimal page replacement policy is __________.
edited by

1 Answer

Best answer
1 votes
1 votes
Initially 1 to 20 will be present (20 page fault)

now 20 will be replaced till end of first scan so at end of first scan we will have

1,2,3...19,100. (80 miss)

now 1 to 19 will be hit and for 20 we will replace 1 and so one

note that 100 will not be replaced as we are using optimal

so from 20 till 99 page fault and for 100 page hit

Total fault : 100+80=180

Total Hit: 20  (for 1,2,..19,100)
selected by

Related questions


Deprecated: Implicit conversion from float-string "1534269568.485" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1534269568.485" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1534269568.485" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1534269568.485" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1547532407.746" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1547532407.746" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1547532407.746" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1547532407.746" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
2.5k
views
1 answers
2 votes
jhaanuj2108 asked Aug 14, 2018
2,478 views
Consider a demand paged memory system, page table is held in registers. It takes 800 nsec to service a page fault if empty page is available or replaced page is not modif...
535
views
0 answers
0 votes
Jyoti Kumari97 asked Jan 15, 2019
535 views
Assume there are 5 frames and consider the following reference string find the number of page faults using NRU page replacement algorithm.3,2,3, 0,8,4,2,5,0,9,8,3,2
544
views
0 answers
1 votes
Samujjal Das asked Jan 24, 2017
544 views
Consider the two-dimensional array A$:$int A[ ] [ ] = new int[100][100]; where A[0][0] is at location 200 in a paged memory system with pages of size 200. A small process...
Total PHP MySQL Other RAM
Time (ms) % Time (ms) % File count Time (ms) % Query count Time (ms) % Amount %
Setup 3.6 2% 2.2 1% 72 1.5 1% 2 0.0 0% 569k 45%
Control 12.3 9% 1.4 1% 5 11.2 8% 12 0.0 0% 246k 19%
View 1.8 1% 1.8 1% 12 0.0 0% 0 0.0 0% 127k 10%
Theme 106.6 82% 4.2 3% 15 102.5 79% 3 0.0 0% 296k 23%
Stats 4.9 3% 0.1 0% 0 4.9 3% 1 0.0 0% 0k 0%
Total 129.2 100% 9.6 7% 104 120.1 92% 18 0.0 0% 1240k 100%