Mercurial > hg > Members > innparusu > slides
comparison 2017/2017_11_28/slide.md @ 29:791013bd4429
Update
author | Tatsuki IHA <innparusu@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 09 Jan 2018 15:22:00 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
28:382cd93f2a60 | 29:791013bd4429 |
---|---|
1 title: Gears OS による並列処理 | |
2 author: Tatsuki IHA | |
3 profile: | |
4 lang: Japanese | |
5 code-engine: coderay | |
6 | |
7 ## 研究目的 | |
8 - 当研究室では 処理の単位を Code Gear、 データの単位を Data Gear を用いて 信頼性が高い並列処理を行う Gears OS を開発している | |
9 - Gears OS では Task を Code Gear と実行するときに必要な Input Data Gear と出力するための Output Data Gear の組で表現される。 Input Data Gear/Output Data Gear によって依存関係が決定し、それにそって並列実行を行う. | |
10 - 信頼性の確保はモデルチェック、検証等を使用して行う。この信頼性のための計算は通常の計算とは別の階層のメタ計算として記述する。 | |
11 - また、 メタ計算は信頼性の他に CPU, GPU などの実行環境の切り替え, データ拡張等の柔軟性を提供する。 | |
12 - 本研究では、 Gears OS の並列処理機構の実装を行う。また、並列処理の検証をメタ計算として記述することで、 並列処理の信頼性を保証する。 | |
13 | |
14 ## 今週 | |
15 - SynchronizedQueue を cas inteface を使うように変更 | |
16 - 「線形時相論理を用いた Continuation based C プログラムの検証」論文よみ | |
17 - DPP のコード読み(memory, state_db) | |
18 - dalmoreの件 | |
19 | |
20 ## SynchronizedQueue の書き換え | |
21 - CAS は atomic->checkAndSet を使うように変更 | |
22 - perl script を書き換えて,元々引数でしか goto interface->method が出来ない所を, local 変数にも出来るように対応しました | |
23 | |
24 ``` cbc | |
25 __code putSynchronizedQueue(struct SynchronizedQueue* queue, union Data* data, __code next(...)) { | |
26 Element* element = new Element(); | |
27 element->data = data; | |
28 element->next = NULL; | |
29 Element* last = queue->last; | |
30 Element* nextElement = last->next; | |
31 if (last != queue->last) { | |
32 goto meta(context, C_putSynchronizedQueue); | |
33 } | |
34 if (nextElement == NULL) { | |
35 struct Atomic* atomic = queue->atomic; | |
36 goto atomic->checkAndSet(&last->next, nextElement, element, next(...), putSynchronizedQueue); | |
37 } else { | |
38 struct Atomic* atomic = queue->atomic; | |
39 goto atomic->checkAndSet(&queue->last, last, nextElement, putSynchronizedQueue, putSynchronizedQueue); | |
40 } | |
41 } | |
42 | |
43 __code takeSynchronizedQueue(struct SynchronizedQueue* queue, __code next(union Data* data, ...)) { | |
44 struct Element* top = queue->top; | |
45 struct Element* last = queue->last; | |
46 struct Element* nextElement = top->next; | |
47 if (top != queue->top) { | |
48 goto meta(context, C_takeSynchronizedQueue); | |
49 } | |
50 if (top == last) { | |
51 if (nextElement != NULL) { | |
52 struct Atomic* atomic = queue->atomic; | |
53 goto atomic->checkAndSet(&queue->last, last, nextElement, takeSynchronizedQueue, takeSynchronizedQueue); | |
54 } | |
55 } else { | |
56 struct Atomic* atomic = queue->atomic; | |
57 goto atomic->checkAndSet(&queue->top, top, nextElement, takeSynchronizedQueue1, takeSynchronizedQueue); | |
58 } | |
59 goto meta(context, C_takeSynchronizedQueue); | |
60 } | |
61 ``` |