Interlocked Operations
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next timestamp
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu and Index Controls

a
w
s
d
h j k l


Esc Close menu / unfocus timestamp

Quotes and References Menus and Index

Enter Jump to timestamp

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
2:33Blackboard: Thread Synchronization / Communication
2:33Blackboard: Thread Synchronization / Communication
2:33Blackboard: Thread Synchronization / Communication
3:31Blackboard: Processes
3:31Blackboard: Processes
3:31Blackboard: Processes
4:08Blackboard: Threads
4:08Blackboard: Threads
4:08Blackboard: Threads
5:22Blackboard: Problem #1 - Knowing what work to do
5:22Blackboard: Problem #1 - Knowing what work to do
5:22Blackboard: Problem #1 - Knowing what work to do
7:05Blackboard: Problem #2 - Sync / When work is done / visible
7:05Blackboard: Problem #2 - Sync / When work is done / visible
7:05Blackboard: Problem #2 - Sync / When work is done / visible
11:15Blackboard: Conceptualising how threads work
11:15Blackboard: Conceptualising how threads work
11:15Blackboard: Conceptualising how threads work
12:34Blackboard: Doing a busy-wait loop
12:34Blackboard: Doing a busy-wait loop
12:34Blackboard: Doing a busy-wait loop
16:19Blackboard: Preventing multiple threads from doing the same work
16:19Blackboard: Preventing multiple threads from doing the same work
16:19Blackboard: Preventing multiple threads from doing the same work
18:57Blackboard: x64 provides special instructions
18:57Blackboard: x64 provides special instructions
18:57Blackboard: x64 provides special instructions
19:46Blackboard: "locked exchange"
19:46Blackboard: "locked exchange"
19:46Blackboard: "locked exchange"
24:00Blackboard: "interlocked compare exchange"
24:00Blackboard: "interlocked compare exchange"
24:00Blackboard: "interlocked compare exchange"
26:51Put on the Pig Hat
26:51Put on the Pig Hat
26:51Put on the Pig Hat
28:43Blackboard: Being slyfox with the other primitivesα
28:43Blackboard: Being slyfox with the other primitivesα
28:43Blackboard: Being slyfox with the other primitivesα
30:02Blackboard: "reads and writes" in a multithreaded context
30:02Blackboard: "reads and writes" in a multithreaded context
30:02Blackboard: "reads and writes" in a multithreaded context
31:56Blackboard: cache lines
31:56Blackboard: cache lines
31:56Blackboard: cache lines
39:34Take off the Pig Hat and open the code
39:34Take off the Pig Hat and open the code
39:34Take off the Pig Hat and open the code
40:17win32_handmade.cpp: Make four threads that do different work
40:17win32_handmade.cpp: Make four threads that do different work
40:17win32_handmade.cpp: Make four threads that do different work
42:41Run Handmade Hero
42:41Run Handmade Hero
42:41Run Handmade Hero
42:57Make the threads look for work to do
42:57Make the threads look for work to do
42:57Make the threads look for work to do
48:51Run and inspect the debug output
48:51Run and inspect the debug output
48:51Run and inspect the debug output
50:17Moment of realisation: You need to let ThreadInfo values persist
50:17Moment of realisation: You need to let ThreadInfo values persist
50:17Moment of realisation: You need to let ThreadInfo values persist
51:38Inspect the output
51:38Inspect the output
51:38Inspect the output
52:32Explain what's happening
52:32Explain what's happening
52:32Explain what's happening
54:50The writes to EntryCount are not in order
54:50The writes to EntryCount are not in order
54:50The writes to EntryCount are not in order
57:04The reads are not in order
57:04The reads are not in order
57:04The reads are not in order
58:14Q&A
🗩
58:14Q&A
🗩
58:14Q&A
🗩
58:40tenbroya Is your use of "for (;;)" instead of "while(1)" a stylistic choice or is there a benefit / drawback I'm missing?
🗪
58:40tenbroya Is your use of "for (;;)" instead of "while(1)" a stylistic choice or is there a benefit / drawback I'm missing?
🗪
58:40tenbroya Is your use of "for (;;)" instead of "while(1)" a stylistic choice or is there a benefit / drawback I'm missing?
🗪
1:00:17gasto5 What's the problem with not being interlocked and seeing the same value, as your "TODO" suggests?
🗪
1:00:17gasto5 What's the problem with not being interlocked and seeing the same value, as your "TODO" suggests?
🗪
1:00:17gasto5 What's the problem with not being interlocked and seeing the same value, as your "TODO" suggests?
🗪
1:02:39Blackboard: Why two threads did the same work
1:02:39Blackboard: Why two threads did the same work
1:02:39Blackboard: Why two threads did the same work
1:05:29quikligames Do mutexes that I've seen used for multithreaded code in other places rely on those interlocking instructions, or are they something completely different?
🗪
1:05:29quikligames Do mutexes that I've seen used for multithreaded code in other places rely on those interlocking instructions, or are they something completely different?
🗪
1:05:29quikligames Do mutexes that I've seen used for multithreaded code in other places rely on those interlocking instructions, or are they something completely different?
🗪
1:06:23emanresuon What is your opinion on lockless queues?
🗪
1:06:23emanresuon What is your opinion on lockless queues?
🗪
1:06:23emanresuon What is your opinion on lockless queues?
🗪
1:08:18sedihglow What's the point of an infinite loop to begin with? It ends at some point, doesn't it?
🗪
1:08:18sedihglow What's the point of an infinite loop to begin with? It ends at some point, doesn't it?
🗪
1:08:18sedihglow What's the point of an infinite loop to begin with? It ends at some point, doesn't it?
🗪
1:08:46my_twitch_sn What threading libraries do you recommend and why (e.g. boost or pthreads)?
🗪
1:08:46my_twitch_sn What threading libraries do you recommend and why (e.g. boost or pthreads)?
🗪
1:08:46my_twitch_sn What threading libraries do you recommend and why (e.g. boost or pthreads)?
🗪
1:09:37lavisan What's better: a job scheduler from where each thread can get a job, or separate queues for each thread?
🗪
1:09:37lavisan What's better: a job scheduler from where each thread can get a job, or separate queues for each thread?
🗪
1:09:37lavisan What's better: a job scheduler from where each thread can get a job, or separate queues for each thread?
🗪
1:10:45Blackboard: "Single producer / Single consumer" vs "Single producer / Multiple consumer"
1:10:45Blackboard: "Single producer / Single consumer" vs "Single producer / Multiple consumer"
1:10:45Blackboard: "Single producer / Single consumer" vs "Single producer / Multiple consumer"
1:14:39pseudonym73 I think that the point of "lockless" is that it doesn't use an operating system-level lock
🗪
1:14:39pseudonym73 I think that the point of "lockless" is that it doesn't use an operating system-level lock
🗪
1:14:39pseudonym73 I think that the point of "lockless" is that it doesn't use an operating system-level lock
🗪
1:14:55Blackboard: "lock free"
1:14:55Blackboard: "lock free"
1:14:55Blackboard: "lock free"
1:16:46rygorous Hey Casey, an InterlockedIncrement is a lock-free operation! (The terminology is shitty. The original term is "non-blocking" which is more useful)
🗪
1:16:46rygorous Hey Casey, an InterlockedIncrement is a lock-free operation! (The terminology is shitty. The original term is "non-blocking" which is more useful)
🗪
1:16:46rygorous Hey Casey, an InterlockedIncrement is a lock-free operation! (The terminology is shitty. The original term is "non-blocking" which is more useful)
🗪
1:17:40gasto5 Is it reasonable to synchronize the receiving of network packets on one synchronized thread?
🗪
1:17:40gasto5 Is it reasonable to synchronize the receiving of network packets on one synchronized thread?
🗪
1:17:40gasto5 Is it reasonable to synchronize the receiving of network packets on one synchronized thread?
🗪
1:19:16cubercaleb Later in the development cycle, will you go over threading for other operating systems like Mac and Linux?
🗪
1:19:16cubercaleb Later in the development cycle, will you go over threading for other operating systems like Mac and Linux?
🗪
1:19:16cubercaleb Later in the development cycle, will you go over threading for other operating systems like Mac and Linux?
🗪
1:19:45rc1290 What are the advantages of having a queue of jobs, instead of creating a thread every time you add a job?
🗪
1:19:45rc1290 What are the advantages of having a queue of jobs, instead of creating a thread every time you add a job?
🗪
1:19:45rc1290 What are the advantages of having a queue of jobs, instead of creating a thread every time you add a job?
🗪
1:20:04Blackboard: Overlap vs Performance
1:20:04Blackboard: Overlap vs Performance
1:20:04Blackboard: Overlap vs Performance
1:24:50Recap and glimpse into the future
🗩
1:24:50Recap and glimpse into the future
🗩
1:24:50Recap and glimpse into the future
🗩
1:28:08Close things down
🗩
1:28:08Close things down
🗩
1:28:08Close things down
🗩