Question
Download Solution PDFConsider a virtual page reference string 1, 2, 3, 2, 4, 2, 5, 2, 3, 4. Suppose LRU page replacement algorithm is implemented with 3 page frames in main memory. Then the number of page faults are ______
Answer (Detailed Solution Below)
Detailed Solution
Download Solution PDFConcept:
LRU (Least recently used) page replacement algorithm is based on the assumption that the page that has been used in the last few instructions will be referenced in the next few instructions. It replaces the page that has not been referenced for the longest time.
Explanation:
Reference string: 1, 2, 3, 2, 4, 2, 5, 2, 3, 4
Number of frames = 3
|
1 |
2 |
2 |
2 |
2 |
|
2 |
3 |
4 |
5 |
3 |
|
3 |
4 |
5 |
3 |
4 |
Page fault |
3 |
1 |
1 |
1 |
1 |
Here, total page faults = 3 + 1 + 1 + 1 + 1 = 7
Last updated on Jun 12, 2025
-> The UGC NET June 2025 exam will be conducted from 25th to 29th June 2025.
-> The UGC-NET exam takes place for 85 subjects, to determine the eligibility for 'Junior Research Fellowship’ and ‘Assistant Professor’ posts, as well as for PhD. admissions.
-> The exam is conducted bi-annually - in June and December cycles.
-> The exam comprises two papers - Paper I and Paper II. Paper I consists of 50 questions and Paper II consists of 100 questions.
-> The candidates who are preparing for the exam can check the UGC NET Previous Year Papers and UGC NET Test Series to boost their preparations.