========================[ SHARED TERMINOLOGY ]========================= * race condition * critical section / synch * mutex, progress, bounded waiting... ========================[ SYNCHRONIZATION ]========================= Synchronocity -- prevent race conditions by enforcing critical sections. * Atomic instruction sequences. (see: mutex) * Voluntary descheduling. (see: cond) Critical section -- solution must enforce three rules: * Mutual exclusion -- only one process at a time can use the resource. * Progress -- once inside, must eventually finish. * Bounded waiting -- once waiting, must eventually begin. ========================[ RESOURCE UTILIZATION ]========================= Deadlock -- set of processes waiting on an event, each waiting on another processor in the set. * Mutual exclusion -- only one process at a time can use the resource. * Hold and wait -- exists a process holding at least one resource that is waiting to acquire additional resources held by other processes. * No Preemption -- resources can be released only voluntarily. * Circular wait -- cycle in dependency graph. Note: NOT synchronocity bug. Remains even when those are cleaned up. It is a resource usage design problem. Starvation -- schedule where a process can make progress, but schedule never taken. Livelock -- states of processes continuously change but make no progress.