P3L4: Synchronization Constructs Flashcards

1
Q
  1. Synchronization Constructs Visual Metaphor
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

difference between mutex and spinlock

A

The fundamental difference between spinlock and mutex is that spinlock keeps checking the lock (busy waiting), while mutex puts threads waiting for the lock into sleep (blocked). A busy-waiting thread wastes CPU cycles, while a blocked thread does not.

https://attractivechaos.wordpress.com/2011/10/06/multi-threaded-programming-efficiency-of-locking/

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

Spinlocks

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

High contention

A

The processor go to memory on each spin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. Cache Coherence
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Spinlock Delay Alternatives
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what problem they’re setting up

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

and how they approach it

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