Understanding threads | Pintos Documentation
The first step is to read and understand the code for the thread system. Pintos already implements thread creation and thread completion, a simple scheduler to switch between threads, and synchronization primitives (semaphores, locks, condition variables, and optimization barriers). Some of this code might seem slightly mysterious. You can read through parts of the source code to see what’s going on. If you like, you can add calls to printf() almost anywhere, then recompile and run to see what happens and in what order. You can also run the kernel in a debugger and set breakpoints at interesting spots, step through code and examine data, and so on. When a thread is created, the creator specifies a function for the thread to run, as one of the arguments to thread_create(). The first time the thread is scheduled and runs, it starts executing from the beginning of that function. When the function returns, the thread terminates. Each thread, therefore, acts like a mini-program running insi
Understanding threads | Pintos Documentation Skip to main content Menu Expand (external link) Document Search Copy Copied Pintos Documentation Understanding threads The first step is to read and understand the code for the thread system. Pintos already implements thread creation and thread completion, a simple scheduler to switch between threads, and synchronization primitives (semaphores, locks, condition variables, and optimization barriers). Some of this code might seem slightly mysterious. You can read through parts of the source code to see what’s going on. If you like, you can add calls
Explore this link on the map →related reading
- Thread functions | Pintos Documentationcs162.org
- User threads | CS 162 Project 2cs162.org
- Implementation requirements | CS 162 Project 2cs162.org
- Pthread library | CS 162 Project 2cs162.org
- Disabling interrupts | Pintos Documentationcs162.org
- Processes and Threads — PlanetScaleplanetscale.com
- The "Basics" | Putting the "You" in CPUcpu.land
- Strict Priority Scheduler | CS 162 Project 2cs162.org
- An Intro to Threading in Python – Real Pythonrealpython.com
- The thread struct | Pintos Documentationcs162.org
- CS111 Assignment 5: Dispatching and Implementing Locks/CVsweb.stanford.edu
- CS111 Assignment 5: Dispatching and Implementing Locks/CVsweb.stanford.edu