Skip to content

Instantly share code, notes, and snippets.

@wm3
wm3 / gist:3768533
Created September 23, 2012 02:00
The Art of Multiprocessor Programming 読書会 第四回 七章後半

7.6 A Queue Lock with Timeouts

tryLock() の実装をしたい

  • BackoffLock では簡単
  • queue lock での実装は難しい

タイムアウト付 CLHLock (図7.15、7.16)

  • 構成
  • QNode#pred フィールド
tdd
@wm3
wm3 / gist:3329008
Created August 12, 2012 02:09
Art of Multiprocessor Programming 読書会 第二回 四章後半

4.2 Register Constructions – レジスタの構築

全てのタイプのレジスタは計算可能性の面では同じということをこの節で説明

  • レジスタ構築の流れ(図4.5)

コーディングルールの解説

  • 整合性の特性をフィールド名の prefix で表現: safe なら (s_), regular なら (r_), atomic なら (a_)
@wm3
wm3 / amp1-1.md
Created July 4, 2012 17:38
Art of Multiprocessor Programming 読書会 第一回 一章前半

1 Introduction ― イントロダクション

この本のフォーカス

  • 共有メモリ上のコミュニケーションを通じた、
  • 複数プロセッサのプログラミング

非同期処理の難しい所

  • 何の前触れも無く中断されたり遅くなったりして予測できない
  • 本書では原則と実践の両面から解説をする