Concurrency Flashcards
what is mutual exclusion?
when only one process may be executing in the critical section
what is lockout?
a process blocked from entering a critical section due to another process
what is starvation?
when a group of processes continually enters the critical section preventing others from entering the critical section
what is a deadlock?
when processes block each other indefinitely from entering the critical section
what is a mutex lock?
mutex locks protect critical sections to prevent race conditions
what is the difference between a contended and uncontended lock?
when a process goes to access a lock, if it’s available it’s uncontended
what advantage to spinlocks have?
although the process is “spinning” waiting for a lock to become available, it does not have to context switch which has upside
what is a semaphore?
a general purpose primitive that allows solving synchronization problems. a binary semaphore would be a mutex lock for example
what are monitors?
monitors are a wrapper around things like semaphores that basically handle things like requesting and releasing