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

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

What is it called when two processes try to write a shared variable at the same time?

A

Race condition

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

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

How is a race condition caused?

A

Processor reading a shared variable while the other writes to it.

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