-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes.txt
52 lines (40 loc) · 1017 Bytes
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Myths programmers believe about cpu caches:
https://software.rajivprab.com/2018/04/29/myths-programmers-believe-about-cpu-caches/
Pushing the limits of windows:
https://techcommunity.microsoft.com/t5/windows-blog-archive/pushing-the-limits-of-windows-physical-memory/ba-p/723674
1024Cores
http://www.1024cores.net/
volatile (c++) -> optimization prevention -> memory mapped IO
volatile (C#) -> ensures volatile writes are observed and preventing stale reads
volatile int my_value = 0;
volatile bool has_changed = false;
void ChangValue(int new_value)
{
// volatile prevents compiler from re-ordering
// those assignments.
my_value = new_value;
has_changed = true;
}
int ReadValue()
{
while (!has_changed) {}
return my_value;
}
Basic:
Mutex/Locks
Interrupts
Memory Barrier
WinAPI:
Event Objects
Overlapped IO / IO Completion Ports / IO Completion Notification
Linux:
AsioAPI
C#:
ManualResetEvent
Semaphore
Monitor
Interlocked Operations
Java:
Semaphore
CountDownLatch
CyclicBarrier