changeset 20:25448605ecdb

add stub
author ikkun <ikkun@cr.ie.u-ryukyu.ac.jp>
date Thu, 07 May 2020 22:53:01 +0900
parents 04d49a946e4f
children 5e2ebae9a4a7
files paper/ikkun-sigos.pdf paper/ikkun-sigos.tex paper/ikkun.bib paper/pic/model_checking.odg paper/pic/model_checking.pdf
diffstat 5 files changed, 34 insertions(+), 136 deletions(-) [+]
line wrap: on
line diff
Binary file paper/ikkun-sigos.pdf has changed
--- a/paper/ikkun-sigos.tex	Thu May 07 19:55:59 2020 +0900
+++ b/paper/ikkun-sigos.tex	Thu May 07 22:53:01 2020 +0900
@@ -76,8 +76,9 @@
 
 メタレベルから見ると、codeGearの入力は context ただ一つであり、そこから必要なノーマルレベルのdataGearを取り出して、ノーマルレベルのcodeGaerを
 呼び出す。この取り出しは stub と呼ばれる meta codeGear によって行われる。
-
-\begin{lstlisting}[frame=lrbt,label=src:cbc_example,caption={}]
+Code\ref{varargnext}は codeGear では codeGear における goto の遷移と引数を渡す例題である。
+Code\ref{varargnext2}は stub codeGear は codeGear の接続の間に挟まれる Meta Code Gear である。ノーマルレベルのcodeGear から MetadataGear である Context を直接参照してしまうと、ユーザーがメタ計算をノーマルレベルで自由に記述できてしまい、メタ計算を分離した意味がなくなってしまう。stub Code Gear はこの問題を防ぐため、Context から必要なdataGaerのみをノーマルレベルに和刺す処理を行なっている。
+\begin{lstlisting}[label=varargnext,frame=lrbt,caption={codeGear goto}]
 __code cg0(int a, int b) {
     goto cg1(a+b);
 }
@@ -86,23 +87,23 @@
     goto cg2(c);
   }
 \end{lstlisting}  
-    ノーマルレベルのcodeGaerのgoto
 
-\begin{lstlisting}[frame=lrbt,label=src:cbc_example,caption={codeGearのstub と goto}]
+\begin{lstlisting}[label=varargnext2,frame=lrbt,caption={meta codeGear stub}]
   __code popSingleLinkedStack_stub(struct
   Context* context) {
     SingleLinkedStack* stack = (
-    SingleLinkedStack*)context->data[D_Stack
-      ]->Stack.stack->Stack.stack;
-    enum Code next = context->data[D_Stack]->
+    SingleLinkedStack*)context->data[
+      D_Stack]->Stack.stack->Stack.stack;
+    enum Code next = context->data[
+      D_Stack]->
     Stack.next;
-    Data** O_data = &context->data[D_Stack]->
+    Data** O_data = &context->data[
+      D_Stack]->
     Stack.data;
-    goto popSingleLinkedStack(context, stack,
-    next, O_data);
+    goto popSingleLinkedStack(context,
+    stack,next, O_data);
     }
 \end{lstlisting}
-    メタレベルのでのcodeGaerのstub と goto meta
 
 ここでcodeGearの実行はOSの中での基本単位である必要がある。つまり、codeGearは並行処理などにより割り込まれることなく、codeGearで記述された
 通りに実行される必要がある。これは一般的には保証されない。他のcodeGearが共有された dataGearに競合的に書き込んだり、割り込みにより処理が
