a te predic a te th a t thre a ds c a n w a it for while holding a lock. • E a ch Condition is tied to one speci f ic lock When a thre a d c a lls a w a it(): • It rele a ses the lock • It goes to sleep When sign a led: • It re- a cquires the lock • Execution resumes a fter a w a it()
If the queue is full → the thre a d blocks until sp a ce is a v a il a ble t a ke() • Removes a nd returns the he a d • If the queue is empty → the thre a d blocks until a n element is a v a il a ble
Computing Javier Gonzalez-Sanchez, Ph.D. [email protected] Winter 2026 Copyright. These slides can only be used as study material for the class CSC 364 at Cal Poly. They cannot be distributed or used for another purpose. 34