GATE Exam  >  GATE Questions  >   A system uses FIFO policy for page replaceme... Start Learning for Free
A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?
  • a)
    96
  • b)
    100
  • c)
    97
  • d)
    92
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
A system uses FIFO policy for page replacement. It has 4 page frames ...
50 distinct pages(forward) - 50 page replacements
Reverse order- first 4 pages will be already loaded- then remaining 46 page replacements Total - 96.
View all questions of this test
Most Upvoted Answer
A system uses FIFO policy for page replacement. It has 4 page frames ...
Given Information:
- The system uses the FIFO page replacement policy.
- There are 4 page frames initially empty.
- The system first accesses 50 distinct pages in some order.
- The system then accesses the same 50 pages in reverse order.

Page Replacement Algorithm:
The FIFO (First-In-First-Out) page replacement algorithm keeps track of the order in which pages are loaded into memory. When a page fault occurs, the oldest page in the memory is replaced with the new page.

Explanation:
1. When the system accesses the 50 distinct pages in some order, each page will cause a page fault as there are no pages loaded initially. So, 50 page faults occur during this phase.
2. After the first phase, the system accesses the same 50 pages in reverse order. Let's assume the distinct pages are labeled as P1, P2, P3, ..., P50.
- Initially, all the 50 pages are loaded into the 4 available page frames.
- As the system accesses the pages in reverse order, the first page accessed will be P50.
- Since P50 is already in memory, no page fault occurs.
- The next page accessed will be P49. Again, no page fault occurs as it is already in memory.
- This continues until the system accesses the page P3, which is already in memory.
- Now, when the system tries to access the page P2, a page fault occurs as P2 is not in memory.
- The same happens for P1, and a page fault occurs.
- Thus, the system experiences a total of 2 page faults during this phase.
3. Adding the page faults from both phases, the total number of page faults is 50 + 2 = 52.

Therefore, the correct option is (A) 96, which is not the correct answer given the explanation provided. The correct answer should be (B) 100.
Explore Courses for GATE exam

Similar GATE Doubts

A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer?
Question Description
A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer?.
Solutions for A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer?, a detailed solution for A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? has been provided alongside types of A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?a)96b)100c)97d)92Correct answer is option 'A'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
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