Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
34 views

Quiz - Page Replacement Algorithm

The document provides instructions for a test on page replacement algorithms, including: - Only use ink and do not scratch out or communicate during the test. Cheating is punishable. - Determine the number of page faults for LRU, FIFO, and optimal page replacement with 1, 2, 3, or 4 page frames given a sample page reference string. - Provide the number of page faults for each algorithm and number of page frames.

Uploaded by

Camille Mendoza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Quiz - Page Replacement Algorithm

The document provides instructions for a test on page replacement algorithms, including: - Only use ink and do not scratch out or communicate during the test. Cheating is punishable. - Determine the number of page faults for LRU, FIFO, and optimal page replacement with 1, 2, 3, or 4 page frames given a sample page reference string. - Provide the number of page faults for each algorithm and number of page frames.

Uploaded by

Camille Mendoza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Tarlac State University

COLLEGE OF COMPUTER STUDIES


OSA – Page Replacement Algorithm

Read the instructions before you start the exam.


 All final answers should be in ink. Multiple answers will not be checked. Cross out all scratch work.
 Only questions pertaining to typographical errors will be entertained.
 Borrowing of writing materials, etc is considered as cheating.
 During the duration of the exam, communication of any form with anybody other than the instructor is considered an act of
cheating.
 Any attempt to cheat is punishable with a grade of 5.0 for the course
Test I - Problem Solving (60 points)

A} Consider the following page reference string

1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
LRU
How many page faults would occur for the 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
following replacement algorithms, assuming
one, two, three, or even four frames?
Remember that all frames are initially empty, so
your first unique pages will all cost one fault
each. (3 pts each)
FIFO
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
LRU
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3

FIFO Optimal
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

Optimal
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3

2 Page Frames # Page faults


 LRU replacement
 FIFO replacement
1 Page Frame # Page faults  Optimal replacement
 LRU replacement
 FIFO replacement
 Optimal replacement

NAME :
STUDENT TEST SCORE
Year & Section :

INSTRUCTOR /PROFESSOR
Date : (sign if permit is presented) 
Tarlac State University
COLLEGE OF COMPUTER STUDIES
OSA – Page Replacement Algorithm

LRU
LRU 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3

FIFO FIFO
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

Optimal Optimal
1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 1 2 3 4 2 1 5 6 2 1 2 3 7 6 3 2 1 2 3 6

3 Page Frames # Page faults


 LRU replacement
 FIFO replacement 4 Page Frames # Page faults
 Optimal replacement  LRU replacement
 FIFO replacement
 Optimal replacement

-- Nothing Follows --

NAME :
STUDENT TEST SCORE
Year & Section :

INSTRUCTOR /PROFESSOR
Date : (sign if permit is presented) 

You might also like