Computer Science 330
Operating Systems
Spring 2012, Siena College
Lecture 15: Paging
Date: Tuesday, March 20, 2012
Agenda
- Announcements
- Midterm exam recap
- Lecture assignment 14 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
Lecture Assignment 15
Due at the start of class, Thursday, March 22.
Please submit answers to these questions
either as a hard copy (typeset or handwritten are OK) or by email to
jteresco AT siena.edu by the start of class. Please use a clear subject line
when submitting by email (e.g., CS 330 Lecture
Assignment 15, Joe Student). We will discuss these
questions at the start of class, so no late submissions are
accepted.
- SG&G Exercise 7.11, p. 314 (4 points)
- SG&G Exercise 7.17, p. 314 (2 points)
- SG&G Exercise 7.18, p. 315 (2 points)
- SG&G Exercise 7.20, p. 315 (4 points)
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 7.4, p. 313.
- SG&G Exercise 7.9, p. 313.
- SG&G Exercise 7.24, p. 315.