test2-2004-sol - Test #2 (Solutions & Grading Policy)...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Last name of student Student ID number Assigned TA: First name of student Email address AM Section PM Section (Circle one) 3/31/2004 10:56 AM Do This First: 1. Make sure that you have all the pages of the exam book. 2. Fill in the above information. Exam Rules: 1. This is a 1 hour and 50 minutes exam. 2. The syllabus includes all material covered until Session #18 (inclusive). 3. This is an Open Book and Notes Exam. 4. You are not allowed to consult any other student. 5. You may use a calculator, but not a laptop, palmtop or such other computer. 6. The last page is blank for your use. Q1 Page Replacement Q2 Cache Design Q3 Virtual Memory Q4 I/O Systems Q5 Operating Systems Total 15 25 25 25 10 100 ECSE-2660 Computer Architecture, Networks, and Operating Systems, Spring 2004 Page 1 of 10
Background image of page 1

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

View Full DocumentRight Arrow Icon
1. (15 points) Page Replacement 1a. (7 points) A computer has a 16-bit, byte-addressable virtual memory based on pure paging. The page size is 8KB. This computer has 24KB of main memory. For the following sequence of memory accesses, find the number of page faults that occur with FIFO page replacement algorithms. The memory initially contains no pages. 0x210F, 0x5304, 0x61F0, 0x95B0, 0x3010, 0x4F05, 0xA532, 0x2563, 0x4574, 0x78A1, 0x8705, 0xB606 The 16-bit address contains a page number and an offset within a page. Since page size is 8KB, we need 13 bits to specify an offset within a page. Furthermore, the machine has 24KB of main memory, which amounts to 3 available page frames. Therefore, the page reference string is composed of the left-most 3 digits. So we will get the following page reference string (in dec): 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 As it can be seen from the following table, we get 9 page faults: 1 2 3 4 1 2 5 1 2 3 4 5 1 1 1 4 4 4 5 5 5 5 5 5 2 2 2 1 1 1 1 1 3 3 3 3 3 3 2 2 2 2 2 4 4 Grading: 2 points for selecting left-most 3 bits, +1 point for correct # of frames,+2 points for correct table, +2 points for correct # page faults 1b. (7 points) Assuming that the main memory size is increased to 32KB, for the above sequence of memory accesses, find the number of page faults that occur with FIFO page replacement algorithms. The memory initially contains no pages. Having main memory size increased to 32KB, we have 4 (32KB / 8KB/page) available page frames: As it can be seen from the following table, we get 10 page faults: 1 2 3 4 1 2 5 1 2 3 4 5 1 1 1 1 1 1 5 5 5 5 4 4 2 2 2 2 2 2 1 1 1 1 5 3 3 3 3 3 3 2 2 2 2 4 4 4 4 4 4 3 3 3 Grading: 2 points for correct # of frames; +3 points for correct table; and +2 points for correct page faults. 1c. (1 point) Compare the page fault rates of the two cases above, and explain the reason for this particular result. Page fault rate is lower when there are 3 frames instead of 4, which is unexpected. The reason for this particular result is the
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

test2-2004-sol - Test #2 (Solutions & Grading Policy)...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online