flâneur — a map of the web's best reading

CS111 Section 7: Demand Paging

web.stanford.edu · 1,604 words · saved by 1 readers

Clone the section starter code by using the command below. This command creates a section7 directory containing the project files. Next, pull up the online section checkoff and have it open in a browser so you can jot things down as you go. In lecture, we learned about paging (and its variant, demand paging) as one possible virtual memory design. Paging chops the virtual and physical address spaces up into fixed-size pages (for our purposes, 4KB, or 4096 bytes), where a virtual page maps to a physical one. Demand paging adds to this, where we do not need to keep all used pages resident in memory; we can swap a physical page to disk, reuse that page for something else and load the prior data back later when it's needed again. Let's review the mechanisms for paging and demand paging, and then we'll implement the translation code so you can see what it could look like! Say a process has the following page map: Q1: Assume that we are not using demand paging (so accessing a not-present page

CS111 Section 7: Demand Paging Section 7: Demand Paging --> Sections Wed Mar 05 to Sun Mar 09 Handout written by Nick Troccoli, with modifications by Parthiv Krishna. Learning Goals During this section, you will: become more familiar with the "demand paging" approach to virtual memory write your own code to translate a virtual address to a physical one using the "demand paging" design Get Started Clone the section starter code by using the command below. This command creates a section7 directory containing the project files. git clone /afs/ir/class/cs111/repos/lab7/shared section7 Next, pull u

Explore this link on the map →

related reading