20230919_in_class_BP_questions

pdf

School

University of British Columbia *

*We aren’t endorsed by this school

Course

404

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

3

Uploaded by JudgePenguinMaster491

Report
1 CPSC 404 In-Class Exercises: Buffer Pool Management September 19, 2023 Each student must hand in his/her own work. It is OK to collaborate with a friend, but not to copy- and-paste someone’s answer. You need to hand-write or type your own answer. Name of Student (last, first) Student Number Answer the following 4 buffer pool questions involving the page replacement algorithms from class. 1. To the end of the reference string given in the PDF example on Canvas for the clock algorithm (i.e., 7, 0, 1, 2, 0, 3, 0, 4), add 3 more page requests: 7, 5, 6. Show the result of the newly-added columns, below. RS: 4 7 5 6 F1: 4 / 1 F2: 0 / 0 F3: 3 / 0 PF? yes
2 2. To the end of the reference string given in the PDF example on Canvas for the extended clock algorithm (i.e., 7, 0, 1w, 2, 0, 3, 0w ), add 3 more page requests: 7, 5, 6 . (None of these 3 new page requests perform updates.) Show the result of the newly-added columns, below. RS: 0w 7 5 6 F1: 2 0/0 F2: 3 1/0 F3: 0 1/1 Write out? (Which page?) Yes, page 1 PF? Yes 3. To the end of the reference string given in the PDF example on Canvas of the extended clock algorithm (i.e., 7, 0, 1w, 2, 0, 3, 0w ), add 3 more page requests: 7w, 5w, 6w . Show the result of the newly-added columns, below. RS: 0w 7w 5w 6w F1: 2 0/0 F2: 3 1/0 F3: 0 1/1 Write out? Yes, page 1 (Which page?) PF? Yes
3 4. This question is about what happens when we have no page fault, but we get a request for a page that’s already in memory. In our algorithm, we only update the timestamp when a page fault happens. i. After completing your answer for Question 1, suppose the next page request (after solving the full reference string given in Question 1) was another read request for page 5. Explain in words (or draw the column) for what would change (if anything) and what frame would be circled. ii. After completing your answer for Question 2, suppose the next page request was another read request for page 5. Explain in words (or draw the column) for what would change (if anything) and what frame would be circled. iii. After completing your answer for Question 3, suppose the next page request was another read request for page 7. Explain in words (or draw the column) for what would change (if anything) and what frame would be circled.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help