binary semaphore code

This commit is contained in:
Remzi H. Arpaci-Dusseau
2019-04-17 13:41:35 -05:00
parent 7774741a2e
commit ac329a7f8f
3 changed files with 48 additions and 0 deletions

View File

@@ -6,8 +6,23 @@ using semaphores, found in `join.c`.
Run `make` to build the code; run `join` to test it. Fun!
```sh
prompt> make
prompt> ./join
```
# Binary Semaphores (Locks)
Simple example of semaphores as locks (binary semaphores).
Code in `binary.c`.
Run `make` to build the code; run `binary` to test it. Fun!
```sh
prompt> make
prompt> ./binary
```
# Dining Philosophers