@@ -206,7 +207,10 @@
 検証用のサンプルプログラムとしてDining Philosohers Ploblem (以下DPP)を用いる。これは資源共有問題の1つで、次のような内容である。\\
 5人の哲学者が円卓についており、各々スパゲッティーの皿が目の前に用意されている。スパゲッィーはとても絡まっているので食べるには2本のフォークを使わないと食べれない。しかしフォークはお皿の間に一本ずつおいてあるので、円卓にフォークが5本しか用意されていない。\figref{fig}哲学者は思索と食事を交互に繰り返している。空腹を覚えると、左右のオークを手に取ろうと試み、2本のフォークを取ることに成功するとしばし食事をし、しばらくするとフォークを置いて思索に戻る。隣の哲学者が食事中でフォークが手に取れない場合は、そのままフォークが置かれるのを待つ。\\
 各哲学者を1つのプロセスとすると、この問題では5個のプロセスが並列に動くことになり、全員が1本ずつフォークを持って場合はデッドロックしていることになる。プロセスの並列実行はスケジューラによって制御することで実現する。\\
-
+以下はDPPにおける左側のフォークを取るプログラムである。
+最初に左のフォークを持たれているかどうかを確認し、いなければ自分を持ち主に登録する。
+その後 next に次に遷移する自分の状態を入れ scheduler に遷移することによって scheduler を通して次の状態に遷移する。このときscheduler からメタ計算を挟むことによって状態をMemoryTree に入れる事ができる。
+左のフォークの持ち主がいた場合は飢餓状態を登録し scheduler に遷移する事で待機状態を維持する。
 \begin{lstlisting}[frame=lrbt,label=src:cbc_example,caption={DPP}]
 
   code pickup_lfork(PhilsPtr self,
@@ -248,7 +252,9 @@
 \item Put Left fork
 \item Thinking
 \end{itemize}
-この状態は goto next によって遷移する。またこの状態遷移は無限ループするのでMemoryTree に保管し、保管されている状態とはstat DB によって保管される
+
+この状態は goto next によって遷移する。状態を遷移する際、MemoryTreeによって状態を保存する。またこの状態遷移は無限ループするのでMemoryTree に保管される。またこのMemoryTreeはスレッドの数だけあり、sutats DB によってまとめられている。
+DPPの状態遷移は6つの状態を繰り返すため、同じ状態が出た場合には終了させなければならない。そこでstate DBを用いて同じ状態を検索することで終了判定をだす。
 
 \begin{figure}[tb]
     \begin{center}
@@ -258,14 +264,9 @@
     \label{DPP_chacking}
 \end{figure}
 
-
-
-
 \nocite{*}
 \bibliographystyle{ipsjunsrt}
-\bibliography{ikkun-bib}
-
-
+\bibliography{ikkun.bib}
 
 
 \end{document}
--- a/paper/ikkun.bib	Thu May 07 19:55:59 2020 +0900
+++ b/paper/ikkun.bib	Thu May 07 22:53:01 2020 +0900
@@ -1,117 +1,14 @@
-@inbook{inbook1,
-	author =	"Knuth, D. E.",
-	title =		"Fundamental Algorithms",
-	series =	"Art of Computer Programming",
-	volume =	1,
-	chapter =	2,
-	pages =		"371--381",
-	publisher =	"Addison-Wesley",
-	address =	"Reading, Massachusetts",
-	edition =	"2nd",
-	year =		1973}
-
-@incollection{incollection1,
-	author =	"Schwartz, Aaaa Jjjj",
-	title =		"Subdividing B{\'e}zier Curves and Surfaces",
-	booktitle =	"Geometric Modeling: Algorithms and New Trends",
-	editor =	"Farin, G. E.",
-	publisher =	"SIAM",
-	address =	"Philadelphia",
-	pages =		"55--66",
-	year =		1987}
-
-@inproceedings{inproceedings1,
-	author =	"Baraff, D",
-	title =		"Curved Surfaces and Coherence for Non-penetrating
-			 Rigid Body Simulation",
-	booktitle =	"SIGGRAPH '90 Proceedings",
-	pages =		"19--28",
-	editor =	"Beach, R. J.",
-	address =	"Dallas, Texas",
-	organization =	"ACM",
-	publisher =	"Addison-Wesley",
-	year =		1990}
-
-@inproceedings{inproceedings2,
-	author =	"Hiroshi Nakashima and others",
-	title =		"OhHelp: A Scalable Domain-Decomposing Dynamic
-			 Load Balancing for Particle-in-Cell Simulations",
-	booktitle =	"Proc.\ Intl.\ Conf. Supercomputing",
-	year =		2009,
-	pages =		"90-99",
-	doi =		"http://doi.acm.org/10.1145/1542275.1542293"}
-
-@manual{manual1,
-	organization =	"Adobe Systems Inc.",
-	title =		"PostScript Language Reference Manual",
-	publisher =	"Addison-Wesley",
-	address =	"Reading, Massachusetts",
-	year =		1985}
-
-@mastersthesis{mastersthesis1,
-	author =	"山下 義行",
-	yomi =		"Yamashita, Y",
-	title =		"文脈自由文法への否定の導入",
-	school =	"筑波大学大学院工学研究科",
-	year =		1989}
-
-
-@phdthesis{phdthesis1,
-	author =	"Weihl, W.",
-	title =		"Specification and Implementation of
-			 Atomic Data Types",
-	school =	"MIT",
-	address =	"Boston",
-	year =		1984}
-
-@proceedings{proceedings1,
-	title =		"Proc. Intl. Conf. on Fifth Generation Computer
-			 Systems",
-	organization =	"Institute for New Generation Computer Technology",
-	volume =	1,
-	year =		1992}
-
-@techreport{techreport1,
-	author =	"Ihsakat Aredon",
-	title =		"{\TeX} 独稽古",
-	type =		"Seminar on Mathematical Sciences",
-	number =	13,
-	institution =	"Department of Mathematics, Keio University",
-	address =	"Yokohama",
-	year =		1989}
-
-
-@webpage{webpage1,
-	author =	"情報処理学会",
-	title =		"コンピュータ博物館設立の提言",
-	organization =	"情報処理学会",
-	url =	"http://www.ipsj.or.jp/03somu/teigen/museum200702.html",
-	refdate =	"2007-02-05"}
-
-@webpage{webpage2,
-	author =	"情報処理学会論文誌編集委員会",
-	title =		"「情報処理学会論文誌(IPSJ Journal)」原稿執筆案内",
-	organization =	"情報処理学会",
-	url="http://www.ipsj.or.jp/08editt/journal/shippitsu/ronbunJ-prms.pdf",
-	refdate =	"2010-10-28"}
-
-@webpage{webpage3,
-	author =	"Alan Kay",
-	title =		"Welcome to Squeakland",
-	organization =	"Squeakland",
-	url =	"http://www.squeakland.org/community/biography/alanbio.html",
-	refdate =	"2007-04-05"}
-
-@webpage{webpage4,
-	author =	"Hiroshi Nakashima",
-	title =		"A {WEB} Page",
-	organization =	"Kyoto University",
-	url =	"http://www.para.media.kyoto-u.ac.jp/~nakashima/a.web.page.of.long.url/",
-	refdate =	"2010-10-30"}
-
-@webpage{webpage5,
-	author =	"Hiroshi Nakashima",
-	title =		"Another {WEB} Page",
-	organization =	"Kyoto University",
-	url =	"http://www.para.media.kyoto-u.ac.jp/~nakashima/a.web.page.of.much.longer.url/",
-	refdate =	"2010-10-30"}
+@article{
+    gears,
+    author = "河野 真治 and 伊波 立樹 and  東恩納 琢偉",
+    title = "Code Gear、Data Gear に基づく OS のプロトタイプ",
+    journal = "情報処理学会システムソフトウェアとオペレーティング・システム研究会(OS)",
+    month = "May",
+    year = 2016}
+@article{
+    gears,
+    author = "宮城 光希 and 桃原 優 and  河野真治",
+    title = "Code Gear と Data Gear を持つ Gears OS の設計",
+    journal = "第59回プログラミング・シンポジウム)",
+    month = "Jan",
+    year = 2018}
Binary file paper/pic/model_checking.odg has changed
Binary file paper/pic/model_checking.pdf has changed