CS111 Section 7: Demand Paging
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
related reading
- CS111 Assignment 6: Virtual Memoryweb.stanford.edu
- What Every Programmer Should Know About Memorypeople.freebsd.org
- CS111 Section 6: Preemption and Virtual Memoryweb.stanford.edu
- CS111 Section 6: Preemption and Virtual Memoryweb.stanford.edu
- Pages | CS 162 HW 4cs162.org
- Page (computer memory) - Wikipediaen.wikipedia.org
- Introduction to Paging | Writing an OS in Rustos.phil-opp.com
- Syscall implementation | CS 162 HW 4cs162.org
- Paged Attention from First Principles: A View Inside vLLM – Hamza's Bloghamzaelshafie.bearblog.dev
- Memory allocatorcs162.org
- Write your Own Virtual Machinejmeiners.com
- What Every Programmer Should Know About Memoryakkadia.org