Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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 page frame 0 page frame 1 page frame 2 page frame Y … page frame 3 physical memory offset physical address page frame # page table offset virtual address virtual page #

6 Address Space 8192 bytes (2 13 ) 2048 bytes (2 11 ) code (text segment) static data (data segment) heap (dynamic allocated mem) stack (dynamic allocated mem)

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 = 2 6 ) How many bits are needed for the virtual page number? 10 bits (address space / page size = 2 16 / 2 6 = 2 10 ) How many PTEs will be in the page table? 2 10 = 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 = 2 6 ) How many bits are needed for the virtual page number? 5 bits (page size / PTE size = 64/2 = 32 entries per page = 2 5 ) How many pages will be in the base page table? 2 5 = 32 PTEs How much space will the base page table take? 2 5 * 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 offset virtual address virtual page #

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


Download ppt "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."

Similar presentations


Ads by Google