A condition variable is an explicit
queue that threads can put themselves on when some state of execution
(i.e., some condition) i…
One can use semaphores as both locks and condition variables.
A semaphore is an object with an integer value that we can manipulate
Adding locks to a data structure to make it usable by threads makes the structure thread safe, exactly how such locks are added determines both …
When you have a region of code that is a critical section, and thus needs to be protected to ensure correct operation, locks are quite useful.
Operating Systems: Three Easy Pieces consists of 3 "Easy Pieces" one of them is Concurrency so I decided to summarizes this part of the book.