1 / 4

Problems in Memory Management

Problems in Memory Management. CS 1550 Recitation October 9 th , 2002 The questions in this slide are from Andrew S. Tanenbaum's textbook page 264.

yin
Download Presentation

Problems in Memory Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Problems in Memory Management CS 1550 RecitationOctober 9th, 2002 The questions in this slide are from Andrew S. Tanenbaum's textbookpage 264.

  2. 11. If an instruction takes 10 nsec and a page fault takes and additional n nsec, give a formula for the effective instruction time if page faults occur every k instructions. Consider k instructions: k-1instructions execution without page fault: 10 * (k - 1)nsec 1 instuction with page fault: (10 + n) * 1 nsec Average: (10*(k-1) + (10+n)*1) / k = 10 + n/k nsec

  3. 12. A machine has a 32-bit address space and an 8-KB page. The page is entirely in harware, with one 32-bit word per entry. The page table is copied to the hardware from memory, at one word every 100 nsec. If each process runs for 100 msec (including the time to load the page table), what fraction of the CPU time is devoted to loading the page tables? 1 nsec = 1/1,000,000,000 sec1 msec = 1/1,000 sec Page size : 8-KB  # of offset bits 8-KB = 2^13 Bytes Offset bits : 13 bits Page number: 32 – 13 = 19 bits

  4. How many pages are there?2 ^ 19 = 524288 Load time:524288 * 100 nsec = 0.0524288 sec CPU time:100 msec = 0.1 sec Fraction:0.0524288 / 0.1 = 52.4% Real World … 32-bit address space == 32-bit word per entry Always?

More Related