InClassActivity16-sol - Activity #16 (Solution) 3/24/2003...

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

View Full Document Right Arrow Icon
ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2003 Page 1 of 2 Activity #16 (Solution) 3/24/2003 1:03 PM Activity 16.1 Working Set a. (25 points) A computer has a 20-bit, byte-addressable virtual memory based on pure paging. The page size is 16Kbytes. This computer has 64Kbytes of main memory. For the following sequence of memory accesses, find the number of page faults that occur with LRU page replacement. The memory initially contains no pages. 0x01002, 0x06030, 0x08151, 0x3B020, 0xD1015, 0xDF035 , 0x85532, 0x85563, 0x85574 , 0xDA8A1, 0x5F705, 0x5F606, 0xAABA0, 0xAAA10, 0x7A5A1 , 0x82423, 0xAA4A1, 0xAA442 , 0x80110, 0xA5601 Answer: The 20-bit address contains a page number and an offset within a page. Since page size is 16Kbytes, we need 14 bits to specify an offset within a page. Furthermore, the machine has 64K of memory, which amounts to 4 available page frames. Therefore, the page reference string is composed of the left-most 6 digits. So we will get the following page reference string (in decimals): 0, 1, 2, 14, 52, 55 , 33, 33, 33 , 54, 23, 23, 42, 42, 30 , 32, 42, 42 , 32, 41 As it can be seen from the following table, we get 13 page faults. 0 1 2 14 52 55 33 33 33 54 23 23 42 42 30 32 42 42 32 41 0 0 0 0 52 52 52 52 52 52 23 23 23 23 23 23 23 23 23 41 1 1 1 1 55 55 55 55 55 55 55 42 42 42 42 42 42 42 42 2 2 2 2 33 33 33 33 33 33 33 33 30 30 30 30 30 30 14 14 14 14 14 14 54 54 54 54 54 54 32 32 32 32 32 Grading: 3pts off for each wrong or missing replacement, up to -21. b. (16 points) For the memory reference sequence given in the previous question, find the size of the working set
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

InClassActivity16-sol - Activity #16 (Solution) 3/24/2003...

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

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