annotate Slide/prosym.pdf.html @ 7:dfa8973bfe10

add images
author tobaru
date Sun, 20 May 2018 21:12:40 +0900
parents 07b7aba92874
children f275411f458d
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]
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
73 on 2018-05-20 21:11:28 +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>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
83 <li>OS は非決定的な実行を持ち、従来の OS ではテストしきれない部分が残ってしまうため、信頼性が欠けてしまう。</li>
0
tobaru
parents:
diff changeset
84 </ul>
tobaru
parents:
diff changeset
85 </li>
3
7f5c0330e711 add module API
tobaru
parents: 2
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_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
93 <h2 id="api-">API と実装の分離</h2>
0
tobaru
parents:
diff changeset
94 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
95 <li>Gears OS は Continuation based C(以下、CbC)によって記述されている。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
96 <li>CbC は Code Gear と Data Gear の単位でプログラムを記述していて、システムやアプリケーションを作る際に、この2つは柔軟に再利用する必要がある。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
97 <li>この時に、機能を接続する API と実装の分離が可能であることが望ましい。</li>
0
tobaru
parents:
diff changeset
98 </ul>
tobaru
parents:
diff changeset
99
tobaru
parents:
diff changeset
100
tobaru
parents:
diff changeset
101 </div>
tobaru
parents:
diff changeset
102 <div class='slide '>
tobaru
parents:
diff changeset
103 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
104 <h2 id="gears-os-interface">Gears OS での形式化とInterfaceの導入</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
105 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
106 <li>形式化とは仕様、実装、実行を Logic で記述する事である。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
107 <li>Gears OS では、継続を使った関数型プログラムとして実装を記述する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
108 <li>Logic としては、依存型関数言語である Agda を使う(前の発表)</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
109 <li>証明とモデル検査を使って、信頼性を確保する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
110 </ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
111
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
112
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
113 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
114 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
115 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
116 <h2 id="gears-os--interface">Gears OS の Interface</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
117 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
118 <li>この時、Code Gear と Deta Gear は Interface と呼ばれるまとまり(モジュール)で記述される。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
119 <li>Interface 作成時に Code Gear の集合を指定することにより複数の実装を持つことができる。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
120 <li>Interface は Data Gear で記述されて、Meta Deta Gear と呼ばれる。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
121 <li>Java などの Class に相当する。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
122 <li>Interface を外から呼び出すための Code Gear 群の型</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
123 <li>Interface を呼び出す時に必要となる引数を全て格納する Data Gear</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
124 <li>実装に使う Code Gear の番号が含まれている。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
125 <li>Code Gear の番号を変更することによって異なる実装を実現できる</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
126 </ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
127
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
128
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
129 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
130 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
131 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
132 <h2 id="api">並列API</h2>
0
tobaru
parents:
diff changeset
133 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
134 <li>Geas OS 信頼性を保証するために、形式化されたモジュールシステムが必要である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
135 <li>本研究では、モジュールシステムとその応用である並列APIについて考察する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
136 <li>並列APIは継続を基本とした関数型プログラミングと両立する必要があり、ここでは CbC の goto 文を拡張した par goto を導入する。</li>
0
tobaru
parents:
diff changeset
137 </ul>
tobaru
parents:
diff changeset
138
tobaru
parents:
diff changeset
139
tobaru
parents:
diff changeset
140 </div>
tobaru
parents:
diff changeset
141 <div class='slide '>
tobaru
parents:
diff changeset
142 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
143 <h2 id="section">スライドの流れ</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
144 <ul>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
145 <li>Interface</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
146 <li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
147 <font color="red">CbC</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
148 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
149 <li>Gears OS における並列実行</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
150 <li>比較</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
151 <li>今後の課題</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
152 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
153
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
154
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
155 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
156 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
157 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
158 <h2 id="cbc">CbC</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
159 <ul>
5
tobaru
parents: 4
diff changeset
160 <li>ノーマルレベルとメタレベルの計算を1つの言語で表現できる言語として、本研究室で設計した CbC を用いる。</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
161 <li>ノーマルレベルの計算
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
162 <ul>
5
tobaru
parents: 4
diff changeset
163 <li>コンピュータの計算はプログラミング言語で行われる。</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
164 <li>その部分をノーマルレベルの計算と呼ぶ。</li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
165 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
166 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
167 <li>メタレベルの計算
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
168 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
169 <li>コードが実行される際の以下の部分が、メタレベルの計算という。
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
170 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
171 <li>処理系の詳細や使用する資源</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
172 <li>コードの仕様や型などの部分</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
173 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
174 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
175 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
176 </li>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
177 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
178
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
179
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
180 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
181 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
182 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
183 <h2 id="cbc-1">CbC</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
184 <ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
185 <li>CbC を用いることで、ノーマルレベルの計算の信頼性をメタレベルから保証できるようになる。</li>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
186 <li>CbC を用いてCode Gear と Data Gear を導入する。</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
187 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
188
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
189
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
190 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
191 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
192 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
193 <h2 id="cbc-">CbC の構文</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
194 <ul lang="c">
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
195 <li>CbC の Code Gear は __code という型を持つ関数として記述する。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
196 <li>継続で次の Code Gear に遷移するので、戻り値は持たない。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
197 <li>遷移は goto 文による継続で処理を行い、引数として入出力を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
198 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
199 <pre><code>__code cg0(int a, int b) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
200 goto cg1(a+b);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
201 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
202 __code cg1(int c) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
203 goto cg2(c);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
204 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
205 </code></pre>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
206 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
207 <li>CbC の記述だけでは並列実行にならない</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
208 </ul>
5
tobaru
parents: 4
diff changeset
209
tobaru
parents: 4
diff changeset
210
tobaru
parents: 4
diff changeset
211 </div>
tobaru
parents: 4
diff changeset
212 <div class='slide '>
tobaru
parents: 4
diff changeset
213 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
214 <h2 id="section-1">スライドの流れ</h2>
5
tobaru
parents: 4
diff changeset
215 <ul>
tobaru
parents: 4
diff changeset
216 <li>CbC</li>
tobaru
parents: 4
diff changeset
217 <li>
tobaru
parents: 4
diff changeset
218 <font color="red">Gears OS における並列実行</font>
tobaru
parents: 4
diff changeset
219 </li>
tobaru
parents: 4
diff changeset
220 <li>比較</li>
tobaru
parents: 4
diff changeset
221 <li>今後の課題</li>
tobaru
parents: 4
diff changeset
222 </ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
223
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
224
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
225 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
226 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
227 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
228 <h2 id="gears-">Gears における並列実行</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
229 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
230 <li>Gears OS ではメタ計算を柔軟に記述するためのプログラミングの単位として Code Gear と Data Gear を用いる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
231 <li>それぞれにメタレベルの単位が存在し、Meta Data Gear と Meta Code Gear と呼ぶ。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
232 <li>メタレベルの計算は Perl スクリプトによって生成され、Code Gear で記述される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
233 </ul>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
234 <div style="text-align: center;">
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
235 <img src="./image/meta_cg_dg.svg" alt="Gears OS の構造" width="700" />
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
236 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
237
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
238
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
239 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
240 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
241 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
242 <h2 id="gears-os-">Gears OS の構造</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
243 <div style="text-align: center;">
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
244 <img src="./image/gearsos.svg" alt="Gears OS の構造" width="700" />
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
245 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
246
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
247
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
248 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
249 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
250 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
251 <h2 id="context">Context</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
252 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
253 <li>1つのスレッド内で使われる Interface の Code Gear と Data Gear は Meta Data Gear に格納される。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
254 <li>この Meta Data Gear を Context と呼ぶ。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
255 <li>Context を複製して複数の CPU に割り当てることにより並列実行が可能になる。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
256 <li>Context は Task でもある。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
257 <li>Task は実行する Code Gear と Data Gear を全て持っている。</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
258 </ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
259
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
260
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
261 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
262 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
263 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
264 <h2 id="par-goto">par goto</h2>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
265 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
266 <li>Context の複製には par goto を用いる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
267 <li>他に、入力の同期、タスクスケジューラへの Context の登録が行われる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
268 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
269
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
270
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
271 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
272 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
273 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
274 <h2 id="code-gear--code-gear-">1つの Code Gear の実行は他の Code Gear に割り込まれない</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
275 <ul>
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
276 <li>共有された Data Gear があった時に、それに対する変更はただ1つの Code Gear だけが許される</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
277 <li>読み込みは複数であってもいい</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
278 <li>Agda 側で、並列実行を Code Gear の順次実行としてシミュレーションするため</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
279 <li>このような実行になるように Gears OS の実装を行う</li>
2
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
280 </ul>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
281
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
282
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
283 </div>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
284 <div class='slide '>
60405cc47b3a chapter1
tobaru
parents: 0
diff changeset
285 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
286 <h2 id="exit">__exit</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
287 <ul lang="c">
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
288 <li>複数実行した時に、共有 Data Gear に書き込みを成功したかを確認する(commit)</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
289 <li>par goto で生成された Task は __exit に継続することで終了する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
290 <li>GearsOS の Task は Output Data Gear を生成した時点で終了する</li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
291 <li>そのため、par goto では直接 __exit に継続せず、Output Data Gear への書き出し処理に継続される。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
292 <li>Code Gear と Data Gear の依存関係をノーマルレベルで記述できるようになる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
293 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
294 <pre><code>__code code1(Integer *integer1, Integer * integer2, Integer *output) {
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
295 par goto add(integer1, integer2, output, __exit);
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
296 goto code2();
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
297 }
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
298 </code></pre>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
299
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
300
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
301 </div>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
302 <div class='slide '>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
303 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
304 <h2 id="section-2">スライドの流れ</h2>
0
tobaru
parents:
diff changeset
305 <ul>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
306 <li>CbC</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
307 <li>Gears OS における並列実行</li>
0
tobaru
parents:
diff changeset
308 <li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
309 <font color="red">比較</font>
0
tobaru
parents:
diff changeset
310 </li>
tobaru
parents:
diff changeset
311 <li>今後の課題</li>
tobaru
parents:
diff changeset
312 </ul>
tobaru
parents:
diff changeset
313
tobaru
parents:
diff changeset
314
tobaru
parents:
diff changeset
315 </div>
tobaru
parents:
diff changeset
316 <div class='slide '>
tobaru
parents:
diff changeset
317 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
318 <h2 id="gears-os--1">Gears OS の評価(目的)</h2>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
319 <ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
320 <li>並列構文とそれを実現する Meta Compitation が十分に揃っているかを確認したい</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
321 <li>並列処理の台数効果を確認する</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
322 <li>既存の並列言語と比較して不要なオーバーヘッドがあるか調べたい</li>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
323 </ul>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
324
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
325
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
326 </div>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
327 <div class='slide '>
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
328 <!-- _S9SLIDE_ -->
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
329 <h2 id="gears-os--2">Gears OS の評価(環境)</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
330 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
331 <li>CPU、GPU環境で Gears OS の測定を行う。</li>
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
332 <li>使用した環境は次のようになる。
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
333 <ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
334 <li>CPU 環境
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
335 <ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
336 <li>Model : Dell PowerEdgeR630</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
337 <li>Memory : 768GB</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
338 <li>CPU : 2 × 18-Core Intel Xeon 2.30GHz</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
339 </ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
340 </li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
341 <li>CPU 環境
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
342 <ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
343 <li>GPU : GeForce GTX 1070</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
344 <li>Cores : 1920</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
345 <li>ClockSpeed : 1683MHZ</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
346 <li>Memory Size : 8GB GDDR5</li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
347 </ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
348 </li>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
349 </ul>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
350 </li>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
351 </ul>
0
tobaru
parents:
diff changeset
352
tobaru
parents:
diff changeset
353
tobaru
parents:
diff changeset
354 </div>
tobaru
parents:
diff changeset
355 <div class='slide '>
tobaru
parents:
diff changeset
356 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
357 <h2 id="twice">Twice</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
358 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
359 <li>評価には与えられた整数配列の全ての要素を2倍にする例題である Twice を使う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
360 <li>Twice では 通信時間を考慮しなければ、CPU より コア数の多い GPU が有利となる。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
361 <li>要素数2^27のデータに対する Twice の実行結果を示す。
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
362 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
363 <li>CPU では2^27のデータを64個のデータに分割した。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
364 <li>kernel only は 通信速度を除いた速度である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
365 </ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
366 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
367 </ul>
0
tobaru
parents:
diff changeset
368
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
369 <table border="1" align="center" width="50%">
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
370 <tbody>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
371 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
372 <td style="text-align: center;">Processor</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
373 <td style="text-align: center;">Time(ms)</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
374 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
375 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
376 <td style="text-align: center;">1 CPU</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
377 <td style="text-align: right;">1181.215</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
378 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
379 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
380 <td style="text-align: center;">2 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
381 <td style="text-align: right;">627.914</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
382 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
383 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
384 <td style="text-align: center;">4 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
385 <td style="text-align: right;">324.059</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
386 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
387 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
388 <td style="text-align: center;">8 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
389 <td style="text-align: right;">159.932</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
390 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
391 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
392 <td style="text-align: center;">16 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
393 <td style="text-align: right;">85.518</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
394 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
395 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
396 <td style="text-align: center;">32 CPUs</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
397 <td style="text-align: right;">43.496</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
398 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
399 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
400 <td style="text-align: center;">GPU</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
401 <td style="text-align: right;">127.018</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
402 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
403 <tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
404 <td style="text-align: center;">GPU(kernel only)</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
405 <td style="text-align: right;">6.018</td>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
406 </tr>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
407 </tbody>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
408 </table>
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
409
0
tobaru
parents:
diff changeset
410
tobaru
parents:
diff changeset
411 </div>
tobaru
parents:
diff changeset
412 <div class='slide '>
tobaru
parents:
diff changeset
413 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
414 <h2 id="section-3">評価の考察</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
415 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
416 <li>コア数が上がるごとに、処理速度が上がっている。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
417 <li>GPUでの実行は 32CPU に比べて約7.2倍の速度向上が見られた。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
418 <li>通信速度を含めると 16CPU より遅い。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
419 </ul>
0
tobaru
parents:
diff changeset
420
tobaru
parents:
diff changeset
421
tobaru
parents:
diff changeset
422 </div>
tobaru
parents:
diff changeset
423 <div class='slide '>
tobaru
parents:
diff changeset
424 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
425 <h2 id="go-">Go 言語との比較</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
426 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
427 <li>Go 言語でも Twice を用いた検証を行い、Gears OS との速度比較を行なった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
428 <li>1CPU と 32CPU では約4.33倍の速度向上が見られた。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
429 <li>CPU数による速度向上は、Gears OS の方が上だが、処理速度では Go言語の方が速い結果となった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
430 </ul>
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
431 <div style="text-align: center;">
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
432 <img src="./image/vsgo.svg" alt="Goとの比較" width="500" />
4
c456e4d68e1a add image file
tobaru
parents: 3
diff changeset
433 </div>
0
tobaru
parents:
diff changeset
434
tobaru
parents:
diff changeset
435
tobaru
parents:
diff changeset
436 </div>
tobaru
parents:
diff changeset
437 <div class='slide '>
tobaru
parents:
diff changeset
438 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
439 <h2 id="section-4">スライドの流れ</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
440 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
441 <li>CbC</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
442 <li>Gears OS における並列実行</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
443 <li>比較</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
444 <li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
445 <font color="red">今後の課題</font>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
446 </li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
447 </ul>
0
tobaru
parents:
diff changeset
448
tobaru
parents:
diff changeset
449
tobaru
parents:
diff changeset
450 </div>
tobaru
parents:
diff changeset
451 <div class='slide '>
tobaru
parents:
diff changeset
452 <!-- _S9SLIDE_ -->
7
dfa8973bfe10 add images
tobaru
parents: 5
diff changeset
453 <h2 id="section-5">今後の課題</h2>
3
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
454 <ul>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
455 <li>Go 言語との比較から 1CPU での動作が遅いことがわかった。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
456 <li>par goto 文を使用することで、Contextを生成し、並列処理を行う。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
457 <li>しかし、Context はメモリ空間の確保や使用する全ての Code Gear Data Gear の設定をする必要があり、生成に時間がかかってしまう事が原因。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
458 <li>処理が軽い場合は Context を生成しないようなチューニングが必要である。</li>
7f5c0330e711 add module API
tobaru
parents: 2
diff changeset
459 </ul>
0
tobaru
parents:
diff changeset
460 <!-- === end markdown block === -->
tobaru
parents:
diff changeset
461 </div>
tobaru
parents:
diff changeset
462
tobaru
parents:
diff changeset
463
tobaru
parents:
diff changeset
464 </div><!-- presentation -->
tobaru
parents:
diff changeset
465 </body>
tobaru
parents:
diff changeset
466 </html>