HamroCSIT Logo
HAMRO CSIT
  • Course New
  • Entrance
    • Entrance Preparation
    • MCQ Questions
    • Colleges
    • Entrance Class
    • Entrance Books
    • Free Entrance Video Course
  • Semester
    • First Semester
    • Second Semester
    • Third Semester
    • Fourth Semester
    • Fifth Semester
    • Sixth Semester
    • Seventh Semester
    • Eight Semester
  • Questions
  • Subscription Automated
  • Notices
  • Articles
  • More
    • Ask Question
    • College Ambassadors
    • Financial Support Program
    • Contribute
    • Contact Us
Login Register
Hamro CSIT User Account
  • Sign In
  • Create Account


Shape | Hamro CSIT Shape | Hamro CSIT Shape | Hamro CSIT Shape | Hamro CSIT

Question

  • Home
  • Question
  • Answer
Resolved Bipin Tiwari Profile Image
Bipin Tiwari

4 years ago

um_student

Consider the page references 7,0,1,2,0,3,0,4,2,3,0,3,2, Find the number of page fault using OPR and  FIFO, with 4 page frame.

  • Answered by Nemi
  • 0 Comments
  • 3 years ago

To calculate the page faults using OPR and FIFO page replacement algorithms, we first need to understand how these algorithms work.

FIFO (First-In-First-Out) algorithm replaces the page that has been in the memory for the longest time. It’s a simple algorithm that keeps track of the order in which pages were loaded into the memory and replaces the oldest page first.

OPR (Optimal Page Replacement) algorithm replaces the page that will not be used for the longest period of time. It’s an optimal algorithm that has the advantage of knowing the future behavior of the program and replacing the page that will not be needed for the longest time.

Let’s consider the given page references and find the number of page faults using FIFO and OPR algorithms, with a 4-page frame:

FIFO Algorithm:

7 0 1 2 0 3 0 4 2 3
7 7 7 7 7 0 0 1 1 1
0 0 0 0 1 1 2 2 2
1 1 1 2 2 3 3 3
2 2 3 3 4 4 4
F F F F F F
0 3 2
1 1 1
2 2 2
3 3 3
4 4 4
F

Total number of page faults using FIFO algorithm = 7

OPR Algorithm:

7 0 1 2 0 3 0 4 2 3
7 7 7 7 7 3 3 3 3 3
0 0 0 0 0 0 4 4 4
1 1 1 1 1 1 1 1
2 2 2 2 2 2 2
F F F F F F
0 3 2
3 3 3
4 4 4
1 1 2
0 0 0
F F

Total page faults using OPR algorithm: 8.

Therefore, the number of page faults using FIFO algorithm is 7, and the number of page faults using OPR algorithm is 8.

If you found any error in the answer, please leave a comment and report the answer.
Subscribe
Login
Notify of
Please login to comment
0 Comments
Oldest
Newest Most Voted
Share

Share this link via

Or copy link

logoHAMROCSIT

Hamro CSIT is a comprehensive web and mobile platform that provides B.Sc. CSIT students with resources like notes, syllabi, question banks, solved past papers, practical files, and free entrance preparation materials — all in one place.

  • [email protected]
Semester
  • First Semester
  • Second Semester
  • Third Semester
  • Fourth Semester
  • Fifth Semester
  • Sixth Semester
  • Seventh Semester
  • Eighth Semester
Links
  • About Us
  • FAQs
  • Sitemap
  • Privacy Policy
  • Terms and Conditions
  • College Ambassadors
  • Financial Support Program
Hits Counter
20187098
Google Play App Store
Follow Us

Copyright 2026 | HAMROCSIT | All Right Reserved

Official Payment Partner Esewa Logo
Seventh Sem Discount - Limited Spots

HAMROCSIT.COM

Copyright 2024 | HAMROCSIT.COM | All Right Reserved - Nymna Technology