What's "Locality of Reference?"
nagoya.bin meetup slide.
Size: 1.24 MB
Language: en
Added: Oct 29, 2017
Slides: 27 pages
Slide Content
Locality
of
Reference
2017.10.28 NAGOYA.BIN#1 KOUJI MATSUI (@KEKYO2)
Kouji Matsui -kekyo
•NAGOYA city, AICHI pref., JP
•Twitter –@kekyo2/ Facebook
•ux-spiral corporation
•Microsoft Most Valuable Professional VS
and DevTech2015-
•Certified Scrum master / Scrum product
owner
•Center CLR organizer.
•.NET/C#/F#/IL/metaprogramming or like…
•Bike rider
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Physical side scales
The memory/IO bind at
the fixed CPU/Core
(Non configurable)
Physical side scales
The “shared cache memory” bind at the fixed
CPU/Core
(Non configurable)
Physical side scales
The “cache memory” bind at the fixed CPU/Core
(Non configurable)
The “shared cache memory” bind at the fixed
CPU/Core
(Non configurable)
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Logical side scales
Process #1
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #1
Process #2
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #11
Process #3
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Process #4
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Process #5
Virtual
Memory
Space
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
L1/L2 cache #3
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
Common value
Common value
Common value
Load/Preload
Load/Preload
These threads access
common value
Thread #1
Thread #1
Thread #1
Thread #1
Thread #21
Thread #1
Thread #1
Thread #1
Thread #1
Thread #31
Thread #1
Thread #1
Thread #1
Thread #1
Thread #41
Logical Core #4
Logical Core #3
L1/L2 cache #3
L1/L2 cache #4
L3 cache #2
NUMA node bound memory
Common value
Common value
Common value
Race condition
(Receive coherence penalty)
STRATEGY:
•Turn to immutable
•Hashed indexer
Write back
Write back
Agenda
•Physical side scales
•Logical side scales
•Data stream between physicals and logicals
•Locality of reference
•Anti-locality of reference
•Conclusion
Conclusion
The execution context bounds not THREAD. The code executor is
CPU CORE.
CPU cores have structuablenested cache system.
Cache misspenalty is large.
Cache coherencypenalty is large.
Both I/O systemstoo.
Important cache-related architecture:
◦Locality of reference
◦Immutable
Thanks join!
My blog
◦http://www.kekyo.net/
Current active project:
◦IL2C -A translator implementation of .NET intermediate language to C
language.
◦YouTube:http://bit.ly/2xtu4MH
◦GitHub:https://github.com/kekyo/IL2C