annotate Slide/prosym.html @ 3:7f5c0330e711

add module API
author tobaru
date Sun, 20 May 2018 14:13:00 +0900
parents 60405cc47b3a
children c456e4d68e1a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
tobaru
parents:
diff changeset
1 <!DOCTYPE html>
tobaru
parents:
diff changeset
2 <html>
tobaru
parents:
diff changeset
3 <head>
tobaru
parents:
diff changeset
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
tobaru
parents:
diff changeset
5 <title>Gears OS のモジュール化と並列 API</title>
tobaru
parents:
diff changeset
6
tobaru
parents:
diff changeset
7 <meta name="generator" content="Slide Show (S9) v2.5.0 on Ruby 2.4.1 (2017-03-22) [x86_64-darwin15]">
tobaru
parents:
diff changeset
8 <meta name="author" content="Mitsuki Miyagi, Yu Tobaru, Shinji Kono" >
tobaru
parents:
diff changeset
9
tobaru
parents:
diff changeset
10 <!-- style sheet links -->
tobaru
parents:
diff changeset
11 <link rel="stylesheet" href="s6/themes/projection.css" media="screen,projection">
tobaru
parents:
diff changeset
12 <link rel="stylesheet" href="s6/themes/screen.css" media="screen">
tobaru
parents:
diff changeset
13 <link rel="stylesheet" href="s6/themes/print.css" media="print">
tobaru
parents:
diff changeset
14 <link rel="stylesheet" href="s6/themes/blank.css" media="screen,projection">
tobaru
parents:
diff changeset
15
tobaru
parents:
diff changeset
16 <!-- JS -->
tobaru
parents:
diff changeset
17 <script src="s6/js/jquery-1.11.3.min.js"></script>
tobaru
parents:
diff changeset
18 <script src="s6/js/jquery.slideshow.js"></script>
tobaru
parents:
diff changeset
19 <script src="s6/js/jquery.slideshow.counter.js"></script>
tobaru
parents:
diff changeset
20 <script src="s6/js/jquery.slideshow.controls.js"></script>
tobaru
parents:
diff changeset
21 <script src="s6/js/jquery.slideshow.footer.js"></script>
tobaru
parents:
diff changeset
22 <script src="s6/js/jquery.slideshow.autoplay.js"></script>
tobaru
parents:
diff changeset
23
tobaru
parents:
diff changeset
24 <!-- prettify -->
tobaru
parents:
diff changeset
25 <link rel="stylesheet" href="scripts/prettify.css">
tobaru
parents:
diff changeset
26 <script src="scripts/prettify.js"></script>
tobaru
parents:
diff changeset
27
tobaru
parents:
diff changeset
28 <script>
tobaru
parents:
diff changeset
29 $(document).ready( function() {
tobaru
parents:
diff changeset
30 Slideshow.init();
tobaru
parents:
diff changeset
31
tobaru
parents:
diff changeset
32 $('code').each(function(_, el) {
tobaru
parents:
diff changeset
33 if (!el.classList.contains('noprettyprint')) {
tobaru
parents:
diff changeset
34 el.classList.add('prettyprint');
tobaru
parents:
diff changeset
35 }
tobaru
parents:
diff changeset
36 });
tobaru
parents:
diff changeset
37 prettyPrint();
tobaru
parents:
diff changeset
38 } );
tobaru
parents:
diff changeset
39
tobaru
parents:
diff changeset
40
tobaru
parents:
diff changeset
41 </script>
tobaru
parents:
diff changeset
42
tobaru
parents:
diff changeset
43 <!-- Better Browser Banner for Microsoft Internet Explorer (IE) -->
tobaru
parents:
diff changeset
44 <!--[if IE]>
tobaru
parents:
diff changeset
45 <script src="s6/js/jquery.microsoft.js"></script>
tobaru
parents:
diff changeset
46 <![endif]-->
tobaru
parents:
diff changeset
47
tobaru
parents:
diff changeset
48
tobaru
parents:
diff changeset
49
tobaru
parents:
diff changeset
50 </head>
tobaru
parents:
diff changeset
51 <body>
tobaru
parents:
diff changeset
52
tobaru
parents:
diff changeset
53 <div class="layout">
tobaru
parents:
diff changeset
54 <div id="header"></div>
tobaru
parents:
diff changeset
55 <div id="footer">
tobaru
parents:
diff changeset
56 <div align="right">
tobaru
parents:
diff changeset
57 <img src="s6/images/logo.svg" width="200px">
tobaru
parents:
diff changeset
58 </div>
tobaru
parents:
diff changeset
59 </div>
tobaru
parents:
diff changeset
60 </div>
tobaru
parents:
diff changeset
61
tobaru
parents:
diff changeset
62 <div class="presentation">
tobaru
parents:
diff changeset
63
tobaru
parents:
diff changeset
64 <div class='slide cover'>
tobaru
parents:
diff changeset
65 <table width="90%" height="90%" border="0" align="center">
tobaru
parents:
diff changeset
66 <tr>
tobaru
parents:
diff changeset
67 <td>
tobaru
parents:
diff changeset
68 <div align="center">
tobaru
parents:
diff changeset
69 <h1><font color="#808db5">Gears OS のモジュール化と並列 API</font></h1>
tobaru
parents:
diff changeset
70 </div>
tobaru
parents:
diff changeset
71 </td>
tobaru
parents:
diff changeset
72 </tr>
tobaru
parents:
diff changeset
73 <tr>
tobaru
parents:
diff changeset
74 <td>
tobaru
parents:
diff changeset
75 <div align="left">
tobaru
parents:
diff changeset
76 Mitsuki Miyagi, Yu Tobaru, Shinji Kono
tobaru
parents:
diff changeset
77 琉球大学
tobaru
parents:
diff changeset
78 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
tobaru
parents:
diff changeset
79 </div>
tobaru
parents:
diff changeset
80 </td>
tobaru
parents:
diff changeset
81 </tr>
tobaru
parents:
diff changeset
82 </table>
tobaru
parents:
diff changeset
83 </div>
tobaru
parents:
diff changeset
84
tobaru
parents:
diff changeset
85 <div class='slide '>
tobaru
parents:
diff changeset
86 <!-- === begin markdown block ===
tobaru
parents:
diff changeset
87
tobaru
parents:
diff changeset
88 generated by markdown/1.2.0 on Ruby 2.4.1 (2017-03-22) [x86_64-darwin15]
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
89 on 2018-05-20 14:11:55 +0900 with Markdown engine kramdown (1.13.2)
0
tobaru
parents:
diff changeset
90 using options {}
tobaru
parents:
diff changeset
91 -->
tobaru
parents:
diff changeset
92
tobaru
parents:
diff changeset
93 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
94 <h1 id="gears-os">Gears OS</h1>
0
tobaru
parents:
diff changeset
95 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
96 <li>現代のOS では拡張性と信頼性を両立させることが要求されている。
0
tobaru
parents:
diff changeset
97 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
98 <li>時代と共にハードウェア、サービスが進歩していき、その度に OS を検証できる必要があるため、拡張性が必要。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
99 <li>OS は非決定的な実行を持ち、従来の OS ではテストしきれない部分が残ってしまうため、信頼性が欠けてしまう。</li>
0
tobaru
parents:
diff changeset
100 </ul>
tobaru
parents:
diff changeset
101 </li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
102 <li>本研究室では、それらを実現することを目標に Gears OS の開発を行なっている。</li>
0
tobaru
parents:
diff changeset
103 </ul>
tobaru
parents:
diff changeset
104
tobaru
parents:
diff changeset
105
tobaru
parents:
diff changeset
106 </div>
tobaru
parents:
diff changeset
107 <div class='slide '>
tobaru
parents:
diff changeset
108 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
109 <h1 id="api-">API と実装の分離</h1>
0
tobaru
parents:
diff changeset
110 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
111 <li>Gears OS は Continuation based C(以下、CbC)によって記述されている。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
112 <li>CbC は Code Gear と Data Gear の単位でプログラムを記述していて、システムやアプリケーションを作る際に、この2つは柔軟に再利用する必要がある。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
113 <li>この時に、機能を接続する API と実装の分離が可能であることが望ましい。</li>
0
tobaru
parents:
diff changeset
114 </ul>
tobaru
parents:
diff changeset
115
tobaru
parents:
diff changeset
116
tobaru
parents:
diff changeset
117 </div>
tobaru
parents:
diff changeset
118 <div class='slide '>
tobaru
parents:
diff changeset
119 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
120 <h1 id="api">並列API</h1>
0
tobaru
parents:
diff changeset
121 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
122 <li>Geas OS 信頼性を保証するために、形式化されたモジュールシステムが必要である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
123 <li>本研究では、モジュールシステムとその応用である並列APIについて考察する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
124 <li>並列APIは継続を基本とした関数型プログラミングと両立する必要があり、ここでは CbC の goto 文を拡張した par goto を導入する。</li>
0
tobaru
parents:
diff changeset
125 </ul>
tobaru
parents:
diff changeset
126
tobaru
parents:
diff changeset
127
tobaru
parents:
diff changeset
128 </div>
tobaru
parents:
diff changeset
129 <div class='slide '>
tobaru
parents:
diff changeset
130 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
131 <h1 id="section">スライドの流れ</h1>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
132 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
133 <li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
134 <font color="red">CbC</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
135 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
136 <li>Gears OS における並列実行</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
137 <li>比較</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
138 <li>今後の課題</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
139 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
140
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
141
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
142 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
143 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
144 <!-- _S9SLIDE_ -->
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
145 <h1 id="cbc">CbC</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
146 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
147 <li>ノーマルレベルとメタレベルの計算を1つの言語で表現できる言語として、本研究室で設計した CbC(Continuation based C) を用いる。</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
148 <li>ノーマルレベルの計算
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
149 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
150 <li>コンピュータの計算はプログラミング言語で計算される。</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
151 <li>その部分をノーマルレベルの計算と呼ぶ。</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
152 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
153 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
154 <li>メタレベルの計算
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
155 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
156 <li>コードが実行される際の以下の部分が、メタレベルの計算という。
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
157 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
158 <li>処理系の詳細や使用する資源</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
159 <li>コードの仕様や型などの言語以外の部分</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
160 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
161 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
162 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
163 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
164 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
165
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
166
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
167 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
168 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
169 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
170 <h1 id="cbc-1">CbC</h1>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
171 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
172 <li>CbC を用いることで、ノーマルレベルの計算の信頼性をメタレベルから保証できるようになる。</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
173 <li>CbC を用いてCode Gear と Data Gear、メタ構造を導入する。</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
174 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
175
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
176
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
177 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
178 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
179 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
180 <h1 id="cbc-">CbC の構文</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
181 <ul lang="c">
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
182 <li>CbC の Code Gear は __code という型を持つ関数として記述する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
183 <li>継続で次の Code Gear に遷移するので、戻り値は持たない。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
184 <li>遷移は goto 文による継続で処理を行い、引数として入出力を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
185 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
186 <pre><code>__code cg0(int a, int b) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
187 goto cg1(a+b);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
188 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
189 __code cg1(int c) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
190 goto cg2(c);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
191 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
192 </code></pre>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
193 <p># スライドの流れ
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
194 - CbC
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
195 - <font color="red">Gears OS における並列実行</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
196 - 比較
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
197 - 今後の課題</p>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
198
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
199
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
200 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
201 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
202 <!-- _S9SLIDE_ -->
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
203 <h1 id="gears-">Gears における並列実行</h1>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
204 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
205 <li>Gears OS ではメタ計算を柔軟に記述するためのプログラミングの単位として Code Gear と Data Gear を用いる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
206 <li>それぞれにメタレベルの単位が存在し、Meta Data Gear と Meta Code Gear と呼ぶ。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
207 <li>メタレベルの計算は Perl スクリプトによって生成され、Code Gear で記述される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
208 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
209
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
210
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
211 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
212 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
213 <!-- _S9SLIDE_ -->
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
214 <h1 id="interface">Interface</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
215 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
216 <li>この時、Code Gear と Deta Gear は Interface と呼ばれるまとまり(モジュール)で記述される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
217 <li>Interface 作成時に Code Gear の集合を指定することにより複数の実装を持つことができる。</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
218 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
219
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
220
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
221 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
222 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
223 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
224 <h1 id="context">Context</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
225 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
226 <li>1つのスレッド内で使われる Interface の Code Gear と Data Gear は Meta Data Gear に格納される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
227 <li>この Meta Data Gear を Context と呼ぶ。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
228 <li>Context を複製して複数の CPU に割り当てることにより並列実行が可能になる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
229 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
230
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
231
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
232 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
233 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
234 <!-- _S9SLIDE_ -->
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
235 <h1 id="par-goto">par goto</h1>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
236 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
237 <li>Context の複製には par goto を用いる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
238 <li>他に、入力の同期、タスクスケジューラへの Context の登録が行われる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
239 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
240
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
241
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
242 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
243 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
244 <!-- _S9SLIDE_ -->
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
245 <h1 id="task">Task</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
246 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
247 <li>Context は Task でもある。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
248 <li>実行する Code Gear と Data Gear を全て持っている。</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
249 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
250
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
251
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
252 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
253 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
254 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
255 <h1 id="exit">__exit</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
256 <ul lang="c">
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
257 <li>par goto で生成された Task は __exit に継続することで終了する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
258 <li>GearsOS の Task は Output Data Gear を生成した時点で終了する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
259 <li>そのため、par goto では直接 __exit に継続せず、Output Data Gear への書き出し処理に継続される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
260 <li>Code Gear と Data Gear の依存関係をノーマルレベルで記述できるようになる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
261 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
262 <pre><code>__code code1(Integer *integer1, Integer * integer2, Integer *output) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
263 par goto add(integer1, integer2, output, __exit);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
264 goto code2();
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
265 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
266 </code></pre>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
267
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
268
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
269 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
270 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
271 <!-- _S9SLIDE_ -->
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
272 <h1 id="section-1">スライドの流れ</h1>
0
tobaru
parents:
diff changeset
273 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
274 <li>CbC</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
275 <li>Gears OS における並列実行</li>
0
tobaru
parents:
diff changeset
276 <li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
277 <font color="red">比較</font>
0
tobaru
parents:
diff changeset
278 </li>
tobaru
parents:
diff changeset
279 <li>今後の課題</li>
tobaru
parents:
diff changeset
280 </ul>
tobaru
parents:
diff changeset
281
tobaru
parents:
diff changeset
282
tobaru
parents:
diff changeset
283 </div>
tobaru
parents:
diff changeset
284 <div class='slide '>
tobaru
parents:
diff changeset
285 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
286 <h1 id="gears-os-">Gears OS の評価</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
287 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
288 <li>CPU、GPU環境で Gears OS の測定を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
289 <li>使用した環境は次のようになる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
290 </ul>
0
tobaru
parents:
diff changeset
291
tobaru
parents:
diff changeset
292
tobaru
parents:
diff changeset
293 </div>
tobaru
parents:
diff changeset
294 <div class='slide '>
tobaru
parents:
diff changeset
295 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
296 <h1 id="twice">Twice</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
297 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
298 <li>評価には与えられた整数配列の全ての要素を2倍にする例題である Twice を使う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
299 <li>Twice では 通信時間を考慮しなければ、CPU より コア数の多い GPU が有利となる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
300 <li>要素数2^27のデータに対する Twice の実行結果を示す。
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
301 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
302 <li>CPU では2^27のデータを64個のデータに分割した。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
303 <li>kernel only は 通信速度を除いた速度である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
304 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
305 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
306 </ul>
0
tobaru
parents:
diff changeset
307
tobaru
parents:
diff changeset
308
tobaru
parents:
diff changeset
309 </div>
tobaru
parents:
diff changeset
310 <div class='slide '>
tobaru
parents:
diff changeset
311 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
312 <h1 id="section-2">評価の考察</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
313 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
314 <li>コア数が上がるごとに、処理速度が上がっている。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
315 <li>GPUでの実行は 32CPU に比べて約7.2倍の速度向上が見られた。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
316 <li>通信速度を含めると 16CPU より遅い。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
317 </ul>
0
tobaru
parents:
diff changeset
318
tobaru
parents:
diff changeset
319
tobaru
parents:
diff changeset
320 </div>
tobaru
parents:
diff changeset
321 <div class='slide '>
tobaru
parents:
diff changeset
322 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
323 <h1 id="go-">Go 言語との比較</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
324 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
325 <li>Go 言語でも Twice を用いた検証を行い、Gears OS との速度比較を行なった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
326 </ul>
0
tobaru
parents:
diff changeset
327
tobaru
parents:
diff changeset
328
tobaru
parents:
diff changeset
329 </div>
tobaru
parents:
diff changeset
330 <div class='slide '>
tobaru
parents:
diff changeset
331 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
332 <h1 id="go--1">Go 言語との比較</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
333 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
334 <li>1CPU と 32CPU では約4.33倍の速度向上が見られた。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
335 <li>CPU数による速度向上は、Gears OS の方が上だが、処理速度では Go言語の方が速い結果となった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
336 </ul>
0
tobaru
parents:
diff changeset
337
tobaru
parents:
diff changeset
338
tobaru
parents:
diff changeset
339 </div>
tobaru
parents:
diff changeset
340 <div class='slide '>
tobaru
parents:
diff changeset
341 <!-- _S9SLIDE_ -->
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
342 <h1 id="section-3">スライドの流れ</h1>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
343 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
344 <li>CbC</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
345 <li>Gears OS における並列実行</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
346 <li>比較</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
347 <li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
348 <font color="red">今後の課題</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
349 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
350 </ul>
0
tobaru
parents:
diff changeset
351
tobaru
parents:
diff changeset
352
tobaru
parents:
diff changeset
353 </div>
tobaru
parents:
diff changeset
354 <div class='slide '>
tobaru
parents:
diff changeset
355 <!-- _S9SLIDE_ -->
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
356 <h1 id="section-4">今後の課題</h1>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
357 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
358 <li>Go 言語との比較から 1CPU での動作が遅いことがわかった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
359 <li>par goto 文を使用することで、Contextを生成し、並列処理を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
360 <li>しかし、Context はメモリ空間の確保や使用する全ての Code Gear Data Gear の設定をする必要があり、生成に時間がかかってしまう事が原因。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
361 <li>処理が軽い場合は Context を生成しないようなチューニングが必要である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
362 </ul>
0
tobaru
parents:
diff changeset
363 <!-- === end markdown block === -->
tobaru
parents:
diff changeset
364 </div>
tobaru
parents:
diff changeset
365
tobaru
parents:
diff changeset
366
tobaru
parents:
diff changeset
367 </div><!-- presentation -->
tobaru
parents:
diff changeset
368 </body>
tobaru
parents:
diff changeset
369 </html>