Previous | Next --- Slide 17 of 66
Back to Lecture Thumbnails
sirah

For anyone interested, Peterson's algorithm is a lock implementation that does not require atomic hardware operations under the hood and only relies on the shared memory.

ccheng18

So in my understanding, a single assembly instruction is considered atomic? How does data forwarding, stalling, and bubbling up support or affect this, if at all?

jkuro

helpful analogy from lecture: a Bus is like shouting in a room. this means that everybody hears everything and nobody shouts at the same time.

pranil

The locks that we have implemented in this lecture seem to use spinning as a method of checking if the lock is acquired. Isn't this sub-optimal? Shouldn't a thread sleep (be context-switched out) while some other thread ahs held the lock?

Please log in to leave a comment.