Chapter 20 Programming Multi-core CPUs

Get Started. It's Free
or sign up with your email address
Rocket clouds
Chapter 20 Programming Multi-core CPUs by Mind Map: Chapter 20 Programming Multi-core CPUs

1. Motivation

1.1. There is No more Free lunch in CPU serial performance

1.1.1. Ex. Sun/Intel -> 32 cores

1.2. go multi/many cores

2. How

2.1. use many processes

2.1.1. spawn / send/receive

2.1.2. not too many

2.1.2.1. just enough

2.1.2.2. えー

3. Scalability

3.1. Small message, Large Workset

3.1.1. qsort

3.1.1.1. larger message

3.1.1.2. smaller workset

3.1.2. fib

3.1.2.1. smaller message

3.1.2.2. larger workset

4. Example

4.1. pmap

4.1.1. 他にもやり方はある

4.1.2. 粒度を調節できるようにしとくとか

4.2. Map Reduce

4.2.1. Google の並列基盤

4.2.2. File System の indexer をつくるよ

5. Pitfalls

5.1. Side Effects

5.1.1. ふつうは Shared Memory による同期

5.1.2. Erlang には shared memory ない

5.1.3. それでも shared resource はある

5.1.3.1. Ex. ETS

5.1.3.2. use `private` to serialize it

5.2. Sequential Bottlenecks

5.2.1. Change Algorithms would work

5.2.2. Ex. Distributed Ticket-Boarding System

5.2.2.1. ふつうにやると直列

5.2.2.2. 偶数/奇数でプロセスに分けるなど