Skip to content

Instantly share code, notes, and snippets.

@keisuke-umezawa
Last active September 19, 2017 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keisuke-umezawa/24acbe0306e3d3046bcad0eee23935f0 to your computer and use it in GitHub Desktop.
Save keisuke-umezawa/24acbe0306e3d3046bcad0eee23935f0 to your computer and use it in GitHub Desktop.
The Art Multiprocessor Programming

1.0 Introduction

  • Multicore processor 時代の到来
    • Mooreの法則は繰り返されない
    • ソフトウェア開発者は自分で並列化しないといけない
  • この本はshared memoryで通信するmultiprocessorでのプログラミングについて語る(shared-memory multiprocessors)
    • 1st part(principle)
      1. comutability
      2. concurrent program
      3. program corectness
    • 2nd part(practice)
      1. performance
      2. shared objects and tools

1.1 Shared Objects and Synchronization

  • atomic性がないとだめだよねという話

1.2 A Fable

1.2.1 Properties of Mutual exclusion

  • mutual exclusion
  • deadlock free
  • starvation free
  • waiting

1.2.2 The Moral

  • Transient
    • ちゃんと伝わるか
    • 同時に通信に参加しなくても良いか
  • Persistent
    • 継続的にsignalを出し続けるか
  • 缶を落とす方法はinterruptsで大量のbitが必要

1.3 The Procucer-Consumer Problem

  • プロトコル
    • Alice
      1. 缶がdownまで待つ
      2. ペットを放つ
      3. ペットが戻ってきたら餌がないかcheckし、缶をup
    • Bob
      1. 缶がupまで待つ
      2. 庭に餌を置く
      3. 缶をdown
  • 満たすproperty
    1. mutual exclusion
    2. producer-consumer
  • 満たさないproperty
    1. starvation free
    2. waiting

1.4 The Readers-Writers Problem

  • readerが全文読み終わっていないのにwriterが書き換えてしまう問題
  • mutual exclusionでもprocuder-consumerでもwatingが発生してしまう

1.5 The Harsh Realities of Parallelization

  • Amdahl's Law

1.6 Parallel Programming

  • どこを並列化すればいいかはわからない
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment