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

CS111 Assignment 5: Dispatching and Implementing Locks/CVs

web.stanford.edu · 4,058 words · saved by 1 readers

In this assignment you will implement a simple threading mechanism in C++ and use that to implement your own version of locks and condition variables. Normally, threads are implemented in the operating system, but for this assignment you will implement them inside a user-level application. Your thread dispatcher will run in a single system thread, which is what you get when a new process starts or when you create a std::thread object. Your dispatcher will use that system thread to create and run any number of user-level threads. These user-level threads will have all the features of system threads (each has its own stack, they can be scheduled independently, and you will implement locks and condition variables for them), but the operating system doesn't know about them: it only knows about the one system thread. Your code to implement user-level threads will be very similar to the code that implements system threads in an operating system running on a single core. The goal of this proj

CS111 Assignment 5: Dispatching and Implementing Locks/CVs Assignment 5: Dispatching and Implementing Locks/CVs --> Due: Thu Mar 6 11:59 pm Late submissions accepted until Sat Mar 8 11:59 pm Assignment by David Mazières and John Ousterhout, with modifications by Nick Troccoli. In this assignment you will implement a simple threading mechanism in C++ and use that to implement your own version of locks and condition variables. Normally, threads are implemented in the operating system, but for this assignment you will implement them inside a user-level application. Your thread dispatcher will run

Explore this link on the map →

related reading