Docsity

3 Problems on Operating Systems - Homework 3 | COP 4600, Assignments of Operating Systems

Toggle sidebar
bg1
NOTE: The last two pages of this document contain blank tables that you can use
to answer the problems. Hopefully, this will save you some time.
1) (60 pts – 15 pts each) For the reference string shown below, determine the number
of page faults that occur for (a) FIFO replacement algorithm, (b) LRU replacement
algorithm (c) Optimal replacement algorithm. Do parts (a)-(c) for allocations of (1)
three page frame allocation and (2) four page frame allocation. Does this reference
string suffer from Belady’s anomaly for the FIFO algorithm?
Reference string: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2
2) (10 pts) Using the reference string from problem 1, determine the number of page
faults using an algorithm called LFU (Least Frequently Used) assuming a three page
frame allocation. The LFU algorithm will remove select the page that has been used
with the least frequency whenever an existing page is being replaced by a new page
in the allocation. In the event that two or more pages have the same frequency of
use, the LFU algorithm reverts to FIFO in that the page that has been in the
allocation the longest will be removed.
3) (10 pts) Using the reference string from problem 1, determine the working set at each
page reference for (a) Δ = 3 and (b) Δ = 5. Determine (1) the size of the working set
at each page reference, (2) the average size of the working set (there are 22 entries in
the reference string), and (3) the total number of page faults in each case.
Blank table for the three-frame allocation problems:
1
COP 4600 – Introduction To Operating Systems – Summer 2009
Homework #3 – 100 points
Due: In class Tuesday August 4th . NO LATE ASSIGNMENTS ACCEPTED
Answer each of the following questions completely. Make sure that your answers are
neatly written and very readable. Points will be deducted if your assignment is not
presented in a neat format. For example, don’t turn it in on notebook paper torn out of
a spiral notebook.
pf3

Partial preview of the text

Download 3 Problems on Operating Systems - Homework 3 | COP 4600 and more Assignments Operating Systems in PDF only on Docsity!

NOTE: The last two pages of this document contain blank tables that you can use

to answer the problems. Hopefully, this will save you some time.

1) (60 pts – 15 pts each) For the reference string shown below, determine the number

of page faults that occur for (a) FIFO replacement algorithm, (b) LRU replacement

algorithm (c) Optimal replacement algorithm. Do parts (a)-(c) for allocations of (1)

three page frame allocation and (2) four page frame allocation. Does this reference

string suffer from Belady’s anomaly for the FIFO algorithm?

Reference string: 1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2

2) (10 pts) Using the reference string from problem 1, determine the number of page

faults using an algorithm called LFU (Least Frequently Used) assuming a three page

frame allocation. The LFU algorithm will remove select the page that has been used

with the least frequency whenever an existing page is being replaced by a new page

in the allocation. In the event that two or more pages have the same frequency of

use, the LFU algorithm reverts to FIFO in that the page that has been in the

allocation the longest will be removed.

3) (10 pts) Using the reference string from problem 1, determine the working set at each

page reference for (a) Δ = 3 and (b) Δ = 5. Determine (1) the size of the working set

at each page reference, (2) the average size of the working set (there are 22 entries in

the reference string), and (3) the total number of page faults in each case.

Blank table for the three-frame allocation problems:

COP 4600 – Introduction To Operating Systems – Summer 2009

Homework #3 – 100 points

Due: In class Tuesday August 4th^. NO LATE ASSIGNMENTS ACCEPTED

Answer each of the following questions completely. Make sure that your answers are

neatly written and very readable. Points will be deducted if your assignment is not

presented in a neat format. For example, don’t turn it in on notebook paper torn out of

a spiral notebook.

frame

fault Blank table for the four-frame allocation problems: 1 2 3 4 5 3 4 1 6 7 8 7 8 9 7 8 9 5 4 5 4 2 frame

fault Blank table for the working set problem: