Concurrency Flashcards
1
Q
What is Concurrent vs parallel systems
A
Parallel systems run on separate processes
concurrent systems is a set of sequential programs that can be executed in parallel. Doesn’t have to be in parallel
2
Q
What is it called when two processes try to write a shared variable at the same time?
A
Race condition
3
Q
What is mutual exclusion(Mutex)?
A
When no two processes are in their critical section at the same time.
A program that prevents simultaneous access to a shared resource
4
Q
How is a race condition caused?
A
Processor reading a shared variable while the other writes to it.