Disabling interrupts | Pintos Documentation
The crudest way to do synchronization is to disable interrupts, that is, to temporarily prevent the CPU from responding to interrupts. If interrupts are off, no other thread will preempt the running thread, because thread preemption is driven by the timer interrupt. If interrupts are on, as they normally are, then the running thread may be preempted by another at any time, whether between two C statements or even within the execution of one. Incidentally, this means that Pintos is a “preemptible kernel,” that is, kernel threads can be preempted at any time. Traditional Unix systems are “nonpreemptible,” that is, kernel threads can only be preempted at points where they explicitly call into the scheduler. (User programs can be preempted at any time in both models.) As you might imagine, preemptible kernels require more explicit synchronization. You should have little need to set the interrupt state directly. Most of the time you should use the other synchronization primitives described
Disabling interrupts | Pintos Documentation Skip to main content Menu Expand (external link) Document Search Copy Copied Pintos Documentation Disabling interrupts The crudest way to do synchronization is to disable interrupts, that is, to temporarily prevent the CPU from responding to interrupts. If interrupts are off, no other thread will preempt the running thread, because thread preemption is driven by the timer interrupt. If interrupts are on, as they normally are, then the running thread may be preempted by another at any time, whether between two C statements or even within the execution
Explore this link on the map →related reading
- Understanding threads | Pintos Documentationcs162.org
- Spinlocks Considered Harmfulmatklad.github.io
- CS111 Section 6: Preemption and Virtual Memoryweb.stanford.edu
- CS111 Section 6: Preemption and Virtual Memoryweb.stanford.edu
- Interrupts RPi Pico MicroPython : React to eventsupesy.com
- User threads | CS 162 Project 2cs162.org
- Unreliable Guide To Locking — The Linux Kernel documentationdocs.kernel.org
- LittleBookOfSemaphores.pdfgreenteapress.com
- Strict Priority Scheduler | CS 162 Project 2cs162.org
- Slice Dat Time | Putting the "You" in CPUcpu.land
- The "Basics" | Putting the "You" in CPUcpu.land
- Concurrency Patterns in Embedded Rust - Ferrous Systemsferrous-systems.com