Chapter 20 Programming Multi-core CPUs
by Motohiro Takayama
1. Scalability
1.1. Small message, Large Workset
1.1.1. qsort
1.1.1.1. larger message
1.1.1.2. smaller workset
1.1.2. fib
1.1.2.1. smaller message
1.1.2.2. larger workset
2. Example
2.1. pmap
2.1.1. 他にもやり方はある
2.1.2. 粒度を調節できるようにしとくとか
2.2. Map Reduce
2.2.1. Google の並列基盤
2.2.2. File System の indexer をつくるよ
3. Motivation
3.1. There is No more Free lunch in CPU serial performance
3.1.1. Ex. Sun/Intel -> 32 cores
3.2. go multi/many cores
4. How
4.1. use many processes
4.1.1. spawn / send/receive
4.1.2. not too many
4.1.2.1. just enough
4.1.2.2. えー
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. 偶数/奇数でプロセスに分けるなど