annotate Slide/prosym.pdf.html @ 10:d4e58a38aae7

fix
author tobaru
date Tue, 22 May 2018 10:13:39 +0900
parents 5790bdc1d515
children 6fdcb5241bda
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/screen.css" media="screen">
tobaru
parents:
diff changeset
12 <link rel="stylesheet" href="s6/themes/print.css" media="print">
tobaru
parents:
diff changeset
13 <link rel="stylesheet" href="s6/themes/blank.css" media="screen,projection">
tobaru
parents:
diff changeset
14
tobaru
parents:
diff changeset
15 <!-- JS -->
tobaru
parents:
diff changeset
16 <script src="s6/js/jquery-1.11.3.min.js"></script>
tobaru
parents:
diff changeset
17 <script src="s6/js/jquery.slideshow.js"></script>
tobaru
parents:
diff changeset
18 <script src="s6/js/jquery.slideshow.counter.js"></script>
tobaru
parents:
diff changeset
19 <script src="s6/js/jquery.slideshow.controls.js"></script>
tobaru
parents:
diff changeset
20 <script src="s6/js/jquery.slideshow.footer.js"></script>
tobaru
parents:
diff changeset
21 <script src="s6/js/jquery.slideshow.autoplay.js"></script>
tobaru
parents:
diff changeset
22
tobaru
parents:
diff changeset
23 <!-- prettify -->
tobaru
parents:
diff changeset
24 <link rel="stylesheet" href="scripts/prettify.css">
tobaru
parents:
diff changeset
25 <script src="scripts/prettify.js"></script>
tobaru
parents:
diff changeset
26
tobaru
parents:
diff changeset
27 <style>
tobaru
parents:
diff changeset
28 .slide {page-break-after: always;}
tobaru
parents:
diff changeset
29 </style>
tobaru
parents:
diff changeset
30
tobaru
parents:
diff changeset
31
tobaru
parents:
diff changeset
32
tobaru
parents:
diff changeset
33
tobaru
parents:
diff changeset
34 </head>
tobaru
parents:
diff changeset
35 <body>
tobaru
parents:
diff changeset
36
tobaru
parents:
diff changeset
37 <div class="layout">
tobaru
parents:
diff changeset
38 <div id="header"></div>
tobaru
parents:
diff changeset
39 <div id="footer">
tobaru
parents:
diff changeset
40 <div align="right">
tobaru
parents:
diff changeset
41 <img src="s6/images/logo.svg" width="200px">
tobaru
parents:
diff changeset
42 </div>
tobaru
parents:
diff changeset
43 </div>
tobaru
parents:
diff changeset
44 </div>
tobaru
parents:
diff changeset
45
tobaru
parents:
diff changeset
46 <div class="presentation">
tobaru
parents:
diff changeset
47
tobaru
parents:
diff changeset
48 <div class='slide cover'>
tobaru
parents:
diff changeset
49 <table width="90%" height="90%" border="0" align="center">
tobaru
parents:
diff changeset
50 <tr>
tobaru
parents:
diff changeset
51 <td>
tobaru
parents:
diff changeset
52 <div align="center">
tobaru
parents:
diff changeset
53 <h1><font color="#808db5">Gears OS のモジュール化と並列 API</font></h1>
tobaru
parents:
diff changeset
54 </div>
tobaru
parents:
diff changeset
55 </td>
tobaru
parents:
diff changeset
56 </tr>
tobaru
parents:
diff changeset
57 <tr>
tobaru
parents:
diff changeset
58 <td>
tobaru
parents:
diff changeset
59 <div align="left">
tobaru
parents:
diff changeset
60 Mitsuki Miyagi, Yu Tobaru, Shinji Kono
tobaru
parents:
diff changeset
61 琉球大学
tobaru
parents:
diff changeset
62 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
tobaru
parents:
diff changeset
63 </div>
tobaru
parents:
diff changeset
64 </td>
tobaru
parents:
diff changeset
65 </tr>
tobaru
parents:
diff changeset
66 </table>
tobaru
parents:
diff changeset
67 </div>
tobaru
parents:
diff changeset
68
tobaru
parents:
diff changeset
69 <div class='slide '>
tobaru
parents:
diff changeset
70 <!-- === begin markdown block ===
tobaru
parents:
diff changeset
71
tobaru
parents:
diff changeset
72 generated by markdown/1.2.0 on Ruby 2.4.1 (2017-03-22) [x86_64-darwin15]
10
tobaru
parents: 9
diff changeset
73 on 2018-05-22 10:11:16 +0900 with Markdown engine kramdown (1.13.2)
0
tobaru
parents:
diff changeset
74 using options {}
tobaru
parents:
diff changeset
75 -->
tobaru
parents:
diff changeset
76
tobaru
parents:
diff changeset
77 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
78 <h2 id="gears-os">Gears OS</h2>
0
tobaru
parents:
diff changeset
79 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
80 <li>現代のOS では拡張性と信頼性を両立させることが要求されている。
0
tobaru
parents:
diff changeset
81 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
82 <li>時代と共にハードウェア、サービスが進歩していき、その度に OS を検証できる必要があるため、拡張性が必要。</li>
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
83 <li>OS は非決定的な実行を持ち、従来の OS ではテストしきれない部分が残ってしまうため、信頼性が欠けてしまうので信頼性のある OS が必要。</li>
0
tobaru
parents:
diff changeset
84 </ul>
tobaru
parents:
diff changeset
85 </li>
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
86 <li>本研究室では、拡張性と信頼性を実現することを目標に Gears OS の開発を行なっている。</li>
0
tobaru
parents:
diff changeset
87 </ul>
tobaru
parents:
diff changeset
88
tobaru
parents:
diff changeset
89
tobaru
parents:
diff changeset
90 </div>
tobaru
parents:
diff changeset
91 <div class='slide '>
tobaru
parents:
diff changeset
92 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
93 <h2 id="section">スライドの流れ</h2>
0
tobaru
parents:
diff changeset
94 <ul>
10
tobaru
parents: 9
diff changeset
95 <li>
tobaru
parents: 9
diff changeset
96 <font color="red">Interface</font>
tobaru
parents: 9
diff changeset
97 </li>
tobaru
parents: 9
diff changeset
98 <li>並列API</li>
tobaru
parents: 9
diff changeset
99 <li>CbC</li>
tobaru
parents: 9
diff changeset
100 <li>Gears OS における並列実行</li>
tobaru
parents: 9
diff changeset
101 <li>比較</li>
tobaru
parents: 9
diff changeset
102 <li>今後の課題</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_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
109 <h2 id="gears-os-interface">Gears OS での形式化とInterfaceの導入</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
110 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
111 <li>形式化とは仕様、実装、実行を Logic で記述する事である。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
112 <li>Gears OS では、継続を使った関数型プログラムとして実装を記述する</li>
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
113 <li>Logic としては、依存型関数言語である Agda を使う(外間の発表)</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
114 <li>証明とモデル検査を使って、信頼性を確保する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
115 </ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
116
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
117
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
118 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
119 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
120 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
121 <h2 id="gears-os--interface">Gears OS の Interface</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
122 <ul>
10
tobaru
parents: 9
diff changeset
123 <li>Code Gear と Deta Gear は Interface と呼ばれるまとまり(モジュール)で記述される。
tobaru
parents: 9
diff changeset
124 <ul>
tobaru
parents: 9
diff changeset
125 <li>Gears OS のモジュール化</li>
tobaru
parents: 9
diff changeset
126 </ul>
tobaru
parents: 9
diff changeset
127 </li>
tobaru
parents: 9
diff changeset
128 <li>Interface 作成時に Code Gear の集合を指定することにより複数の実装(並列処理)を持つことができる。</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
129 <li>Interface は Data Gear で記述されて、Meta Deta Gear と呼ばれる。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
130 <li>Java などの Class に相当する。</li>
10
tobaru
parents: 9
diff changeset
131 <li>Data Gear に Interface を呼び出す時に必要となる引数を全て格納する</li>
tobaru
parents: 9
diff changeset
132 </ul>
tobaru
parents: 9
diff changeset
133
tobaru
parents: 9
diff changeset
134
tobaru
parents: 9
diff changeset
135 </div>
tobaru
parents: 9
diff changeset
136 <div class='slide '>
tobaru
parents: 9
diff changeset
137 <!-- _S9SLIDE_ -->
tobaru
parents: 9
diff changeset
138 <h2 id="section-1">スライドの流れ</h2>
tobaru
parents: 9
diff changeset
139 <ul>
tobaru
parents: 9
diff changeset
140 <li>Interface</li>
tobaru
parents: 9
diff changeset
141 <li>
tobaru
parents: 9
diff changeset
142 <font color="red">並列API</font>
tobaru
parents: 9
diff changeset
143 </li>
tobaru
parents: 9
diff changeset
144 <li>CbC</li>
tobaru
parents: 9
diff changeset
145 <li>Gears OS における並列実行</li>
tobaru
parents: 9
diff changeset
146 <li>比較</li>
tobaru
parents: 9
diff changeset
147 <li>今後の課題</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
148 </ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
149
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
150
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
151 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
152 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
153 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
154 <h2 id="api">並列API</h2>
0
tobaru
parents:
diff changeset
155 <ul>
10
tobaru
parents: 9
diff changeset
156 <li>Geas OS 信頼性を保証(テスト)するために、モジュールシステムが必要である。</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
157 <li>本研究では、モジュールシステムとその応用である並列APIについて考察する。</li>
10
tobaru
parents: 9
diff changeset
158 <li>並列APIは継続を基本とした関数型プログラミングと両立する必要があり、ここでは CbC の goto 文を拡張した <strong>par goto</strong> を導入する。
tobaru
parents: 9
diff changeset
159 <ul>
tobaru
parents: 9
diff changeset
160 <li>Interface でモジュール化</li>
tobaru
parents: 9
diff changeset
161 <li>応用として par goto を使って 並列API を実装</li>
tobaru
parents: 9
diff changeset
162 </ul>
tobaru
parents: 9
diff changeset
163 </li>
0
tobaru
parents:
diff changeset
164 </ul>
tobaru
parents:
diff changeset
165
tobaru
parents:
diff changeset
166
tobaru
parents:
diff changeset
167 </div>
tobaru
parents:
diff changeset
168 <div class='slide '>
tobaru
parents:
diff changeset
169 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
170 <h2 id="section-2">スライドの流れ</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
171 <ul>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
172 <li>Interface</li>
10
tobaru
parents: 9
diff changeset
173 <li>並列API</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
174 <li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
175 <font color="red">CbC</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
176 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
177 <li>Gears OS における並列実行</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
178 <li>比較</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
179 <li>今後の課題</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
180 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
181
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
182
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
183 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
184 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
185 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
186 <h2 id="cbc">CbC</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
187 <ul>
10
tobaru
parents: 9
diff changeset
188 <li>ノーマルレベルとメタレベルの計算をまとめて表現できる言語として、本研究室で設計した CbC を用いる。
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
189 <ul>
10
tobaru
parents: 9
diff changeset
190 <li>ノーマルレベルの計算
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
191 <ul>
10
tobaru
parents: 9
diff changeset
192 <li>コンピュータの計算はプログラミング言語で行われる。</li>
tobaru
parents: 9
diff changeset
193 <li>その部分をノーマルレベルの計算と呼ぶ。</li>
tobaru
parents: 9
diff changeset
194 </ul>
tobaru
parents: 9
diff changeset
195 </li>
tobaru
parents: 9
diff changeset
196 <li>メタレベルの計算
tobaru
parents: 9
diff changeset
197 <ul>
tobaru
parents: 9
diff changeset
198 <li>コードが実行される際の以下の部分が、メタレベルの計算という。
tobaru
parents: 9
diff changeset
199 <ul>
tobaru
parents: 9
diff changeset
200 <li>処理系の詳細や使用する資源</li>
tobaru
parents: 9
diff changeset
201 <li>コードの仕様や型などの部分</li>
tobaru
parents: 9
diff changeset
202 </ul>
tobaru
parents: 9
diff changeset
203 </li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
204 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
205 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
206 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
207 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
208 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
209
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
210
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
211 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
212 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
213 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
214 <h2 id="cbc-1">CbC</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
215 <ul>
10
tobaru
parents: 9
diff changeset
216 <li>CbC を用いることで、ノーマルレベルの計算の信頼性をメタレベルから保証できるようになる。
tobaru
parents: 9
diff changeset
217 <ul>
tobaru
parents: 9
diff changeset
218 <li>処理の詳細やコードの型を数え上げる事による信頼性の保証</li>
tobaru
parents: 9
diff changeset
219 </ul>
tobaru
parents: 9
diff changeset
220 </li>
tobaru
parents: 9
diff changeset
221 <li>CbC を用いてCode Gear と Data Gear を導入する。
tobaru
parents: 9
diff changeset
222 <ul>
tobaru
parents: 9
diff changeset
223 <li>Code Gear は並列処理の単位として利用</li>
tobaru
parents: 9
diff changeset
224 <li>Data Gear はデータそのもの</li>
tobaru
parents: 9
diff changeset
225 </ul>
tobaru
parents: 9
diff changeset
226 </li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
227 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
228
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
229
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
230 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
231 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
232 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
233 <h2 id="cbc-">CbC の構文</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
234 <ul lang="c">
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
235 <li>CbC の Code Gear は __code という型を持つ関数として記述する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
236 <li>継続で次の Code Gear に遷移するので、戻り値は持たない。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
237 <li>遷移は goto 文による継続で処理を行い、引数として入出力を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
238 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
239 <pre><code>__code cg0(int a, int b) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
240 goto cg1(a+b);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
241 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
242 __code cg1(int c) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
243 goto cg2(c);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
244 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
245 </code></pre>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
246 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
247 <li>CbC の記述だけでは並列実行にならない</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
248 </ul>
5
tobaru
parents: 4
diff changeset
249
tobaru
parents: 4
diff changeset
250
tobaru
parents: 4
diff changeset
251 </div>
tobaru
parents: 4
diff changeset
252 <div class='slide '>
tobaru
parents: 4
diff changeset
253 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
254 <h2 id="section-3">スライドの流れ</h2>
5
tobaru
parents: 4
diff changeset
255 <ul>
10
tobaru
parents: 9
diff changeset
256 <li>Interface</li>
tobaru
parents: 9
diff changeset
257 <li>並列API</li>
5
tobaru
parents: 4
diff changeset
258 <li>CbC</li>
tobaru
parents: 4
diff changeset
259 <li>
tobaru
parents: 4
diff changeset
260 <font color="red">Gears OS における並列実行</font>
tobaru
parents: 4
diff changeset
261 </li>
tobaru
parents: 4
diff changeset
262 <li>比較</li>
tobaru
parents: 4
diff changeset
263 <li>今後の課題</li>
tobaru
parents: 4
diff changeset
264 </ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
265
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
266
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
267 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
268 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
269 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
270 <h2 id="gears-">Gears における並列実行</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
271 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
272 <li>Gears OS ではメタ計算を柔軟に記述するためのプログラミングの単位として Code Gear と Data Gear を用いる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
273 <li>それぞれにメタレベルの単位が存在し、Meta Data Gear と Meta Code Gear と呼ぶ。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
274 <li>メタレベルの計算は Perl スクリプトによって生成され、Code Gear で記述される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
275 </ul>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
276 <div style="text-align: center;">
8
f275411f458d fix size
tobaru
parents: 7
diff changeset
277 <img src="./image/meta_cg_dg.svg" alt="Meta Data Gear と Meta Code Gear" width="600" />
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
278 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
279
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
280
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
281 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
282 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
283 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
284 <h2 id="gears-os-">Gears OS の構造</h2>
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
285 <ul>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
286 <li>Gears OS は以下の要素で構成されている
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
287 <ul>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
288 <li>Context</li>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
289 <li>TaskQueue</li>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
290 <li>TaskManager</li>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
291 <li>Worker</li>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
292 </ul>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
293 </li>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
294 </ul>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
295
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
296 <div style="text-align: center;">
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
297 <img src="./image/gears_structure.png" alt="Gears OS の構造" width="400" />
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
298 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
299
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
300
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
301 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
302 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
303 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
304 <h2 id="context">Context</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
305 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
306 <li>1つのスレッド内で使われる Interface の Code Gear と Data Gear は Meta Data Gear に格納される。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
307 <li>この Meta Data Gear を Context と呼ぶ。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
308 <li>Context を複製して複数の CPU に割り当てることにより並列実行が可能になる。</li>
10
tobaru
parents: 9
diff changeset
309 <li>ノーマルレベルでは見る事ができない。</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
310 <li>Context は Task でもある。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
311 <li>Task は実行する Code Gear と Data Gear を全て持っている。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
312 </ul>
10
tobaru
parents: 9
diff changeset
313 <div style="text-align: center;">
tobaru
parents: 9
diff changeset
314 <img src="./image/gears_structure.png" alt="Gears OS の構造" width="400" />
tobaru
parents: 9
diff changeset
315 </div>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
316
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
317
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
318 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
319 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
320 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
321 <h2 id="taskmanager">TaskManager</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
322 <ul>
10
tobaru
parents: 9
diff changeset
323 <li>Task を実行する Worker の生成</li>
tobaru
parents: 9
diff changeset
324 <li>Worker の管理</li>
tobaru
parents: 9
diff changeset
325 <li>Task の送信</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
326 </ul>
10
tobaru
parents: 9
diff changeset
327 <div style="text-align: center;">
tobaru
parents: 9
diff changeset
328 <img src="./image/gears_structure.png" alt="Gears OS の構造" width="400" />
tobaru
parents: 9
diff changeset
329 </div>
tobaru
parents: 9
diff changeset
330
tobaru
parents: 9
diff changeset
331
tobaru
parents: 9
diff changeset
332 </div>
tobaru
parents: 9
diff changeset
333 <div class='slide '>
tobaru
parents: 9
diff changeset
334 <!-- _S9SLIDE_ -->
tobaru
parents: 9
diff changeset
335 <h2 id="worker">Worker</h2>
tobaru
parents: 9
diff changeset
336 <ul>
tobaru
parents: 9
diff changeset
337 <li>TaskQueue から Task である Context を取得</li>
tobaru
parents: 9
diff changeset
338 <li>Task の Code Gear を実行</li>
tobaru
parents: 9
diff changeset
339 <li>Output Data Gear への書き出し</li>
tobaru
parents: 9
diff changeset
340 </ul>
tobaru
parents: 9
diff changeset
341 <div style="text-align: center;">
tobaru
parents: 9
diff changeset
342 <img src="./image/gears_structure.png" alt="Gears OS の構造" width="400" />
tobaru
parents: 9
diff changeset
343 </div>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
344
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
345
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
346 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
347 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
348 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
349 <h2 id="code-gear--code-gear-">1つの Code Gear の実行は他の Code Gear に割り込まれない</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
350 <ul>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
351 <li>共有された Data Gear があった時に、それに対する変更はただ1つの Code Gear だけが許される</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
352 <li>読み込みは複数であってもいい</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
353 <li>Agda 側で、並列実行を Code Gear の順次実行としてシミュレーションするため</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
354 <li>このような実行になるように Gears OS の実装を行う</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
355 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
356
10
tobaru
parents: 9
diff changeset
357 <div style="text-align: center;">
tobaru
parents: 9
diff changeset
358 <img src="./image/gears_structure.png" alt="Gears OS の構造" width="400" />
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
359 </div>
10
tobaru
parents: 9
diff changeset
360
tobaru
parents: 9
diff changeset
361 <h1 id="par-goto">par goto</h1>
tobaru
parents: 9
diff changeset
362 <ul>
tobaru
parents: 9
diff changeset
363 <li>Context(Task) の複製には par goto を用いる。</li>
tobaru
parents: 9
diff changeset
364 <li>他に、入力の同期、タスクスケジューラへの Context の登録が行われる。</li>
tobaru
parents: 9
diff changeset
365 <li>複数実行した時に、共有 Data Gear に書き込みを成功したかを確認(commit)するために __exit を使用する。</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
366 <li>par goto で生成された Task は __exit に継続することで終了する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
367 <li>GearsOS の Task は Output Data Gear を生成した時点で終了する</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
368 <li>そのため、par goto では直接 __exit に継続せず、Output Data Gear への書き出し処理に継続される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
369 </ul>
10
tobaru
parents: 9
diff changeset
370
tobaru
parents: 9
diff changeset
371 <pre lang="c"><code>__code code1(Integer *integer1, Integer * integer2, Integer *output) {
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
372 par goto add(integer1, integer2, output, __exit);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
373 goto code2();
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
374 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
375 </code></pre>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
376
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
377
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
378 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
379 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
380 <!-- _S9SLIDE_ -->
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
381 <h2 id="perl--meta-data-gear-">Perl スクリプトによる Meta Data Gear の生成</h2>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
382
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
383 <pre lang="c"><code>__code code1(struct Context *context, Integer *integer1, Integer *integer2, Integer *output) {
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
384 // create context
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
385 context-&gt;task = NEW(struct Context);
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
386 initContext(context-&gt;task);
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
387
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
388 // set task parameter
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
389 context-&gt;task-&gt;next = C_add;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
390 context-&gt;task-&gt;idgCount = 2;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
391 context-&gt;task-&gt;idg = context-&gt;task-&gt;dataNum;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
392 context-&gt;task-&gt;maxIdg = context-&gt;task-&gt;idg + 2;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
393 context-&gt;task-&gt;odg = context-&gt;task-&gt;maxIdg;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
394 context-&gt;task-&gt;maxOdg = context-&gt;task-&gt;odg + 1;
10
tobaru
parents: 9
diff changeset
395 ...
9
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
396 // set TaskManager-&gt;spawns parameter
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
397 Gearef(context, TaskManager)-&gt;taskList = context-&gt;taskList;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
398 Gearef(context, TaskManager)-&gt;next1 = C_code2;
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
399 goto parGotoMeta(context, C_code2);
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
400 }
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
401 </code></pre>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
402
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
403
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
404 </div>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
405 <div class='slide '>
5790bdc1d515 add gears_structure
tobaru
parents: 8
diff changeset
406 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
407 <h2 id="section-4">スライドの流れ</h2>
0
tobaru
parents:
diff changeset
408 <ul>
10
tobaru
parents: 9
diff changeset
409 <li>Interface</li>
tobaru
parents: 9
diff changeset
410 <li>並列API</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
411 <li>CbC</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
412 <li>Gears OS における並列実行</li>
0
tobaru
parents:
diff changeset
413 <li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
414 <font color="red">比較</font>
0
tobaru
parents:
diff changeset
415 </li>
tobaru
parents:
diff changeset
416 <li>今後の課題</li>
tobaru
parents:
diff changeset
417 </ul>
tobaru
parents:
diff changeset
418
tobaru
parents:
diff changeset
419
tobaru
parents:
diff changeset
420 </div>
tobaru
parents:
diff changeset
421 <div class='slide '>
tobaru
parents:
diff changeset
422 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
423 <h2 id="gears-os--1">Gears OS の評価(目的)</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
424 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
425 <li>並列構文とそれを実現する Meta Compitation が十分に揃っているかを確認したい</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
426 <li>並列処理の台数効果を確認する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
427 <li>既存の並列言語と比較して不要なオーバーヘッドがあるか調べたい</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
428 </ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
429
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
430
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
431 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
432 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
433 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
434 <h2 id="gears-os--2">Gears OS の評価(環境)</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
435 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
436 <li>CPU、GPU環境で Gears OS の測定を行う。</li>
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
437 <li>使用した環境は次のようになる。
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
438 <ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
439 <li>CPU 環境
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
440 <ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
441 <li>Model : Dell PowerEdgeR630</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
442 <li>Memory : 768GB</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
443 <li>CPU : 2 × 18-Core Intel Xeon 2.30GHz</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
444 </ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
445 </li>
10
tobaru
parents: 9
diff changeset
446 <li>GPU 環境
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
447 <ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
448 <li>GPU : GeForce GTX 1070</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
449 <li>Cores : 1920</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
450 <li>ClockSpeed : 1683MHZ</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
451 <li>Memory Size : 8GB GDDR5</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
452 </ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
453 </li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
454 </ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
455 </li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
456 </ul>
0
tobaru
parents:
diff changeset
457
tobaru
parents:
diff changeset
458
tobaru
parents:
diff changeset
459 </div>
tobaru
parents:
diff changeset
460 <div class='slide '>
tobaru
parents:
diff changeset
461 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
462 <h2 id="twice">Twice</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
463 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
464 <li>評価には与えられた整数配列の全ての要素を2倍にする例題である Twice を使う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
465 <li>Twice では 通信時間を考慮しなければ、CPU より コア数の多い GPU が有利となる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
466 <li>要素数2^27のデータに対する Twice の実行結果を示す。
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
467 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
468 <li>CPU では2^27のデータを64個のデータに分割した。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
469 <li>kernel only は 通信速度を除いた速度である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
470 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
471 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
472 </ul>
0
tobaru
parents:
diff changeset
473
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
474 <table border="1" align="center" width="50%">
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
475 <tbody>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
476 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
477 <td style="text-align: center;">Processor</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
478 <td style="text-align: center;">Time(ms)</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
479 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
480 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
481 <td style="text-align: center;">1 CPU</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
482 <td style="text-align: right;">1181.215</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
483 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
484 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
485 <td style="text-align: center;">2 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
486 <td style="text-align: right;">627.914</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
487 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
488 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
489 <td style="text-align: center;">4 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
490 <td style="text-align: right;">324.059</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
491 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
492 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
493 <td style="text-align: center;">8 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
494 <td style="text-align: right;">159.932</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
495 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
496 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
497 <td style="text-align: center;">16 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
498 <td style="text-align: right;">85.518</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
499 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
500 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
501 <td style="text-align: center;">32 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
502 <td style="text-align: right;">43.496</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
503 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
504 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
505 <td style="text-align: center;">GPU</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
506 <td style="text-align: right;">127.018</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
507 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
508 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
509 <td style="text-align: center;">GPU(kernel only)</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
510 <td style="text-align: right;">6.018</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
511 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
512 </tbody>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
513 </table>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
514
0
tobaru
parents:
diff changeset
515
tobaru
parents:
diff changeset
516 </div>
tobaru
parents:
diff changeset
517 <div class='slide '>
tobaru
parents:
diff changeset
518 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
519 <h2 id="section-5">評価の考察</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
520 <ul>
10
tobaru
parents: 9
diff changeset
521 <li>コア数が上がるごとに、処理速度が上がっている。
tobaru
parents: 9
diff changeset
522 <ul>
tobaru
parents: 9
diff changeset
523 <li>台数効果が見られる</li>
tobaru
parents: 9
diff changeset
524 </ul>
tobaru
parents: 9
diff changeset
525 </li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
526 <li>GPUでの実行は 32CPU に比べて約7.2倍の速度向上が見られた。</li>
10
tobaru
parents: 9
diff changeset
527 <li>通信速度を含めると 16CPU より遅い。
tobaru
parents: 9
diff changeset
528 <ul>
tobaru
parents: 9
diff changeset
529 <li>通信速度によるオーバーヘッド</li>
tobaru
parents: 9
diff changeset
530 </ul>
tobaru
parents: 9
diff changeset
531 </li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
532 </ul>
0
tobaru
parents:
diff changeset
533
10
tobaru
parents: 9
diff changeset
534 <table border="1" align="center" width="50%">
tobaru
parents: 9
diff changeset
535 <tbody>
tobaru
parents: 9
diff changeset
536 <tr>
tobaru
parents: 9
diff changeset
537 <td style="text-align: center;">Processor</td>
tobaru
parents: 9
diff changeset
538 <td style="text-align: center;">Time(ms)</td>
tobaru
parents: 9
diff changeset
539 </tr>
tobaru
parents: 9
diff changeset
540 <tr>
tobaru
parents: 9
diff changeset
541 <td style="text-align: center;">1 CPU</td>
tobaru
parents: 9
diff changeset
542 <td style="text-align: right;">1181.215</td>
tobaru
parents: 9
diff changeset
543 </tr>
tobaru
parents: 9
diff changeset
544 <tr>
tobaru
parents: 9
diff changeset
545 <td style="text-align: center;">2 CPUs</td>
tobaru
parents: 9
diff changeset
546 <td style="text-align: right;">627.914</td>
tobaru
parents: 9
diff changeset
547 </tr>
tobaru
parents: 9
diff changeset
548 <tr>
tobaru
parents: 9
diff changeset
549 <td style="text-align: center;">4 CPUs</td>
tobaru
parents: 9
diff changeset
550 <td style="text-align: right;">324.059</td>
tobaru
parents: 9
diff changeset
551 </tr>
tobaru
parents: 9
diff changeset
552 <tr>
tobaru
parents: 9
diff changeset
553 <td style="text-align: center;">8 CPUs</td>
tobaru
parents: 9
diff changeset
554 <td style="text-align: right;">159.932</td>
tobaru
parents: 9
diff changeset
555 </tr>
tobaru
parents: 9
diff changeset
556 <tr>
tobaru
parents: 9
diff changeset
557 <td style="text-align: center;">16 CPUs</td>
tobaru
parents: 9
diff changeset
558 <td style="text-align: right;">85.518</td>
tobaru
parents: 9
diff changeset
559 </tr>
tobaru
parents: 9
diff changeset
560 <tr>
tobaru
parents: 9
diff changeset
561 <td style="text-align: center;">32 CPUs</td>
tobaru
parents: 9
diff changeset
562 <td style="text-align: right;">43.496</td>
tobaru
parents: 9
diff changeset
563 </tr>
tobaru
parents: 9
diff changeset
564 <tr>
tobaru
parents: 9
diff changeset
565 <td style="text-align: center;">GPU</td>
tobaru
parents: 9
diff changeset
566 <td style="text-align: right;">127.018</td>
tobaru
parents: 9
diff changeset
567 </tr>
tobaru
parents: 9
diff changeset
568 <tr>
tobaru
parents: 9
diff changeset
569 <td style="text-align: center;">GPU(kernel only)</td>
tobaru
parents: 9
diff changeset
570 <td style="text-align: right;">6.018</td>
tobaru
parents: 9
diff changeset
571 </tr>
tobaru
parents: 9
diff changeset
572 </tbody>
tobaru
parents: 9
diff changeset
573 </table>
tobaru
parents: 9
diff changeset
574
0
tobaru
parents:
diff changeset
575
tobaru
parents:
diff changeset
576 </div>
tobaru
parents:
diff changeset
577 <div class='slide '>
tobaru
parents:
diff changeset
578 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
579 <h2 id="go-">Go 言語との比較</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
580 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
581 <li>Go 言語でも Twice を用いた検証を行い、Gears OS との速度比較を行なった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
582 <li>1CPU と 32CPU では約4.33倍の速度向上が見られた。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
583 <li>CPU数による速度向上は、Gears OS の方が上だが、処理速度では Go言語の方が速い結果となった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
584 </ul>
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
585 <div style="text-align: center;">
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
586 <img src="./image/vsgo.svg" alt="Goとの比較" width="500" />
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
587 </div>
0
tobaru
parents:
diff changeset
588
tobaru
parents:
diff changeset
589
tobaru
parents:
diff changeset
590 </div>
tobaru
parents:
diff changeset
591 <div class='slide '>
tobaru
parents:
diff changeset
592 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
593 <h2 id="section-6">スライドの流れ</h2>
tobaru
parents: 9
diff changeset
594 <ul>
tobaru
parents: 9
diff changeset
595 <li>Interface</li>
tobaru
parents: 9
diff changeset
596 <li>並列API</li>
tobaru
parents: 9
diff changeset
597 <li>CbC</li>
tobaru
parents: 9
diff changeset
598 <li>Gears OS における並列実行</li>
tobaru
parents: 9
diff changeset
599 <li>比較</li>
tobaru
parents: 9
diff changeset
600 <li>
tobaru
parents: 9
diff changeset
601 <font color="red">今後の課題</font>
tobaru
parents: 9
diff changeset
602 </li>
tobaru
parents: 9
diff changeset
603 </ul>
tobaru
parents: 9
diff changeset
604
tobaru
parents: 9
diff changeset
605
tobaru
parents: 9
diff changeset
606 </div>
tobaru
parents: 9
diff changeset
607 <div class='slide '>
tobaru
parents: 9
diff changeset
608 <!-- _S9SLIDE_ -->
tobaru
parents: 9
diff changeset
609 <h2 id="section-7">スライドの流れ</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
610 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
611 <li>CbC</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
612 <li>Gears OS における並列実行</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
613 <li>比較</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
614 <li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
615 <font color="red">今後の課題</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
616 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
617 </ul>
0
tobaru
parents:
diff changeset
618
tobaru
parents:
diff changeset
619
tobaru
parents:
diff changeset
620 </div>
tobaru
parents:
diff changeset
621 <div class='slide '>
tobaru
parents:
diff changeset
622 <!-- _S9SLIDE_ -->
10
tobaru
parents: 9
diff changeset
623 <h2 id="section-8">今後の課題</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
624 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
625 <li>Go 言語との比較から 1CPU での動作が遅いことがわかった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
626 <li>par goto 文を使用することで、Contextを生成し、並列処理を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
627 <li>しかし、Context はメモリ空間の確保や使用する全ての Code Gear Data Gear の設定をする必要があり、生成に時間がかかってしまう事が原因。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
628 <li>処理が軽い場合は Context を生成しないようなチューニングが必要である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
629 </ul>
10
tobaru
parents: 9
diff changeset
630
tobaru
parents: 9
diff changeset
631
tobaru
parents: 9
diff changeset
632 </div>
tobaru
parents: 9
diff changeset
633 <div class='slide '>
tobaru
parents: 9
diff changeset
634 <!-- _S9SLIDE_ -->
tobaru
parents: 9
diff changeset
635 <h2 lang="c" id="perl">Perlスクリプトによる変換</h2>
tobaru
parents: 9
diff changeset
636 <pre><code>__code code1(struct Context *context, Integer *integer1, Integer *integer2, Integer *output) {
tobaru
parents: 9
diff changeset
637 // create context
tobaru
parents: 9
diff changeset
638 context-&gt;task = NEW(struct Context);
tobaru
parents: 9
diff changeset
639 initContext(context-&gt;task);
tobaru
parents: 9
diff changeset
640
tobaru
parents: 9
diff changeset
641 // set task parameter
tobaru
parents: 9
diff changeset
642 context-&gt;task-&gt;next = C_add;
tobaru
parents: 9
diff changeset
643 context-&gt;task-&gt;idgCount = 2;
tobaru
parents: 9
diff changeset
644 context-&gt;task-&gt;idg = context-&gt;task-&gt;dataNum;
tobaru
parents: 9
diff changeset
645 context-&gt;task-&gt;maxIdg = context-&gt;task-&gt;idg + 2;
tobaru
parents: 9
diff changeset
646 context-&gt;task-&gt;odg = context-&gt;task-&gt;maxIdg;
tobaru
parents: 9
diff changeset
647 context-&gt;task-&gt;maxOdg = context-&gt;task-&gt;odg + 1;
tobaru
parents: 9
diff changeset
648
tobaru
parents: 9
diff changeset
649 // create Data Gear Queue
tobaru
parents: 9
diff changeset
650 GET_META(integer1)-&gt;wait = createSynchronizedQueue(context);
tobaru
parents: 9
diff changeset
651 GET_META(integer2)-&gt;wait = createSynchronizedQueue(context);
tobaru
parents: 9
diff changeset
652 GET_META(integer3)-&gt;wait = createSynchronizedQueue(context);
tobaru
parents: 9
diff changeset
653
tobaru
parents: 9
diff changeset
654 // set Input Data Gear
tobaru
parents: 9
diff changeset
655 context-&gt;task-&gt;data[context-&gt;task-&gt;idg+0] = (union Data*)integer1;
tobaru
parents: 9
diff changeset
656 context-&gt;task-&gt;data[context-&gt;task-&gt;idg+1] = (union Data*)integer2;
tobaru
parents: 9
diff changeset
657
tobaru
parents: 9
diff changeset
658 // set Output Data Gear
tobaru
parents: 9
diff changeset
659 context-&gt;task-&gt;data[context-&gt;task-&gt;odg+0] = (union Data*)integer3;
tobaru
parents: 9
diff changeset
660
tobaru
parents: 9
diff changeset
661 // add taskList Element
tobaru
parents: 9
diff changeset
662 struct Element* element;
tobaru
parents: 9
diff changeset
663 element = &amp;ALLOCATE(context, Element)-&gt;Element;
tobaru
parents: 9
diff changeset
664 element-&gt;data = (union Data*)context-&gt;task;
tobaru
parents: 9
diff changeset
665 element-&gt;next = context-&gt;taskList;
tobaru
parents: 9
diff changeset
666 context-&gt;taskList = element;
tobaru
parents: 9
diff changeset
667
tobaru
parents: 9
diff changeset
668 // set TaskManager-&gt;spawns parameter
tobaru
parents: 9
diff changeset
669 Gearef(context, TaskManager)-&gt;taskList = context-&gt;taskList;
tobaru
parents: 9
diff changeset
670 Gearef(context, TaskManager)-&gt;next1 = C_code2;
tobaru
parents: 9
diff changeset
671 goto meta(context, C_code2);
tobaru
parents: 9
diff changeset
672 }
tobaru
parents: 9
diff changeset
673 </code></pre>
0
tobaru
parents:
diff changeset
674 <!-- === end markdown block === -->
tobaru
parents:
diff changeset
675 </div>
tobaru
parents:
diff changeset
676
tobaru
parents:
diff changeset
677
tobaru
parents:
diff changeset
678 </div><!-- presentation -->
tobaru
parents:
diff changeset
679 </body>
tobaru
parents:
diff changeset
680 </html>