Computer Science 330
Operating Systems
Fall 2020, Siena College
Lecture 0x0f: Paging
Date: Monday, October 19, 2020
Agenda
- Announcements
- The next readings/activities from OS zyBook: Chapter 7, due now, but please complete them this week if you have not already
- OS zyBook: Chapter 8, due next Monday
- The next Term Project this week: discuss ideas and form groups through Wednesday, proposals due Friday
- Last question of the midterm (classical problems of
synchronization) recap
- Programming Project 2: CPU Scheduler Simulation [HTML] [PDF] thoughts and a look at some sample solution code
- Lab 7: Unix System Programming [HTML] [PDF] discussion
- Programming Project 3: The Roger Bacon Shell [HTML] [PDF] discussion
- make good use of Git and GitHub (Issues, maybe even branches)
- 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