0
831views
Write a program to calculate page fault by using LRU (least recently used) for the following reference string: 1, 3, 2, 3, 4, 2, 1, 3, 4, 2, 1, 4, 5, 1, 3.

Write a program to calculate page fault by using LRU (least recently used) for the following reference string: 1, 3, 2, 3, 4, 2, 1, 3, 4, 2, 1, 4, 5, 1, 3.

1 Answer
0
21views

Write a program to calculate page fault by using LRU String:- 1 3 2 3 4 2 1 3 4 2 1 4 5 1 3

print("Enter the number of frames: ",end="")
capacity = int(input())
f,st,fault,pf = [],[],0,'No'
print("Enter the reference string: ",end="")
s = list(map(int,input().strip().split()))
print("\nString|Frame →\t",end='')
for i …

Create a free account to keep reading this post.

and 2 others joined a min ago.

Please log in to add an answer.