Question

Given the following page reference string, count the number of page faults for a memory capacity...

Given the following page reference string, count the number of page faults for a memory capacity of 4 frames using the CLOCK page replacement algorithm. Reference string: 0, 1, 2, 3, 0, 1, 4, 0, 1, 2, 3, 4, 5, 6, 3, 2, 1, 0. Show all work.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

When a frame is referred again, it's second chance bit will be set to 1. This second chance bit will be the preference so that they will not be replaced even though these are the first pages to enter. If a page gets a second chance, it's second chance bit will be again set to 0. If second chance of all bit is set to 0, then FIFO policy will be used for replacement.

Ref.String 0 1 2 3 0 1 4 0 1 2 3 4 5 6 3 2 1 0
F#1 0 0 0 0

0(1)

(1) :second chance

Bit set to 1.

0(1) 0 0(1) 0(1) 0 3 3 3 3(1) 3(1) 3 0
F#2 1 1 1 1 1(1) 1 1 1(1) 1 1 1 5 5 5 5 1 1
F#3 2 2 2 2 4 4 4 4 4 4(1) 4(1) 4 4 2 2 2
F#4 3 3 3 3 3 3 2 2 2 2 6 6 6 6 6
Hit/Fault F F F F Hit Hit F Hit Hit F F Hit F F Hit F F F

Total # of Page Fault = 12.

If you have any questions comment down and please? upvote thanks...

Add a comment
Know the answer?
Add Answer to:
Given the following page reference string, count the number of page faults for a memory capacity...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT