next up previous
Next: Coke machine Up: Assignment 7: Semaphores Previous: Get the code

Fill in some code

1.
Fill in sem.c and sem.h, using the pseudocode in the notes.

WARNING: the pseudocode in the notes contains a deliberate error which you will have to find and remove, either by examination of the code or by debugging. I recommend the former.

2.
Compile and run sem.

3.
Compile and run array.

4.
Once you get those working, how confident do you feel that your implementation of semaphores is correct? Which gives you more confidence, examination of the code or testing?



Allen Downey
2000-04-10