Synchronisation Flashcards
What is the critical section problem?
Ensuring that when multiple processes access shared data, only one is in its critical section at a time.
What are the three requirements of a critical section solution?
Mutual exclusion, Progress, Bounded waiting.
What is Peterson’s algorithm used for?
A software solution to the critical section problem for two processes.
What is a mutex lock?
A synchronization primitive used to enforce mutual exclusion.
What is busy waiting?
A situation where a process continually checks for a condition instead of sleeping.
What is a semaphore?
An integer variable used for signaling among processes with atomic wait() and signal() operations.
Difference between counting and binary semaphores?
Counting semaphores have unrestricted value; binary semaphores are 0 or 1.
What is deadlock?
A situation where two or more processes wait indefinitely for each other to release resources.
What is starvation?
When a process waits indefinitely to access a resource because other processes are constantly prioritized.
What is a monitor?
A high-level abstraction that provides a convenient and safe mechanism for process synchronization.