Concurrency Flashcards

1
Q

what is mutual exclusion?

A

when only one process may be executing in the critical section

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

what is lockout?

A

a process blocked from entering a critical section due to another process

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

what is starvation?

A

when a group of processes continually enters the critical section preventing others from entering the critical section

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

what is a deadlock?

A

when processes block each other indefinitely from entering the critical section

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

what is a mutex lock?

A

mutex locks protect critical sections to prevent race conditions

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

what is the difference between a contended and uncontended lock?

A

when a process goes to access a lock, if it’s available it’s uncontended

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

what advantage to spinlocks have?

A

although the process is “spinning” waiting for a lock to become available, it does not have to context switch which has upside

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

what is a semaphore?

A

a general purpose primitive that allows solving synchronization problems. a binary semaphore would be a mutex lock for example

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

what are monitors?

A

monitors are a wrapper around things like semaphores that basically handle things like requesting and releasing

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