{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw03Solutions

# hw03Solutions - CS 411 Operating Systems II Homework...

This preview shows pages 1–2. Sign up to view the full content.

CS 411 Operating Systems II Spring 2009 Homework Assignment #3 Solutions A system that uses demand paging has 5 frames, all initially empty. Given the page-reference string: 1,1,3,5,2,2,6,8,7,6,2,1,5,5,5,1,4,9,7,7 (Use FIFO to resolve ties.) 1. FIFO page-replacement algorithm. a. Fill in the following table for a FIFO page-replacement algorithm. The first few entries are provided. Requested Page Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Page Fault 1 1 - - - - y 1 1 - - - - n 3 1 3 - - - y 5 1 3 5 - - y 2 1 3 5 2 - y 2 1 3 5 2 - n 6 1 3 5 2 6 y 8 8 3 5 2 6 y 7 8 7 5 2 6 y 6 8 7 5 2 6 n 2 8 7 5 2 6 n 1 8 7 1 2 6 y 5 8 7 1 5 6 y 5 8 7 1 5 6 n 5 8 7 1 5 6 n 1 8 7 1 5 6 n 4 8 7 1 5 4 y 9 9 7 1 5 4 y 7 9 7 1 5 4 n 7 9 7 1 5 4 n b. How many page faults are generated using FIFO ? ___11___ 2. LRU page-replacement algorithm. a. Fill in the following table for a LRU page-replacement algorithm. Requested Page Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Page Fault 1 1 - - - - y 1 1 - - - - n 3 1 3 - - - y 5 1 3 5 - - y 2 1 3 5 2 - y 2 1 3 5 2 - n 6 1 3 5 2 6 y 8 8 3 5 2 6 y 7 8 7 5 2 6 y 6 8 7 5 2 6 n 2 8 7 5 2 6 n 1 8 7 1 2 6 y

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}