annotate slide/thesis.pdf.html @ 28:7174f22ed695

tweak
author ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
date Thu, 10 Feb 2022 23:55:41 +0900
parents 3f39907150c5
children bca6c79006cf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 <!DOCTYPE html>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 <html>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 <head>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 <meta http-equiv="content-type" content="text/html;charset=utf-8">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 <title>GearsOSの分散ファイルシステムの設計</title>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 <meta name="generator" content="Slide Show (S9) v4.1.0 on Ruby 2.6.8 (2021-07-07) [universal.x86_64-darwin21]">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 <meta name="author" content="Takahiro Ikki, Shinji Kono" >
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 <!-- style sheet links -->
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 <link rel="stylesheet" href="s6/themes/screen.css" media="screen">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 <link rel="stylesheet" href="s6/themes/print.css" media="print">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <link rel="stylesheet" href="s6/themes/blank.css" media="screen,projection">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 <!-- JS -->
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 <script src="s6/js/jquery-1.11.3.min.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 <script src="s6/js/jquery.slideshow.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 <script src="s6/js/jquery.slideshow.counter.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 <script src="s6/js/jquery.slideshow.controls.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 <script src="s6/js/jquery.slideshow.footer.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 <script src="s6/js/jquery.slideshow.autoplay.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 <!-- prettify -->
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 <link rel="stylesheet" href="scripts/prettify.css">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 <script src="scripts/prettify.js"></script>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 <style>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 .slide {page-break-after: always;}
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 </style>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 </head>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 <body>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 <div class="layout">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 <div id="header"></div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 <div id="footer">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 <div align="right">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 <img src="s6/images/logo.svg" width="200px">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 <div class="presentation">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 <div class='slide cover'>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 <table width="90%" height="90%" border="0" align="center">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 <tr>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 <td>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 <div align="center">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 <h1><font color="#808db5">GearsOSの分散ファイルシステムの設計</font></h1>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 </td>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 </tr>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 <tr>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 <td>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 <div align="left">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 Takahiro Ikki, Shinji Kono
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
66 琉球大学理工学研究科情報工学専攻
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 </td>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 </tr>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 </table>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 <div class='slide'>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
78 <h2 id="gearsosのファイルシステムの設計と実装">GearsOSのファイルシステムの設計と実装</h2>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
80 <li>DataGearとCodeGearという単位を用いるOS</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
81 <li>従来のファイルシステムには型とTransactionが無い</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
82 <li>DataGear単位のTransactionとしてファイルシステムを設計</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
83 <li>APIとしてTake/Put/Peekを採用した</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
84 <li>通信としてもDBアクセスとしても使える(メモリからSSDへの通信に見える)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
85 <li>本研究ではsocket baseな通信とWordCountの例題を作成した</li>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 </ul>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 <div class='slide'>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
94 <h2 id="gearsosの基本単位">GearsOSの基本単位</h2>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 <ul>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
96 <li>CodeGear
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
98 <li>実行Codeの単位</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
99 <li>入力DataGearと出力DataGearを持つ</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
100 <li>goto文(jump命令)を使って遷移する</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
101 <li>実行単位は途中で割り込まれたりしない(Atmocity)</li>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 </ul>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 </li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
104 <li>DataGear
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
105 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
106 <li>Cの構造体に相当する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
107 <li>ノーマルレベルでは変更されない(関数型プログラミング)</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
108 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
109 </li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
110 <li>C言語を拡張する形でCbC言語により実装される(gcc/llvm)</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
111 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
112
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
113
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
114
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
115 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
116
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
117 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
118 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
119 <h2 id="codegearとdatagear">CodeGearとDataGear</h2>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
120 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
121 <li>InputDataGearを受け取って、CodeGearが処理し、OutputDataGearを出力する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
122 <li>OutputDataGearは次のCodeGearのInputDataGearとなる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
123 <li>ファイルシステムではDataGearをkeyで待ち合わせる</li>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 </ul>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 <div style="text-align: center;">
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
126  <img src="images/cg-dg.pdf" alt="cgdgの関係図" width="600" />
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 <div class='slide'>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 <!-- _S9SLIDE_ -->
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
135 <h2 id="gearsosのinterface">GearsOSのInterface</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
136 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
137 <li>JavaのInterfaceに相当する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
138 <li>APIとなるCodeGearの名前と型を書く(__next(…)が継続)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
139 <li>引数渡しの構造体として使う(引数はすべてここに定義される必要がある)
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
140 <pre><code>typedef struct Tree&lt;&gt;{
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
141 union Data* tree;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
142 struct Node* node;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
143 __code put(Impl* tree,Type* node, __code next(...));
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
144 __code get(Impl* tree, Type* node, __code next(...));
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
145 __code remove(Impl* tree,Type* node, __code next(...));
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
146 __code next(...);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
147 } Tree;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
148 </code></pre>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
149 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
150 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
151
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
152
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
153
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
154 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
155
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
156 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
157 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
158 <h2 id="interfaceの呼び出し">Interfaceの呼び出し</h2>
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
159 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
160 <li>createで作成する(通常の関数呼び出し)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
161 <li>DataGearとして作成する場合はnewを使う</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
162 <li>gotoでputAPIを呼び出す(nextは継続)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
163 <li>InterfaceなどのDataGearはプロセスに相当するContextにすべて格納される
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
164 <pre><code>struct Queue* queue = createSychronizedQueue(context);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
165 struct Task* task = new Task();
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
166 goto queue-&gt;put(task, next(...));
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
167 </code></pre>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
168 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
169 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
170
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
171
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
172
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
173 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
174
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
175 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
176 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
177 <h2 id="interfaceの実装">Interfaceの実装</h2>
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
178 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
179 <li>Interfaceの実装に使われるデータ構造を記述するImplementがある</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
180 <li>実装で使われるDataGearを記述する(ヒープに確保される)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
181 <li>create時にAPIを実装するCodeGearをInterfaceの構造体に代入される
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
182 <pre><code>typedef struct SynchronizedQueue &lt;&gt; impl Queue {
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
183 struct Element* top;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
184 struct Element* last;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
185 struct Atomic* atomic;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
186 } SynchronizedQueue;
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
187 </code></pre>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
188 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
189 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
190
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
191
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
192
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
193 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
194
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
195 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
196 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
197 <h2 id="codegearとdatagearにはメタレベルなものが存在する">CodeGearとDataGearにはメタレベルなものが存在する</h2>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
198 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
199 <li>メタレベルな記述はトランスコンパイラにより自動生成される(記述することも可能)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
200 <li>CodeGearの前後にMetaなCodeGearが挿入される</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
201 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
202 <div style="text-align: center;">
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
203  <img src="images/meta-cg-dg.pdf" alt="ノーマルレベルとメタレベルの視点からのGearの関係" width="800" />
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
204 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
205
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
206
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
207
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
208 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
209
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
210 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
211 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
212 <h2 id="stubcodegearとgoto-meta">stubCodeGearとgoto meta</h2>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
213 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
214 <li>ContextからInputDataGearを取り出す(stubCodeGear)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
215 <li>OutputDataGearをContextに書き込み、次のCodeGearを呼び出す(goto meta)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
216 <li>stubCodeGear/goto metaは変更可能(メタプログラミング)</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
217 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
218 <div style="text-align: center;">
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
219  <img src="images/meta-cg-dg.pdf" alt="ノーマルレベルとメタレベルの視点からのGearの関係" width="800" />
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
220 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
221
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
222
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
223
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
224 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
225
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
226 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
227 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
228 <h2 id="gearsosのファイルシステムの設計">GearsOSのファイルシステムの設計</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
229 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
230 <li>DataGearの単位でデータを操作したい</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
231 <li>通信データに対応した複数のストリームを持つ</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
232 <li>Transactionとしてatomicに操作したい
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
233 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
234 <li>従来のファイルシステムはTransactionはUserレベルで実装される</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
235 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
236 </li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
237 <li>ファイル操作と通信を同じAPIで実現する
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
238 <ul>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
239 <li>ChristieのDataGearManagerを参考にする</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
240 <li>Take/Put/Peek</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
241 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
242 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
243 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
244
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
245
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
246
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
247 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
248
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
249 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
250 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
251 <h2 id="takeputpeek">Take/Put/Peek</h2>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
252 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
253 <li>ファイルはQueueで構成される</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
254 <li>putでQueueに追加</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
255 <li>takeでQueueからの取り出し</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
256 <li>peekでQueueから取り出さない読み出し</li>
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
257 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
258 <div style="text-align: center;">
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
259  <img src="images/QueueElement.pdf" alt="Queueの構造" width="800" />
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
260 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
261
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
262
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
263
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
264 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
265
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
266 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
267 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
268 <h2 id="gearsfsのトランザクション">GearsFSのトランザクション</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
269 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
270 <li>GearsOSのCodeGear操作はatomicなので割り込まれない
23
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
271 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
272 <li>atomicityはOSが保証する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
273 <li>これによりTake/Put/PeekがTransactionであることを保証する</li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
274 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
275 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
276 </ul>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
277
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
278
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
279
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
281
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 <div class='slide'>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
284 <h2 id="queueによるgearsosのファイル">QueueによるGearsOSのファイル</h2>
16
ed9bace4039e add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
285 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
286 <li>GearsOSのファイルはDataGearを保持するQueueとなる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
287 <li>オンメモリのファイルに相当する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
288 <li>Queueをデバイスにcopyして持続性を実現する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
289 <li>書き込み先はDataGearManagerで選択する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
290 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
291
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
292
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
293
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
294 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
295
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
296 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
297 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
298 <h2 id="putのimplementation">PutのImplementation</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
299 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
300 <li>QueueのElementをnewで作成する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
301 <li>Queueのリンクを構築する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
302 <li>継続nextに跳ぶ
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
303 <pre><code>__code putSingleLinkedQueue(struct SingleLinkedQueue* queue, union Data* data, __code next(...)) {
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
304 Element* element = new Element();
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
305 element-&gt;data = data;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
306 element-&gt;next = NULL;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
307 queue-&gt;last-&gt;next = element;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
308 queue-&gt;last = element;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
309 goto next(...);
22
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
310 }
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
311 </code></pre>
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
312 </li>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
313 </ul>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
314
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
315
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
316
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
317 </div>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
318
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
319 <div class='slide'>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
320 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
321 <h2 id="takeのimplementation">TakeのImplementation</h2>
23
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
322 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
323 <li>QueueからElement経由でDataGearを取り出す</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
324 <li>Queueのリンクを修正し、nextでデータを引き渡す</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
325 <li>Elementには任意の型のDataGearが格納されている
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
326 <pre><code>__code takeSingleLinkedQueue(struct SingleLinkedQueue* queue, __code next(union Data* data, ...)) {
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
327 printf("take\n");
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
328 struct Element* top = queue-&gt;top;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
329 struct Element* nextElement = top-&gt;next;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
330 if (queue-&gt;top == queue-&gt;last) {
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
331 data = NULL;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
332 } else {
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
333 queue-&gt;top = nextElement;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
334 data = nextElement-&gt;data;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
335 }
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
336 goto next(data, ...);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
337 }
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
338 </code></pre>
23
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
339 </li>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
340 </ul>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
341
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
342
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
343
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
344 </div>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
345
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
346 <div class='slide'>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
347 <!-- _S9SLIDE_ -->
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
348 <h2 id="datagearmanager">DataGearManager</h2>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
349 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
350 <li>Take/Put/PeekはDataGearManagerに対して行う</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
351 <li>メモリ上のQueueはLocalDGMになる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
352 <li>RemoteDGMは他のノードやプロセスあるいはストレージデバイスをあらわす</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
353 <li>一つのDataGearManager上に複数のQueueがあり、keyで識別する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
354 <li>RemoteDGMに書き込むと相手のLocalDGMに書き込まれる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
355 <li>Take/Peekは書き込みを待ち合わせる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
356 <li>複数のTakeを待ち合わせることができる</li>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
357 </ul>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
358
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
359
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
360
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
361 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
362
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
363 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
364 <!-- _S9SLIDE_ -->
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
365 <h2 id="datagearmanagerによる通信構成">DataGearManagerによる通信構成</h2>
23
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
366 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
367 <li>任意の相手のRemoteDGMを作成することでTopologyが形成される</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
368 <li>手元のRemoteDGMに書き込むと相手のLocalDGMに書き込まれる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
369 <li>RemoteDGMはproxyとして動作する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
370 <li>この構成は分散フレームワークChristie(当研究室作成)と同じ</li>
23
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
371 </ul>
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
372 <div style="text-align: center;">
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
373  <img src="images/Remote_DataGearManager.pdf" alt="RemoteDGMの関係図" width="800" />
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
374 </div>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
375
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
376
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
377
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
378 </div>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
379
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
380 <div class='slide'>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
381 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
382 <h2 id="socket通信によるremotedgmの実装">socket通信によるRemoteDGMの実装</h2>
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
383 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
384 <li>GearsOSはUnix上の言語フレームワークとして実装されている</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
385 <li>Unixのsocket通信を使ってQueueのputを実装する</li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
386 <li>proxy側はQueueにputされたDataをsocketで送信する</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
387 <li>送信されたDataはLocal側でgetDataAPIで取り出される</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
388 <li>send/recvはUnixのAPI
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
389 <pre><code>__code sendDataRemoteDGMQueue(struct RemoteDGMQueue* cQueue, union Data* data, __code next(...), __code whenError(...)){
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
390 char recv_buf;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
391 int send_size, recv_size;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
392
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
393 send_size = send(cQueue-&gt;socket, data, sizeof(union Data), 0);
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
394 recv_size = recv(cQueue-&gt;socket, &amp;recv_buf, 1, 0);
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
395 //error処理は省略
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
396 goto next(...);
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
397 }
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
398 </code></pre>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
399 </li>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
400 </ul>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
401
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
402
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
403
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
404 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
405
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
406 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
407 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
408 <h2 id="受信側の実装">受信側の実装</h2>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
409 <ul>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
410 <li>ファイル本体(Local側)はsocketからDataを取り出す</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
411 <li>取り出されたデータはQueueにputされる
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
412 <pre><code>__code getDataLocalDGMQueue(struct LocalDGMQueue* cQueue, __code next(...), __code whenError(...)){
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
413 int recv_size, send_size;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
414 char send_buf;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
415
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
416 union Data* recv_data;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
417 recv_size = recv(cQueue-&gt;socket, recv_data, sizeof(union Data), 0);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
418
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
419 //error処理は省略
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
420 Gearef(context, cQueue)-&gt;data = recv_data;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
421 goto putLocalDGMQueue(recv_data, next);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
422 }
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
423 </code></pre>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
424 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
425 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
426
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
427
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
428
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
429 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
430
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
431 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
432 <!-- _S9SLIDE_ -->
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
433 <h2 id="複数のストリームから構成されるファイル">複数のストリームから構成されるファイル</h2>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
434 <ul>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
435 <li>入力されるデータに応じた個別のstreamを備えたい
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
436 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
437 <li>例えばUSBは複数のチャネルを持つ</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
438 <li>メタデータの取り出しは別streamになる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
439 <li>通信として使う場合に複数のプロトコルがある方が良い(FTP)</li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
440 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
441 </li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
442 <li>Streamはkey nameを持ち、keyでアクセスを行う</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
443 <li>赤黒木を用いる</li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
444 <li>DataのTake/Put時には必ずkey nameの指定が必要となる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
445 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
446
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
447
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
448
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
449 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
450
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
451 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
452 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
453 <h2 id="socketを使ったremotedgm">socketを使ったRemoteDGM</h2>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
454 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
455 <li>RemoteDGMに書き込みが行われるとsocketで通信が起きる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
456 <li>受信側はLocalDGMにDataGearを書き込む</li>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
457 </ul>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
458 <div style="text-align: center;">
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
459  <img src="images/socketCom.pdf" alt="socketを通じたレコード送信" width="800" />
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
460 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
461
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
462
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
463
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
464 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
465
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
466 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
467 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
468 <h2 id="wordcountの例題">wordCountの例題</h2>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
469 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
470 <li>ファイル内の文字列を1行づつ受け取り、文字列,行数をカウントする例題</li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
471 <li>文字列送信側とCount側を別ノード上で行うことで、ファイルの呼び出しと通信処理が構成できる</li>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
472 <li>RemoteDGMへの書き込みで通信する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
473 <li>acknowredgeを逆方向のRemoteDGMによる通信で実現する(現在は直接送信)</li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
474 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
475 <div style="text-align: center;">
27
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
476  <img src="images/slideGearsWC.pdf" alt="リモートDGMによるWordCount" width="800" />
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
477 </div>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
478
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
479
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
480
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
481 </div>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
482
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
483 <div class='slide'>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
484 <!-- _S9SLIDE_ -->
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
485 <h2 id="gearsfile-apiによるwordcount13">GearsFile APIによるWordCount(1/3)</h2>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
486 <ul>
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
487 <li>FileOpen側(NodeA)とWordCount側(NodeB)でノードが別れる</li>
27
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 26
diff changeset
488 <li>(手順1)FileOpen側はFilePloxyにDataRecordをputする</li>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
489 <li>(手順2)WordCount側は処理の後、ackを返信する</li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
490 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
491 <div style="text-align: center;">
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
492  <img src="images/slideGearsWC.pdf" alt="ChristieAPIによるWordCount" width="800" />
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
493 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
494
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
495
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
496
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
497 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
498
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
499 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
500 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
501 <h2 id="gearsfile-apiによるwordcount23">GearsFile APIによるWordCount(2/3)</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
502 <ul>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
503 <li>(手順3)1,2をループし、FileOpen側はEoFならフラグを送信する</li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
504 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
505 <div style="text-align: center;">
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
506  <img src="images/slideGearsWC.pdf" alt="ChristieAPIによるWordCount" width="800" />
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
507 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
508
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
509
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
510
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
511 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
512
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
513 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
514 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
515 <h2 id="gearsfile-apiによるwordcount33">GearsFile APIによるWordCount(3/3)</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
516 <ul>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
517 <li>(手順4)EoFを受信したWordCountは結果を返信し、双方の処理を終了させる</li>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
518 </ul>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
519 <div style="text-align: center;">
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
520  <img src="images/slideGearsWC.pdf" alt="ChristieAPIによるWordCount" width="800" />
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
521 </div>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
522
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
523
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
524
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
525 </div>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
526
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
527 <div class='slide'>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
528 <!-- _S9SLIDE_ -->
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
529 <h2 id="現在のgearsfile-apiの開発状況">現在のGearsFile APIの開発状況</h2>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
530 <ul>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
531 <li>実装ずみ
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
532 <ul>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
533 <li>keyアクセスに対応したファイル通信
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
534 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
535 <li>単一のQueueによる通信の記述</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
536 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
537 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
538 <li>リストとなるTree
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
539 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
540 <li>赤黒木</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
541 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
542 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
543 <li>atomicな操作が行えるQueue
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
544 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
545 <li>複数からのアクセス時にデータ整合を保つ</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
546 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
547 </li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
548 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
549 </li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
550 <li>実装中
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
551 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
552 <li>keyアクセスが行えるQueueのリスト</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
553 <li>リスト単位での通信の記述</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
554 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
555 </li>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
556 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
557
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
558
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
559
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
560 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
561
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
562 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
563 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
564 <h2 id="結論">結論</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
565 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
566 <li>GearsOSのファイルの設計を行った
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
567 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
568 <li>ファイルの構造の設計
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
569 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
570 <li>DataGear単位での操作が行える</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
571 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
572 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
573 <li>socketによる通信部分の実装
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
574 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
575 <li>GearsOS上でのソケット通信の記述</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
576 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
577 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
578 <li>APIの段階的な設計記述
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
579 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
580 <li>Proxyによるファイル通信</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
581 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
582 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
583 <li>GearsOSの調査</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
584 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
585 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
586 <li>Streamのリスト単位での通信の完成</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
587 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
588
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
589
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
590
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
591 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
592
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
593 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
594 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
595 <h2 id="将来的な課題">将来的な課題</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
596 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
597 <li>TopoplogyManagerの設計
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
598 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
599 <li>参加したノードを任意の形のTopologyに接続する機能</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
600 <li>ファイルシステム向けの機能を追加したい
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
601 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
602 <li>DNS</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
603 <li>中枢としてのTopologyのノード監視</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
604 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
605 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
606 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
607 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
608 <li>Securityシステムの追加
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
609 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
610 <li>証明書などによるファイル操作制限</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
611 <li>不正な分散ファイルシステムへのアクセス</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
612 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
613 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
614 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
615
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
616
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
617
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
618 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
619
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
620 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
621 <!-- _S9SLIDE_ -->
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
622 <h2 id="gearsosの生成形の問題点">GearsOSの生成形の問題点</h2>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
623 <ul>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
624 <li>GearsOSのメタレベルの処理の記述はトランスコンパイラにより行われる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
625 <li>場合によりメタレベルの記述を行わなくてはならない
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
626 <ul>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
627 <li>他のInterfaceを継承したオブジェクトからのDataGear継承
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
628 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
629 <li>例)Queueからのデータ取り出し</li>
26
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 24
diff changeset
630 <li>トランスコンパイラはどのInterfaceに記述されたDataGearを参照するべきか判断が難しい</li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
631 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
632 </li>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
633 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
634 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
635 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
636
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
637 <pre><code>__code Task2(TQueue* localDGMQueue){
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
638 goto localDGMQueue-&gt;take(Task3);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
639 }
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
640
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
641 __code Task3(TQueue* localDGMQueue, FileString* string){
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
642 printf("take[%s] [num:%d]\n", string-&gt;str, string-&gt;size);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
643 goto getData();
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
644 }
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
645
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
646 //プログラマが実装したいstub
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
647 __code Task3_stub(struct Context* context){
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
648 TQueue* localDGMQueue = (struct TQueue*)Gearef(context, TQueue)-&gt;tQueue;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
649 FileString* string = Gearef(context, TQueue)-&gt;data;
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
650 goto Task3(context, localDGMQueue, string);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
651 }
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
652
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
653 //自動生成されたErrorなstub
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
654 __code Task3_stub(struct Context* context) {
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
655 TQueue* localDGMQueue = Gearef(context, TQueue);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
656 FileString* string = Gearef(context, FileString);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
657 goto Task3(context, localDGMQueue, string);
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
658 }
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
659 </code></pre>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
660
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
661
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
662
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
663 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
664
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
665 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
666 <!-- _S9SLIDE_ -->
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
667 <h2 id="並列処理構文par-gotoが持つ問題">並列処理構文par gotoが持つ問題</h2>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
668 <ul>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
669 <li>par gotoとはGearsOSに実装された並列処理構文である</li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
670 <li>StreamQueueに対するput/takeの並列処理の実装をpar goto構文で試みた</li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
671 <li>par gotoはトランスコンパイラへの依存性が高い
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
672 <ul>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
673 <li>stubCodeGearのように任意な書き換えが行えない</li>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
674 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
675 </li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
676 <li>特定のCodeGearの宣言のみでしか正常な処理が生成されない
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
677 <ul>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
678 <li>Interfaceに記述されたAPICodeGearではバグが生じる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
679 <li>par gotoでの使用を前提としたCodeGearを書かなくてはならない</li>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
680 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
681 </li>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
682 <li>処理が重いという問題点も存在する</li>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
683 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
684
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
685
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
686
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
687 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
688
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
689 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
690 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
691 <h2 id="以下返答用">以下返答用</h2>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
692
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
693
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
694
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
695 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
696
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
697 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
698 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
699 <h2 id="takeputpeek-1">Take/Put/Peek</h2>
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
700 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
701 <li>PeekはReadOnly (最新の設定を読みこむなど)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
702 <li>Take/PutはDGが一つならUpDataに相当する</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
703 <li>書き込みが単一スレッドなら順序は保証される</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
704 <li>書き込みが複数の場合、Putの順序は保証されない</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
705 <li>データベースとの違い
20
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
706 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
707 <li>putがQueueとして蓄積される</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
708 <li>Keyが一つしかない(通信路として使える)</li>
18
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
709 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
710 </li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
711 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
712
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
713
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
714
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
715 </div>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
716
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
717 <div class='slide'>
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
718 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
719 <h2 id="__code-nextint-ret-の意味">__code next(int ret, …)の意味</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
720 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
721 <li>軽量継続を表す</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
722 <li>nextは引数として渡されたCodeGear</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
723 <li>int ret は返す値</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
724 <li>…は軽量継続の呼び出された時の値渡しのInterface</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
725 <li>一段の呼び出しStackのような役割になる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
726 </ul>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
727
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
728
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
729
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
730 </div>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
731
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
732 <div class='slide'>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
733 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
734 <h2 id="codegearと再帰呼び出し">CodeGearと再帰呼び出し</h2>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
735 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
736 <li>再起呼び出ししなければ関数呼び出し的に使える(末尾再起)</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
737 <li>再帰呼び出ししたい場合、明示的に自分でStackを作る</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
738 <li>…はContextにすべて置かれている</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
739 <li>Processはすべて異なるContextを持っている</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
740 <li>Context自体は共有されない</li>
24
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
741 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
742
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
743
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
744
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
745 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
746
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
747 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
748 <!-- _S9SLIDE_ -->
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
749 <h2 id="datagearの型">DataGearの型</h2>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
750 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
751 <li>union Data は一つのプロセス(Context)で使われるすべてのDataGearのUnion</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
752 <li>メタ部分に型に対応する番号を持っている</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
753 <li>番号を使って型を識別することができる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
754 <li>任意の型を格納できるQueueやStackを作成することが可能</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
755 <li>メタレベルではunion Dataを使ってDataGearの詳細に立ち入らず処理できる</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
756 </ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
757
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
758
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
759
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
760 </div>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
761
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
762 <div class='slide'>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
763 <!-- _S9SLIDE_ -->
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
764 <h2 id="remotedgmとacknowledge">RemoteDGMとacknowledge</h2>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
765 <ul>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
766 <li>Take/Put/Peekのコマンドは TCP上でacknowledgeを使って通信されている</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
767 <li>これとは別に自分と相手のCodeGearどうしのacknowledgeが必要</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
768 <li>RemoteDataGearManager経由でacknowledgeを返すのが正しい</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
769 <li>しかし、acknowledgeが重複してしまう</li>
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
770 <li>メタプログラミングを利用してこの重複を消すことは可能
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
771 <ul>
28
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
772 <li>しかし煩雑</li>
19
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
773 </ul>
9e6fd2255ee1 tweak slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
774 </li>
17
f4a719e93ded Too long
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
775 </ul>
14
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
776
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
777 </div>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
778
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
779
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
780 </div><!-- presentation -->
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
781 </body>
0a4cafd954b9 add slide
ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
parents:
diff changeset
782 </html>