[SOLVED] CMSC412 Homework 5

30.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Demand paging problems (page replacement algorithms):

1. For the following reference string apply the FIFO page replacement algorithm.

– Option 1 – according to Week 6 – Textbook Readings:
Reference string 2 4 5 6 1 5 3 4 5 2 3 6 5 3 4 7 3 5 6
Physical frame 0 2 2 2 2
Physical frame 1 4 4 4
Physical frame 2 5 5
Physical frame 3 6
Page faults F F F F
Victim frames
OR
– Option 2 – according to Week 6 – Module Readings
Reference string 2 4 5 6 1 5 3 4 5 2 3 6 5 3 4 7 3 5 6
Physical frame 0 2 4 5 6
Physical frame 1 2 4 5
Physical frame 2 2 4
Physical frame 3 2
Page faults F F F F
Victim frames

2. For the following reference string apply the OPT page replacement algorithm.
Reference string 2 4 5 6 1 5 3 4 5 2 3 6 5 3 4 7 3 5 6
Physical frame 0 2 2 2 2
Physical frame 1 4 4 4
Physical frame 2 5 5
Physical frame 3 6
Page faults F F F F
Victim frames

3. For the following reference string apply the LRU page replacement algorithm.
Reference string 2 4 5 6 1 5 3 4 5 2 3 6 5 3 4 7 3 5 6
Physical frame 0 2 2 2 2
Physical frame 1 4 4 4
Physical frame 2 5 5
Physical frame 3 6
Page faults F F F F
Victim frames

4. For the following reference string apply the LFU page replacement algorithm.
Reference string 2 4 5 6 1 5 3 4 5 2 3 6 5 3 4 7 3 5 6
Physical frame 0 2 2 2 2
Physical frame 1 4 4 4
Physical frame 2 5 5
Physical frame 3 6
Page faults F F F F
Victim frames

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.