Похожие презентации:
NT7GjGQ5EeiaEg6Thd1Wwg_35507960643911e8b7c6a1db93d4ad44_m1_t2.2
1.
Module 1: Why Use ConcurrencyTopic 2.2: Hiding Latency
2. Hiding Latency
• Concurrency can improve performance,even without parallelism
• Tasks must periodically wait for something
i.e. wait for memory
X = Y + Z
read Y, Z from memory
May wait 100+ clock cycles
• Other concurrent tasks can operate while
one task is waiting
3. Hardware Mapping
Parallel ExecutionConcurrent Execution
Task 1
Task 2
Core 1
Core 2
Task 1
Task 2
Core 1
4. Hardware Mapping in Go
• Programmer does not determine thehardware mapping
• Programmer makes parallelism possible
• Hardware mapping depends on many
factors
– Where is the data?
– What are the communication costs?
core
core
cache
cache
Shared
Mem
cache
cache
core
core