Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  A system uses 3 page frames for storing proce... Start Learning for Free
A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2
  • a)
    4
  • b)
    5
  • c)
    6
  • d)
    7
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
A system uses 3 page frames for storing process pages in main memory. ...
What is a Page fault ? An interrupt that occurs when a program requests data that is not currently in real memory. The interrupt triggers the operating system to fetch the data from a virtual memory and load it into RAM. Now, 4, 7, 6, 1, 7, 6, 1, 2, 7, 2 is the reference string, you can think of it as data requests made by a program. Now the system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy.
[ ] - Initially page frames are empty.i.e. no process pages in main memory.
[4] - Now 4 is brought into 1st frame (1st page fault)
Explanation: Process page 4 was requested by the program, but it was not in the main memory(in form of page frames),which resulted in a page fault, after that process page 4 was brought in the main memory by the operating system.
[4 7] - Now 7 is brought into 2nd frame (2nd page fault) - Same explanation.
[4 7 6] - Now 6 is brought into 3rd frame (3rd page fault)
[1 7 6] - Now 1 is brought into 1st frame, as 1st frame was least recently used(4th page fault).
After this 7, 6 and 1 are were already present in the frames hence no replacements in pages.
[1 2 6] - Now 2 is brought into 2nd frame, as 2nd frame was least recently used(5th page fault).
[1 2 7] -Now 7 is brought into 3rd frame, as 3rd frame was least recently used(6th page fault).
Hence, total number of page faults(also called pf) are 6. Therefore, C is the answer.
View all questions of this test
Most Upvoted Answer
A system uses 3 page frames for storing process pages in main memory. ...
Solution:

Given:
Number of page frames (m) = 3
Page reference string = 4, 7, 6, 1, 7, 6, 1, 2, 7, 2

Initially, all the page frames are empty.
So, the first 3 page requests (4, 7, 6) will cause a page fault as there are no pages in the page frames. The page frames will be filled with these pages.
Page Frames: 4, 7, 6

For the next page request 1, the page frame already contains the page 4. So, a page fault will occur and the page frame 7 will be replaced with the page 1.
Page Frames: 4, 1, 6

For the next page request 7, the page frame already contains the page 4 and page 1. So, a page fault will occur and the page frame 6 will be replaced with the page 7.
Page Frames: 4, 1, 7

For the next page request 6, the page frame already contains the page 4, page 1 and page 7. So, a page fault will occur and the page frame 6 will be replaced with the page 6.
Page Frames: 4, 1, 6

For the next page request 1, the page frame already contains the page 4, page 1 and page 6. So, a page fault will occur and there will be no replacement as the page 1 is already in the page frame.
Page Frames: 4, 1, 6

For the next page request 2, the page frame already contains the page 4, page 1 and page 6. So, a page fault will occur and the page frame 4 will be replaced with the page 2.
Page Frames: 2, 1, 6

For the next page request 7, the page frame already contains the page 2, page 1 and page 6. So, a page fault will occur and the page frame 6 will be replaced with the page 7.
Page Frames: 2, 1, 7

For the next page request 2, the page frame already contains the page 2, page 1 and page 7. So, a page fault will occur and there will be no replacement as the page 2 is already in the page frame.
Page Frames: 2, 1, 7

Therefore, the total number of page faults that will occur while processing the above page reference string is 6.

Hence, option C is the correct answer.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer?
Question Description
A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer?.
Solutions for A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer?, a detailed solution for A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A system uses 3 page frames for storing process pages in main memory. It uses the Least Recently Used (LRU) page replacement policy. Assume that all the page frames are initially empty. What is the total number of page faults that will occur while processing the page reference string given below? 4, 7, 6, 1, 7, 6, 1, 2, 7, 2a)4b)5c)6d)7Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev