Concurrency synchronization Flashcards

1
Q

mutex

A

“mutual exclusion”

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

what does mutex protect

A

shared resource or code that only one thread is able to execute at a time -> critical section

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

what does every semaphore have

A

associated queue of tasks/threads

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

atomicity

A

atomic integers, etc –> need uninterruptible actions to work properly

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

what happens if there is not atomicity

A

race conditions

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

the sequence of actions that happen in cpu to manipulate data structure of lock must happen

A

atomically (not being interrupted for access by another thread)

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

thread safe

A

characteristic of block of code or data structure –> can be used concurrently by more than one thread without causing issues

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