2010-03-01から1ヶ月間の記事一覧

Principles of Concurrent and Distributed Programming

Chapter 4 Semaphores 4.1 Introduction セマフォについて論議する。 Wait(S) : Sが0以上の場合、Sをデクリメントする。それ以外のとき、waitを実行したプロセスを一時停止する。 Signal(S) : このセマフォによって一時停止させられているプロセスがあった場…

Principles of Concurrent and Distributed Programming

Chapter3 The Mutual Exclusion Problem 3.1 Introduction Mutexの実装方法について議論する 1. Critical_Sections の中の処理は2プロセス以上にinterleavedされてはならない(同時に実行されてはならない) 2. Critical_Sectionは??(英語が読めない…) 3. …

Principles of Concurrent and Distributed Programming

Chapter2 The Concurrent Programming Abstraction 2.1 Introduction ok 2.2 Interleaving 処理時間が違っても、処理順番が同じであれば同じと考える。 システムの処理速度は時とともに変わってしまうので、それで動かなくなっては困るため。 どのようなInte…

Principles of Concurrent and Distributed Programming

Principles of Concurrent and Distributed Programming (Prentice-Hall International Series in Computer Science)作者: M. Ben-Ari出版社/メーカー: Addison Wesley発売日: 2006/02/24メディア: ペーパーバック クリック: 14回この商品を含むブログ (3件)…

Onlisp

19章「クエリコンパイラ」 19.1 データベース ok 19.2 パターンマッチングクエリ ok 19.3 クエリインタプリタ かなり複雑な再帰だ 19.4 束縛に関する制限 notの挙動が今ひとつわからない。 19.5 クエリコンパイラ やべー鬼難しい。 とりあえず読み飛ばす。後…

sbclのrun-processで、process-outputが読めなくなる

(defun read-all (output-stream) (if (null output-stream) "" (with-output-to-string (lines) (awhile (read-line output-stream nil nil) (format lines "~a~%" it))))) (defun execute (command &key (wait t)) (destructuring-bind (program &rest arg…

Onlisp

18章「分配」 18.1リストに対する分配 ok 18.2他の構造 > (dbind (a b c) #(1 2 3) (list a b c)) (1 2 3) > (dbind (a (b c) d) '( 1 #(2 3) 4) (list a b c d)) (1 2 3 4) > (dbind (a (b . c) &rest d) '(1 "fribble" 2 3 4) (list a b c d)) (1 #\f "rib…

Onlisp

15章 関数を返すマクロ 15.1 関数の構築 引数ひとつだし、あまり強力でない気がする。 mapなどに使うのにはいいかもしれない。 ok 15.2 Cdr部での再帰 (defmacro alrec (rec &optional base) "cltl2 version" (let ((gfn (gensym))) `(lrec #'(lambda (it ,g…

Onlisp

13章「コンパイル時の計算処理」 新しいユーティリティー この例は微妙な気がする。 Bezier曲線 定数値が与えられるなら、コンパイル時に計算を移せる。 普通ならコンパイラがやる機能を人間ができる。 ok 14章「アナフォリックマクロ」 アナフォリックな変…