17. Synchronization Without Locks

  Рет қаралды 31,925

MIT OpenCourseWare

MIT OpenCourseWare

4 жыл бұрын

MIT 6.172 Performance Engineering of Software Systems, Fall 2018
Instructor: Charles Leiserson
View the complete course: ocw.mit.edu/6-172F18
KZbin Playlist: • MIT 6.172 Performance ...
Prof. Leiserson discusses non-lock synchronization using memory models, Peterson's algorithm, instruction reordering, and hardware reordering. He discusses the compare-and-swap operation; lock-free stacks, pushes, and pops; and the ABA problem.
License: Creative Commons BY-NC-SA
More information at ocw.mit.edu/terms
More courses at ocw.mit.edu

Пікірлер: 25
@leixun
@leixun 3 жыл бұрын
*My takeaways:* 1. Memory model: sequential consistency 0:49 2. Mutual exclusion without locks 12:28 3. Relaxed memory consistency 34:16: never synchronize program through memory 4. Compare and swap 1:06:54 5. Lock free algorithm 1:18:15
@parzer0
@parzer0 4 жыл бұрын
Nice and clear. No pauses in between topics and slides. Excellent flow of information thats easily interpreted! Well done Prof!
@karthikeyans3
@karthikeyans3 3 жыл бұрын
Very good lecture to get the idea of Memory models and an intro to Lock-free algorithms.
@isbestlizard
@isbestlizard 2 жыл бұрын
This is a really good course, up there with 6.021 with Erik Demaine!
@bhagyalakshmi1053
@bhagyalakshmi1053 Жыл бұрын
How to storage working memory handle per files containers and how many for you containers also hear how to for handling
@tetraphobie
@tetraphobie 3 ай бұрын
53:30 In TSO, I think in rule (4), a LOAD may be reordered with a STORE to the the same location, too, if they happen on different cores of a multi-core CPU (so the write buffers are different and the order-preserving load bypass does not trigger). Otherwise, the suggested ordering on slide 29 would be impossible. Took me a while to realize this nuance. Another source I found seems to confirm it, though I'm still not 100% sure this explanation is fully correct.
@bhagyalakshmi1053
@bhagyalakshmi1053 Жыл бұрын
Nice 👍 database explain popular thank you this position on summer collection
@chrise202
@chrise202 2 жыл бұрын
53:55 Oops.. :D I do think he actually used the convention . The student was right to point there was a mistake in the diagram where Load3 is Before Store3, and Load4 is before Store4 thus violating rule 4.
@martijncourteaux
@martijncourteaux Жыл бұрын
No, he's just numbering the stores and loads. The load3 and store3 just happen to be the third of their kind, and are in this example to be thought of as a load and store to different memory locations.
@planetis-m6066
@planetis-m6066 3 жыл бұрын
RESPECT to the processors order.
@abdullahalmosalami2373
@abdullahalmosalami2373 Жыл бұрын
What I'm not feeling great about is why is there a linear order? Isn't it assumed that the separate processor instructions are run CONCURRENTLY? Isn't that what the word means!
@cnc-ua
@cnc-ua 4 жыл бұрын
Great example/proof performance=currency. To get this course listen you had to pay $$$ to be sitting in a class in Fall 2018 instead of getting it for free a year later :))
@Paul-fn2wb
@Paul-fn2wb 4 жыл бұрын
You get much more than just learning materials being in a class. Professors, TAs, peers, labs, exams. All are extremely important for effective learning. It takes a lot of determination to achieve the same level of quality on your own. If you have a chance to get into a good school, don't hesitate it. It's definitely worth it.
@bhagyalakshmi1053
@bhagyalakshmi1053 Жыл бұрын
Execution order 🚚 changes.
@magno5157
@magno5157 2 жыл бұрын
1:12:58 Why is the race condition on the variable result??? The variable result is a local variable! Every thread has a separate instance of result! OTOH, myArray has external linkage, and that's the only variable in the example that's possibly shared across threads.
@guidomartinez5099
@guidomartinez5099 2 жыл бұрын
In Cilk, result is actually shared. It's not like pthreads.
@magno5157
@magno5157 2 жыл бұрын
@@guidomartinez5099 Oh, that's just unusual.
@phone_tube
@phone_tube 4 жыл бұрын
Need to know what was said at @40.00
@davinciclone7277
@davinciclone7277 4 жыл бұрын
I think it was like this: Teacher: When is it safe to do this reordering? Student: If A equals B, but if you already have the value 1 in A/B. Just to be clear, that's why the teacher said, "But more generally when is it safe", because this is very specific to the value of A, and I think that the only part that would have been able to figure that out is the compiler, if the data is not dynamic.
@bhagyalakshmi1053
@bhagyalakshmi1053 Жыл бұрын
A and b one group
@bhagyalakshmi1053
@bhagyalakshmi1053 Жыл бұрын
Hack,try hack, dictionary checking, story buffer
@ProfessorWaltherKotz
@ProfessorWaltherKotz Жыл бұрын
The C++11 standard, not the C11 standard...
@EngSamieh
@EngSamieh Жыл бұрын
In both en.m.wikipedia.org/wiki/C11_(C_standard_revision)
@bhagyalakshmi1053
@bhagyalakshmi1053 Жыл бұрын
(pf,coie cookies po files) Tomorrow meeting "good night "professor thanks for explaining. Laughing to pariyon class explaining master. 🗃️
18. Domain Specific Languages and Autotuning
1:11:22
MIT OpenCourseWare
Рет қаралды 9 М.
8. Analysis of Multithreaded Algorithms
1:17:34
MIT OpenCourseWare
Рет қаралды 26 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 116 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 58 МЛН
Slow motion boy #shorts by Tsuriki Show
00:14
Tsuriki Show
Рет қаралды 3,4 МЛН
ТАМАЕВ УНИЧТОЖИЛ CLS ВЕНГАЛБИ! Конфликт с Ахмедом?!
25:37
21. Tuning a TSP Algorithm
1:20:53
MIT OpenCourseWare
Рет қаралды 9 М.
Compare and Swap in Java
24:21
Jakob Jenkov
Рет қаралды 15 М.
9. What Compilers Can and Cannot Do
1:18:46
MIT OpenCourseWare
Рет қаралды 75 М.
k-mer algorithms: Compare and Swap
5:15
RobEdwards
Рет қаралды 16 М.
1. Introduction and Matrix Multiplication
1:00:21
MIT OpenCourseWare
Рет қаралды 191 М.
Michael Scott - Nonblocking data structures. Part 1.
1:27:59
Uh-oh, It's I/O Ordering! - Will Deacon, Arm
37:58
The Linux Foundation
Рет қаралды 4,2 М.
4. Assembly Language & Computer Architecture
1:17:35
MIT OpenCourseWare
Рет қаралды 699 М.
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 116 МЛН