CS111 Section 6: Preemption and Virtual Memory
Clone the section starter code by using the command below. This command creates a section6 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. thread-cycle-preemption.cc is the same thread cycling program as last week's section, but using preemptive scheduling - meaning that every 0.5 seconds, it automatically yields the current thread to run the next one every time the timer fires, instead of the threads manually calling yield. The code has been updated so that all threads print forever, and are switched between whenever the timer fires. The main thread now does the following: The other threads now do the following: And the interrupt handler just calls yield: All other code is the same as from the prior section. Compile and run the program, and trace through the code to answer the following questions: Q1: When the program switches to executing thread one for the first time, where does it
CS111 Section 6: Preemption and Virtual Memory Section 6: Preemption and Virtual Memory NOTE: this website is out of date. This is the course web site from a past quarter. If you are a current student taking the course, you should visit the current class web site instead. If the current website is not yet visible by going to cs111.stanford.edu, it may be accessible by visiting this link until the new page is mounted at this address. Please be advised that courses' policies change with each new quarter and instructor, and any information on this out-of-date page may not apply to you. --> Sectio
Explore this link on the map →related reading
- CS111 Section 6: Preemption and Virtual Memoryweb.stanford.edu
- Virtual memory layout | Pintos Documentationcs162.org
- CS111 Assignment 6: Virtual Memoryweb.stanford.edu
- Operating Systems: Three Easy Piecespages.cs.wisc.edu
- Disabling interrupts | Pintos Documentationcs162.org
- The "Basics" | Putting the "You" in CPUcpu.land
- Slice Dat Time | Putting the "You" in CPUcpu.land
- CS111 Assignment 5: Dispatching and Implementing Locks/CVsweb.stanford.edu
- CS111 Assignment 5: Dispatching and Implementing Locks/CVsweb.stanford.edu
- CS111 Section 7: Demand Pagingweb.stanford.edu
- Pages | CS 162 HW 4cs162.org
- Syscall implementation | CS 162 HW 4cs162.org