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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly