|
Computer Science 322 Operating Systems Mount Holyoke College Spring 2010
|
|
Lecture 16: Paging
Date: Monday, April 5, 2010
Agenda
- Announcements
- Lecture assignment recap
- Memory Management
- Paging
- break up logical memory into pages, physical memory into frames
- page size: the size of these pages/frames
- can allow virtual memory
- translate addresses by looking up a frame number using
the page number, which is part of the logical address
- store the translations in a page table in memory
- a memory access now requires a page table access then
the memory access - slow!
- help: translation lookaside buffer - associative
memory that stores a subset of table entries
- TLBs are small, but locality helps it to have an
excellent hit rate in practice
- page table too large? page it - multilevel page
tables
- another option: inverted page tables
- memory protection with paging: valid/invalid bits
- shared pages
- Demand paging
- only bring in pages that are actually requested
- when a page is referenced that is not in memory -
generate a page fault
- page fault traps to OS, bring in the page
- allows a mechanism for virtual memory
- if a page fault occurs and no free frame is available, we
need to make one - send a frame (the victim) back to disk
- performance will depend on the page fault rate
- low page fault rate results in reasonably low effective
access times, high page fault rates will make effective access
times very high
- locality of reference will make for a reasonably good
effective access time in most circumstances
Lecture Assignment 16
Due at the start of class, Wednesday, April 7.
You need not submit answers to these
questions, but you will have a chance to ask questions about them at
the start of class.
- SG&G Practice Exercise 8.4, p. 351
- SG&G Exercise 8.24, p. 353
Please submit answers to these questions
either as a hard copy (typeset or handwritten are OK) or by email to
jteresco AT mtholyoke.edu by the start of class. We will discuss these questions at
the start of class, so no late submissions are accepted.
- SG&G Exercise 8.17, p. 352
- SG&G Exercise 8.18, p. 353
- SG&G Exercise 8.20, p. 353