changeset 14:4c3b39b281eb

update
author mir3636
date Wed, 15 Feb 2017 21:48:16 +0900
parents ddfca5037e41
children 1ba7fa1773d9
files final_main/chapter3.tex final_pre/finalPre.pdf final_pre/finalPre.tex final_pre/reference.bib
diffstat 4 files changed, 38 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/final_main/chapter3.tex	Wed Feb 15 20:32:30 2017 +0900
+++ b/final_main/chapter3.tex	Wed Feb 15 21:48:16 2017 +0900
@@ -41,7 +41,7 @@
 
 interface を記述することで Context から Code Gear が呼び出せるようになった。
 create は関数呼び出しで呼び出され、interface と impliment の初期化と Code Gear のポインタの設定を行う。
-return で interface を返し、その先で interface で指定した Code Gear へ継続できるようになった。
+return で interface を返し、その先で指定した Code Gear へ継続できるようになる。
 
 \begin{lstlisting}[frame=lrbt,label=interface,caption={interface}]
 typedef struct Stack<Impl>{    
Binary file final_pre/finalPre.pdf has changed
--- a/final_pre/finalPre.tex	Wed Feb 15 20:32:30 2017 +0900
+++ b/final_pre/finalPre.tex	Wed Feb 15 21:48:16 2017 +0900
@@ -132,8 +132,40 @@
     \label{fig:gearsos}
 \end{figure}
 
+\section{Context}
+Gears OS では Context と呼ばれる接続可能な Code/Data Gear のリスト、Temporal Data Gear のためのメモリ空間等を持っている Meta Data Gear である。
+Gears OS は必要な Code/Data Gear に参照したい場合、この Context を通す必要がある。
+メインとなる Context と Worker 用の Context がある。
+Temporal Data Gear のためのメモリ空間は Context 毎に異なり、互いに干渉することはできない。
 
+Context は Task でもあり、TaskManager によって Context が生成され CPUWorker へ送られる。
+Worker に渡された Task である Context の Input/Output Data Gear の依存関係が解決されたものから並列実行される。
 
+\section{interface の記述}
+interface を記述することで Context から Code Gear が呼び出せるようになった。
+create は関数呼び出しで呼び出され、interface と impliment の初期化と Code Gear のポインタの設定を行う。
+return で interface を返し、その先で interface で指定した Code Gear へ継続できるようになった。
+
+\section{Gearef、GearImpl}
+Context には Allocation 等で生成した Data Gear へのポインタが格納されている。
+Code Gear が Context にアクセスする際、ポインタを使用してデータを取り出すためコードが煩雑になってしまう。
+そこで Code Gear がデータを参照するための Gearef というマクロを定義した。
+Gearef に Context と型を渡すことでデータの参照が行える。
+また impliment を参照する際も、ポインタでの記述が複雑になってしまうため 同様に GearImpl を定義した。
+GearImpl は Context と interface 名、interface の変数名を指定して参照する。
+
+\section{stub Code Gear}
+Code Gear が必要とする Data Gear を取り出す際に Context を通す必要がある。
+しかし、Context を直接扱うのはセキュリティ上好ましくない。
+そこで Context から必要なデータを取り出して Code Gear に接続する stub Code Gear を定義し、これを介して間接的に必要な Data Gear にアクセスする。
+stub Code Gear は Code Gear が Code Gear へと継続する間に挟まれる。
+必要とする Data Gear を Context から取り出すという処理を行うものである。
+stub Code Gear は Code Gear 毎に生成される。
+
+\section{Context, stub の自動生成}
+Gears OS では通常の Computation の他に Context や stub などの Meta Computation を記述する必要がある。
+Gears OS を現在の CbC の機能のみを用いて記述すると Context や stub Code Gear の記述を行わなくてはならず、これには多くの労力を要する。
+そのため、この記述を助けるために Context を生成する generate\_context と stub Code Gear を生成する generate\_stub を perl スクリプトで作成した。
 
 
 \nocite{*}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/final_pre/reference.bib	Wed Feb 15 21:48:16 2017 +0900
@@ -0,0 +1,5 @@
+@Misc{tightvnc,
+  author       = "{TightVNC Software}",
+  howpublished = "\url{http://www.tightvnc.com}"
+}
+