Mercurial > hg > Members > innparusu > slides
comparison 2017/2017_12_19/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 - Gears のリファクタ | |
16 | |
17 ## 基本的には | |
18 - interface を使用している所を書き換え | |
19 | |
20 ``` c | |
21 taskManager->taskManager = (union Data*)task->taskManager; | |
22 taskManager->task = task; | |
23 taskManager->next = next; | |
24 goto meta(context, task->taskManager->spawn); | |
25 | |
26 ↓ | |
27 | |
28 struct TaskManager* taskManager = task->taskManager; | |
29 goto taskManager->spawn(task, next(...)); | |
30 ``` | |
31 | |
32 ## だが | |
33 - 引っかからないパターンがある | |
34 - perl script では, ``create(\w+)\((.*)\)`` みたいに実装の create が何かしらの行にないと, interface の変換がうまくいかない | |
35 - なので, ちゃんと Interface file から引数情報を取る必要あり | |
36 | |
37 ``` c | |
38 typedef struct TaskManager<Impl>{ | |
39 union Data* taskManager; | |
40 struct Context* task; | |
41 struct Context** tasks; | |
42 __code spawn(Impl* taskManager, struct Context* task, __code next(...)); | |
43 __code spawnTasks(Impl* taskManagerImpl, struct Context** tasks, __code next1(...), struct TaskManager* taskManager); | |
44 __code setWaitTask(Impl* taskManagerImpl, struct Context* task, __code next(...)); | |
45 __code shutdown(Impl* taskManagerImpl, __code next(...), struct TaskManager* taskManager, struct Queue* queue); | |
46 __code incrementTaskCount(Impl* taskManagerImpl, __code next(...)); | |
47 __code decrementTaskCount(Impl* taskManagerImpl, __code next(...)); | |
48 __code next(...); | |
49 __code next1(...); | |
50 } TaskManager; | |
51 ``` |