Mercurial > hg > Papers > 2017 > mitsuki-thesis
comparison final_pre/finalPre.tex @ 14:4c3b39b281eb
update
author | mir3636 |
---|---|
date | Wed, 15 Feb 2017 21:48:16 +0900 |
parents | cc8ff782067c |
children | 11058e51adb7 |
comparison
equal
deleted
inserted
replaced
13:ddfca5037e41 | 14:4c3b39b281eb |
---|---|
130 \end{center} | 130 \end{center} |
131 \caption{Gears OS の構成図} | 131 \caption{Gears OS の構成図} |
132 \label{fig:gearsos} | 132 \label{fig:gearsos} |
133 \end{figure} | 133 \end{figure} |
134 | 134 |
135 \section{Context} | |
136 Gears OS では Context と呼ばれる接続可能な Code/Data Gear のリスト、Temporal Data Gear のためのメモリ空間等を持っている Meta Data Gear である。 | |
137 Gears OS は必要な Code/Data Gear に参照したい場合、この Context を通す必要がある。 | |
138 メインとなる Context と Worker 用の Context がある。 | |
139 Temporal Data Gear のためのメモリ空間は Context 毎に異なり、互いに干渉することはできない。 | |
135 | 140 |
141 Context は Task でもあり、TaskManager によって Context が生成され CPUWorker へ送られる。 | |
142 Worker に渡された Task である Context の Input/Output Data Gear の依存関係が解決されたものから並列実行される。 | |
136 | 143 |
144 \section{interface の記述} | |
145 interface を記述することで Context から Code Gear が呼び出せるようになった。 | |
146 create は関数呼び出しで呼び出され、interface と impliment の初期化と Code Gear のポインタの設定を行う。 | |
147 return で interface を返し、その先で interface で指定した Code Gear へ継続できるようになった。 | |
148 | |
149 \section{Gearef、GearImpl} | |
150 Context には Allocation 等で生成した Data Gear へのポインタが格納されている。 | |
151 Code Gear が Context にアクセスする際、ポインタを使用してデータを取り出すためコードが煩雑になってしまう。 | |
152 そこで Code Gear がデータを参照するための Gearef というマクロを定義した。 | |
153 Gearef に Context と型を渡すことでデータの参照が行える。 | |
154 また impliment を参照する際も、ポインタでの記述が複雑になってしまうため 同様に GearImpl を定義した。 | |
155 GearImpl は Context と interface 名、interface の変数名を指定して参照する。 | |
156 | |
157 \section{stub Code Gear} | |
158 Code Gear が必要とする Data Gear を取り出す際に Context を通す必要がある。 | |
159 しかし、Context を直接扱うのはセキュリティ上好ましくない。 | |
160 そこで Context から必要なデータを取り出して Code Gear に接続する stub Code Gear を定義し、これを介して間接的に必要な Data Gear にアクセスする。 | |
161 stub Code Gear は Code Gear が Code Gear へと継続する間に挟まれる。 | |
162 必要とする Data Gear を Context から取り出すという処理を行うものである。 | |
163 stub Code Gear は Code Gear 毎に生成される。 | |
164 | |
165 \section{Context, stub の自動生成} | |
166 Gears OS では通常の Computation の他に Context や stub などの Meta Computation を記述する必要がある。 | |
167 Gears OS を現在の CbC の機能のみを用いて記述すると Context や stub Code Gear の記述を行わなくてはならず、これには多くの労力を要する。 | |
168 そのため、この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。 | |
137 | 169 |
138 | 170 |
139 \nocite{*} | 171 \nocite{*} |
140 \bibliographystyle{junsrt} | 172 \bibliographystyle{junsrt} |
141 \bibliography{reference} | 173 \bibliography{reference} |