1 / 12

Week 7

Week 7. February 17, 2004 Adrienne Noble. Important Dates. Due Monday, Feb 23 Homework 7 Due Wednesday, Feb 25 Project 3 Due Friday, Feb 27 Homework 8. Questions?. Lecture Project 3 Homework 7 and 8. Midquarter Evaluation Results. More concrete examples and problems

mele
Download Presentation

Week 7

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. Week 7 February 17, 2004 Adrienne Noble

  2. Important Dates • Due Monday, Feb 23 • Homework 7 • Due Wednesday, Feb 25 • Project 3 • Due Friday, Feb 27 • Homework 8

  3. Questions? • Lecture • Project 3 • Homework 7 and 8

  4. Midquarter Evaluation Results • More concrete examples and problems • Q/A on projects is very helpful • Mixed feelings about reviewing lecture material • some love it, some think it’s a waste of time

  5. Address translation and page faults virtual address virtual page # offset physical memory page frame 0 page table page frame 1 physical address page frame 2 page frame # page frame # offset page frame 3 … page frame Y

  6. Address Space stack (dynamic allocated mem) 2048 bytes (211) heap (dynamic allocated mem) static data (data segment) 8192 bytes (213) code (text segment)

  7. One Level Page Translation • Specs: • 16 bit address space • 64 byte pages • 2 bytes per page table entry (PTE) • How many bits are needed for the offset? • How many bits are needed for the virtual page number? • How many PTEs will be in the page table? • How much space will the page table take?

  8. One Level Page Translation • Specs: • 16 bit address space • 64 byte pages • 2 bytes per page table entry (PTE) • How many bits are needed for the offset? • 6 bits (page size = 64 = 26) • How many bits are needed for the virtual page number? • 10 bits (address space / page size = 216 / 26 = 210) • How many PTEs will be in the page table? • 210 = 1024 PTEs • How much space will the page table take? • 1024 * 2 = 2048 bytes

  9. Two Level Page Translation • Specs: • 16 bit address space • 64 byte pages • 2 bytes per page table entry (PTE) • How many bits are needed for the offset? • How many bits are needed for the virtual page number? • How many PTEs will be in the base page table? • How much space will the base page table take? • How much space will the entire set of page tables take?

  10. Two Level Page Translation • Specs: • 16 bit address space • 64 byte pages • 2 bytes per page table entry (PTE) • How many bits are needed for the offset? • 6 bits (page size = 64 = 26) • How many bits are needed for the virtual page number? • 5 bits (page size / PTE size = 64/2 = 32 entries per page = 25) • How many pages will be in the base page table? • 25 = 32 PTEs • How much space will the base page table take? • 25 * 2 = 64 bytes • How much space will the entire set of page tables take? • 1 table for stack (2048 / 64 byte pages = 32 pages) • 4 tables for code, heap, data (8192 / 64 = 128) • 1 base table • Total = number of tables * table size = (1+4+1) * 64 = 384 bytes

  11. Homework Review • Why are page table entries all powers of 2? • Say we have a 16 bit virtual address • 10 bits for virtual page number and 6 bits for offset • 1101010011010111 virtual address virtual page # offset

  12. Page Replacement Algorithms • Balady’s Algorithm • FIFO • LRU • LRU approximation (clock) • Hypothetical Working Set Algorithm • Page Fault Frequency

More Related