Preview Mode Links will not work in preview mode

AdminDev Labs

Apr 9, 2020

## Semaphore vs Mutex vs AdminDev

### Semaphore
- More of a signal than a lock/unlock
- Integer value accessed through wait() and signal()
- wait() checks if the int is less than or equal to 0, decrements value
- signal() increments the integer value


### Semaphore Over Mutex
- Mutex locks can have busy waiting.
-...


Mar 23, 2020

## Race Conditions

### Definition
- Two or more processes are reading or writing some shared data and the final result depends on who runs precisely when.

### Tanenbaum example (Printer daemon)
- Process enters name of file in spooler dir
- Printer daemon checks to see if file need printing
- Prints and removes names...