Previous | Next --- Slide 45 of 48
Back to Lecture Thumbnails

I believe this closely resembles implementation of semaphores for producer-consumer type of problems, where we have a globally shared flag, whose value decides the order in which two different processes/threads proceed. Read about it here: Producer-Consumer Problem using Semaphores