Lecture 16: Review of Semaphore Syntax
So, when you do a semaphore weight against a zero variable, then this thread actually says oh, I can’t decrement that, at least not now. I need somebody else in another thread to actually plus plus this so that I can actually pass through a minus minus without making the number negative. Does that make sense to people? Okay, so programmatically, the implementation of semaphore weight is in touch with the thread library and so it actually when it’s attached to a zero behind the scenes, it immediately says ok, I can’t make any progress right now. It pulls itself off the processor. ... See the whole transcript at [[http://see.stanford.edu/materials/icsppcs107/transcripts/ProgrammingParadigms-Lecture16.pdf|Programming Paradigms - Lecture 16]]