Critical Sections Flashcards
1
Q
What is a Race Condition?
A
A race condition is a event where the outcome of two concurrently running processes
depends on the order in which their operations are interleaved, sometimes
leading to incorrect outcomes.
2
Q
What is a Critical Section
A
A critical section is code that accesses some shared resource and that needs to be
run as if indivisibly to not allow another process to access the resource.
The code inside a critical section, if not protected, leads to race conditions.