Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider the following page addresses stream ... Start Learning for Free
Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7
By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......
  • a)
    3 6
  • b)
    5 6
  • c)
    2 6
  • d)
    6 2
Correct answer is option 'D'. Can you explain this answer?
Verified Answer
Consider the following page addresses stream frequency by executing th...

So, 6 page faults and 2 page hit.
View all questions of this test
Most Upvoted Answer
Consider the following page addresses stream frequency by executing th...
Explanation:

Optimal Page Replacement Algorithm:
- In the optimal page replacement algorithm, the page that will not be used for the longest period of time in the future is replaced.
- The algorithm requires knowledge of future page requests, which is not practical in real-world scenarios.

Page Address Stream:
1 2 3 1 2 5 8 7

Number of Frames: 3

Steps:
1. When the page addresses stream is processed with 3 frames using optimal page replacement algorithm, the page faults and hits are calculated as follows:
- Initially, the first 3 page requests 1, 2, 3 will be loaded into frames. This results in 3 page faults.
- When the 4th page request 1 comes in, it is already in the frame so it is a hit.
- The 5th page request 2 is also a hit since it is already in the frame.
- The 6th page request 5 is a page fault as it was not present in the frame, so a replacement occurs.
- The 7th page request 8 is a page fault as it was not present in the frame, so a replacement occurs.
- The 8th page request 7 is a page fault as it was not present in the frame, so a replacement occurs.

Result:
- Number of page faults = 6
- Number of page hits = 2
Therefore, the correct answer is option 'D': 6 page faults and 2 page hits.
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. Can you explain this answer?
Question Description
Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. 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 Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. 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 Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. Can you explain this answer?.
Solutions for Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. 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 Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. Can you explain this answer?, a detailed solution for Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. Can you explain this answer? has been provided alongside types of Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following page addresses stream frequency by executing the program with 3 frames. 1 2 3 1 2 5 8 7By using optimal page replacement, number of page fault will be ....... and the number of page hit will be .......a)3 6b)5 6c)2 6d)6 2Correct answer is option 'D'. 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