Icecream Shop Simulation
An example that shows how to use semaphore to code complicated concurrent program
I have been watching the good old Stanford CS course Programming Paradigms. The first half of the course deals with C and serves as great material for learning C. Then the course introduced threads, and concurrent programming in C with some homebrew library. The most complicated example given is this program that simulated the icecream shop. Here are the description of the problem: This program simulates the daily activity in an ice cream store.