annotate presen/sigos.html @ 21:f035e77dcca3 default tip

Update
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Wed, 01 Jun 2016 00:19:05 +0900
parents cd38e09f980b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 <!DOCTYPE html>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 <html>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 <head>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 <meta http-equiv="content-type" content="text/html;charset=utf-8">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 <title>Code Gear、 Data Gear に基づく OS のプロトタイプ</title>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 <meta name="generator" content="Slide Show (S9) v2.5.0 on Ruby 2.3.1 (2016-04-26) [x86_64-darwin15]">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 <meta name="author" content="伊波 立樹" >
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 <!-- style sheet links -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 <link rel="stylesheet" href="s6/themes/projection.css" media="screen,projection">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 <link rel="stylesheet" href="s6/themes/screen.css" media="screen">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 <link rel="stylesheet" href="s6/themes/print.css" media="print">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 <link rel="stylesheet" href="s6/themes/blank.css" media="screen,projection">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 <!-- JS -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 <script src="s6/js/jquery-1.11.3.min.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <script src="s6/js/jquery.slideshow.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 <script src="s6/js/jquery.slideshow.counter.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 <script src="s6/js/jquery.slideshow.controls.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 <script src="s6/js/jquery.slideshow.footer.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 <script src="s6/js/jquery.slideshow.autoplay.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 <!-- prettify -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 <link rel="stylesheet" href="scripts/prettify.css">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 <script src="scripts/prettify.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 <script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 $(document).ready( function() {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 Slideshow.init();
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 $('code').each(function(_, el) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 if (!el.classList.contains('noprettyprint')) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 el.classList.add('prettyprint');
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 el.style.display = 'block';
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 });
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 prettyPrint();
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 } );
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 </script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 <!-- Better Browser Banner for Microsoft Internet Explorer (IE) -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 <!--[if IE]>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 <script src="s6/js/jquery.microsoft.js"></script>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 <![endif]-->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 </head>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 <body>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 <div class="layout">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 <div id="header"></div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 <div id="footer">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 <div align="right">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 <img src="s6/images/logo.svg" width="200px">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 <div class="presentation">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 <div class='slide cover'>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 <table width="90%" height="90%" border="0" align="center">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 <td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 <div align="center">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 <h1><font color="#808db5">Code Gear、 Data Gear に基づく OS のプロトタイプ</font></h1>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 </td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 <td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 <div align="left">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 伊波 立樹
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
78 琉球大学理工学研究科
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 </td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 </table>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 <!-- === begin markdown block ===
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 generated by markdown/1.2.0 on Ruby 2.3.1 (2016-04-26) [x86_64-darwin15]
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
90 on 2016-05-31 11:06:27 +0900 with Markdown engine kramdown (1.11.1)
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 using options {}
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 <!-- _S9SLIDE_ -->
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
95 <h2 id="gears-os">Gears OS</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
96 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
97 <li>当研究室では 処理の単位を Code Gear、 データの単位を Data Gear を用いて
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
98 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
99 <li>並列性</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
100 <li>柔軟性</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
101 <li>信頼性</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
102 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
103 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
104 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
105
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
106 <p>を指標とした Gears OS を設計してきた</p>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
107
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
108 <ul>
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
109 <li>本研究では Gears OS のプロトタイプとして並列処理機構を Continuation based C(CbC) で実装を行う</li>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
110 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
111
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
112
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
113 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
114 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
115 <!-- _S9SLIDE_ -->
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
116 <h2 id="gears-os-">Gears OS の並列性</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
118 <li>Gears OS はプログラムの単位として Gear を用いる</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
119 <li>Gear には プログラムの処理を示す Code Gear、 Data を示す Data Gear がある</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
120 <li>Code/Data Gear を用いて記述することでプログラム全体の並列度を高め、効率的に並列処理することが可能</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
123 <div style="text-align: center;">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
124 <img src="./images/codeGear_dataGear.svg" alt="message" width="450" />
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
125 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
126
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 <!-- _S9SLIDE_ -->
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
131 <h2 id="gears-os--1">Gears OS の柔軟性</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
133 <li>Gears OS は Meta Computation を使用することで
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
134 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
135 <li>データ拡張や機能の追加</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
136 <li>GPU 等のさまざまなアーキテクチャでも同じプログラムの動作</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
137 <li>バージョンが異なる者同士がネットワーク接続しても通信</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
138 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
139 </li>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
140 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
141
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
142 <p>等を柔軟に対応する</p>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
143
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
144 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
145 <li>Meta Computation は 通常の Computaiton と階層を分けて処理を行う</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
146 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
147
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
148 <div style="text-align: center;">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
149 <img src="./images/meta_gear.svg" alt="message" width="800" />
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
150 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
151
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
152
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
153 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
154 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
155 <!-- _S9SLIDE_ -->
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
156 <h2 id="gears-os--2">Gears OS の信頼性</h2>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
157 <ul>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
158 <li>検証
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
159 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
160 <li>モデル検査を行う</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
161 <li>モデル検査は状態の数が膨大になると検査するのが難しい</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
162 <li>そのため、不必要な状態である環境やスタックをなるべく取り除き、処理を行う</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
163 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
164 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
165 <li>証明
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
166 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
167 <li>Code Gear と Data Gear を理論的に定義</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
168 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
169 </li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 <!-- _S9SLIDE_ -->
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
176 <h2 id="section">この発表は</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
178 <li>Gears OS でのGear</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
179 <li>Meta Computation</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
180 <li>Continuation based C(CbC)</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
181 <li>CbC を用いた Gears OS の記述</li>
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
182 <li>Gears OS の並列処理のプロトタイプ</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
183 <li>まとめ</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
184 <li>課題</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 <!-- _S9SLIDE_ -->
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
191 <h2 id="code-gear-data-gear">Code Gear、 Data Gear</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 <ul>
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
193 <li>Gears OS は Code Gear、 Data Gear という Gear で構成される</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 <li>Code Gear はプログラムの処理そのものを表す</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
195 <li>Data Gear は int や 文字列などの Data そのものを表す</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
196 <li>Code Gear は必要な Input Data Gear が揃ったら実行し、 Output Data Gear を生成する</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
197 <li>Code Gear と Input / Output Data Gear の対応から依存関係を解決し、 Code Gear の並列実行を行う</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 </ul>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
199
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
200 <div style="text-align: center;">
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
201 <img src="./images/codeGear_dataGear_dependency.svg" alt="message" width="600" />
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 <h2 id="meta-computation">Meta Computation</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 <ul>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
210 <li>Meta Computation は通常の Computation のための Computation</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
211 <li>並列処理の依存関係の解決、 GPUなどのアーキテクチャでの実行のために行う処理などを行う</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
212 <li>Gears OS では Meta Computation を Meta Code Gear, Meta Data Gear で表現</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
214
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
215
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 <h2 id="meta-gear">Meta Gear</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
221 <li>Meta Computation は Code/Data Gearの接続の間に行われる</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
222 <li>Meta Computation の処理も Code/Data Gear で実現する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
223 <li>この Gear を Meta Code/Data Gearと呼ぶ
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
224 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
225 <li>Meta Code Gear は Meta Computation のプログラム部分</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
226 <li>Meta Data Gear は Meta Code Gear で管理されるデータ部分</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
227 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
228 </li>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
229 <li>Gears OS は通常の Code/Data Gear から Meta Code/Data Gear 接続部分は見えないように実装を行う</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
231
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
232 <div style="text-align: center;">
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
233 <img src="./images/meta_cg_dg.svg" alt="message" width="850" />
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
234 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
235
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
236
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
237 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 <h2 id="continuation-based-c">Continuation based C</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 <ul>
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
242 <li>Gears OS の実装は本研究室で開発している Continuation based C(CbC) を用いる</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 <li>CbC は処理を Code Segment を用いて記述する事を基本とする</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
244 <li>Code Segment は Code Gear を同等のものため、 Gears OS を記述するのに適している</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
245 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
246
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
247
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 <h2 id="continuation-based-c-1">Continuation based C</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
253 <li>Code Segment の定義は <code>__code CS名</code> で行う</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 <li>Code Segment 間は <code>goto CS名</code> で移動する。この移動を継続と呼ぶ</li>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
255 <li>Code Segment の継続は C の関数呼び出しとは異なり、戻り値を持たないためスタックの変更を行わない
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
256 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
257 <li>このような環境を持たない継続を軽量継続と呼ぶ</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
258 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
259 </li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
261
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
262
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
263 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
264 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
265 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
266 <h2 id="continuation-based-c-2">Continuation based C</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
267 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
268 <li>このコードは code1、code2 の2つの Code Segment を定義している</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
269 <li>code1 内の <code>goto code2</code> でcode2 への継続を行っている</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
270 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
271
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
272 <pre lang="c"><code>/* code1 define */
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
273 __code code1(List list) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
274 ....
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
275 goto code2(list)
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
276 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
277
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
278 /* code2 define */
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
279 __code code2(List list) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
280 ...
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
281 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
282 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
283
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
284
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
285 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
286 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
287 <!-- _S9SLIDE_ -->
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
288 <h2 id="cbc--gears-os-">CbC を用いた Gears OS の記述</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
289 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
290 <li>Gears OS での Code Gear も Code Segment の定義のように記述する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
291 <li>各 Code Gear の引数は 必要な Data Gear を示す</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
292 <li>このコードでは 2つの Code Gear と 1つの Meta Code Gear を定義しており、 code1 から code2への継続を行っている</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
293 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
294
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
295 <pre lang="c"><code>__code code1(struct Array* array, struct LoopCounter* loopCounter) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
296 ...
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
297 goto code2(array);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
298 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
299
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
300 __code meta_code1(struct Context* context, enum Code next) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
301 goto (context-&gt;code[next])(context);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
302 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
303
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
304 __code code2(struct Array* array) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
305 ...
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
306 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
307 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
308
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
309
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
310 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
311 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
312 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
313 <h2 id="cbc--gears-os--1">CbC の Gears OS サポート</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
314 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
315 <li>実際は code1 から code2 への継続の間には Meta Code Gear である meta_code1 が実行される</li>
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
316 <li>通常は Meta Level の継続をプログラマーは意識する必要はない</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
317 <li>そこで、CbC は Code Gear 間の接続に自動的に Meta Code Gear を挟むというサポートを行う</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
318 <li>CbC のサポートを行うとこのコードのように展開される</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
319 <li>メタレベルのサポートの際は <strong>context</strong> という Meta Data Gear を使用する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
320 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
321
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
322 <pre lang="c"><code>__code code1(struct Context* context, struct Array* array, struct LoopCounter* loopCounter) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
323 ...
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
324 goto meta_code1(context, Code2);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
325 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
326
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
327 __code code1_stub(struct Context* context) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
328 goto code1(context, &amp;context-&gt;data[Node]-&gt;node.value-&gt;array, &amp;context-&gt;data[LoopCounter]-&gt;loopCounter);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
329 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
330
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
331 __code meta_code1(struct Context* context, enum Code next) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
332 goto (context-&gt;code[next])(context);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
333 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
334
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
335 __code code2(struct Context* context, struct Array* array) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
336 ...
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
337 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
338 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
339
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
340
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
341 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
342 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
343 <!-- _S9SLIDE_ -->
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
344 <h2 id="context">Context</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
345 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
346 <li>Context は
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
347 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
348 <li>接続可能な Code/Data Gear のリスト</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
349 <li>独立したメモリ空間
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
350 をもっている</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
351 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
352 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
353 <li>各 Code/Data Gear にアクセスする際は Context を経由する</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
354 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
355
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
356
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
357 </div>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
358 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
359 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
360 <h2 id="context-1">Context</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
361 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
362 <li>Context は
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
363 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
364 <li>実行可能な Code Gear の数を示す <strong>codeNum</strong></li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
365 <li>実行可能な Code Gear のリストを示す <strong>code</strong></li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
366 <li>Data Gear の Allocate 用の <strong>heapStart</strong>, <strong>heap</strong>, <strong>heapLimit</strong></li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
367 <li>Data Gear の数を示す <strong>dataNum</strong></li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
368 <li>Data Gear のリストを示す <strong>data</strong>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
369 で構成される</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
370 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
371 </li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
372 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
373
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
374 <pre lang="c"><code>/* context define */
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
375 struct Context {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
376 int codeNum;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
377 __code (**code) (struct Context*);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
378 void* heapStart;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
379 void* heap;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
380 long heapLimit;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
381 int dataNum;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
382 union Data **data;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
383 };
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
384 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
385
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
386
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
387 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
388 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
389 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
390 <h2 id="context-2">Context</h2>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
391 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
392 <li>実行可能な Code Gear の名前は <strong>enum code</strong> で定義する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
393 <li>Context の初期化時に名前と関数ポインタを対応付ける</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
394 <li>現在の Gears ではこの enum code 使って接続先の Code Gear を指定する</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
395 </ul>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
396
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
397 <pre lang="c"><code>enum Code {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
398 Code1,
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
399 Code2,
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
400 Code3,
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
401 Exit,
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
402 };
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
403 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
404
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
405
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
406 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
407 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
408 <!-- _S9SLIDE_ -->
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
409 <h2 id="data-gear-">Data Gear の表現</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
410 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
411 <li>使用する Data Gear は C の共用体と構造体を用いた表現をする</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
412 <li>これを元に Gears OS は 必要な Data Gear を allocate する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
413 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
414
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
415 <pre lang="c"><code>/* data Gear define */
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
416 union Data {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
417 struct Time {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
418 enum Code next;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
419 double time;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
420 } time;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
421 struct LoopCounter {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
422 int i;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
423 } loopCounter;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
424 ....
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
425 };
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
426 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
427
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
428
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
429 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
430 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
431 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
432 <h2 id="code-gear--stub">Code Gear の stub</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
433 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
434 <li>Data Gear にアクセスするにはContext を経由する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
435 <li>だが、通常の Code Gear では Meta Data Gear である Context の参照は避ける必要がある</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
436 <li>Gears OS では通常の Code Gear で必要な Data Gear を Context から取り出す stub を用意する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
437 <li>stub は一種の Meta Code Gear であるため、 CbC で自動生成される</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
438 <li>このコードでは Array と LoopCounter が必要な code1 の stub を示している</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
439 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
440
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
441 <pre lang="c"><code>__code code1(struct Context* context, struct Array* array, struct LoopCounter* loopCounter) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
442 ...
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
443 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
444
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
445 /* stub define */
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
446 __code code1_stub(struct Context* context) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
447 goto code1(context, &amp;context-&gt;data[Node]-&gt;node.value-&gt;array, &amp;context-&gt;data[LoopCounter]-&gt;loopCounter);
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
448 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
449 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
450
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
451
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
452 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
453 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
454 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
455 <h2 id="section-1">プロトタイプ の構成</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
456 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
457 <li>今回は並列処理を行う機構の実装を行う</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
458 <li>必要な要素は大きく5つ
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
459 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
460 <li>Context</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
461 <li>TaskQueue
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
462 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
463 <li>実行される Task のリストを扱う</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
464 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
465 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
466 <li>Persistent Data Tree
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
467 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
468 <li>Code Gear によって参照される Data Gear の管理を行う</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
469 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
470 </li>
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
471 <li>Worker
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
472 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
473 <li>TaskQueue から Task を取得し、実行する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
474 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
475 </li>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
476 <li>TaskManager
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
477 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
478 <li>Persistent Data Tree を監視し、 Task の依存関係を解決する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
479 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
480 </li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
481 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
482 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
483 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
484
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
485 <p>※ TaskManager は今回未実装</p>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
486
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
487
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
488 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
489 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
490 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
491 <h2 id="taskqueue">TaskQueue</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
492 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
493 <li>Task Queue は Task のリストを扱う</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
494 <li>すべての Thread で共有されるため、 Compare And Swap(CAS) を使用した Synchronized Queue として実装する</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
495 <li>TaskQueue は 2つで Data Gear で表現される
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
496 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
497 <li>先頭と末尾の要素を持った Queue 表す Data Gear</li>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
498 <li>Task と次の要素へのポインタを持った、リスト構造を表現する Element という Data Gear</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
499 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
500 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
501 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
502
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
503 <pre lang="c"><code>// Data Gear define
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
504 union Data {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
505 struct Queue {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
506 struct Element* first;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
507 struct Element* last;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
508 } queue;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
509
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
510 struct Element {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
511 struct Task* task;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
512 struct Elemen* next;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
513 } element
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
514 };
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
515 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
516
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
517
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
518 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
519 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
520 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
521 <h2 id="taskqueueenqueue">TaskQueueの操作(Enqueue)</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
522 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
523 <li>Task を挿入する場合 Queue の last から最後の要素を取り出し、次の要素に新しく挿入する要素を設定</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
524 <li>正しく最後の要素が変更できたことを CAS で 保証し、末尾の変更を行う必要がある</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
525 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
526
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
527 <pre lang="c"><code>__code putQueue3(struct Queue* queue, struct Element* new_element) {
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
528 struct Element* last = queue-&gt;last;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
529
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
530 if (__sync_bool_compare_and_swap(&amp;queue-&gt;last, last, new_element)) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 last-&gt;next = new_element;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
532
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
533 goto exit();
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
534 } else {
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
535 goto putQueue3(queue, new_element);
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
536 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
537 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
538
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
539 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
540
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
541
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
542 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
543 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
544 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
545 <h2 id="persistent-data-tree">Persistent Data Tree</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
546 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
547 <li>Persistent Data Tree は Data Gear の管理を行う</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
548 <li>TaskQueue と同じですべての Thread で共有される</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
549 <li>Red-Black Tree アルゴリズムを用いて木構造の平衡性を保つ</li>
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
550 <li>木構造から読み出される Data Gear は Code Gear の Input Data Gear, 書き出すData Gear は Output Data Gear になる</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
551 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
552
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
553 <div style="text-align: center;">
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
554 <img src="./images/persistent_date_tree_2.svg" alt="message" width="800" />
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
555 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
556
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
557
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
558 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
559 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
560 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
561 <h2 id="persistent-data-tree-1">Persistent Data Tree</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
562 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
563 <li>Persistent Data Tree は
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
564 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
565 <li>Tree 自体を示す Data Gear</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
566 <li>Node を示す Data Gear</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
567 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
568 </li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
569 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
570
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
571 <p>を用いて木構造を表現する</p>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
572
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
573 <pre lang="c"><code>union Data {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
574 struct Tree {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
575 struct Node* root;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
576 } tree;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
577 struct Node {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
578 int key; // comparable data segment
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
579 union Data* value;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
580 struct Node* left;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
581 struct Node* right;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
582 // need to balancing
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
583 enum Color {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
584 Red,
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
585 Black,
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
586 } color;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
587 } node;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
588 };
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
589 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
590
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
591
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
592 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
593 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
594 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
595 <h2 id="worker">Worker</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
597 <li>Worker は TaskQueue から Task を取得して実行する</li>
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
598 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
599
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
600 <table align="center">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
601 <tbody>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
602 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
603 <td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
604 <div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
605 <img src="./images/worker.svg" alt="message" width="600" />
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
606 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
607 </td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
608 <td>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
609 <ol>
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
610 <li> Worker は Task Queue から Task を取り出す(1. Dequeue Task)</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
611 <li> 取り出した Task には Tree の key が入っているため Tree からその key に対応した Input Data Gear を読み込む(2. Read Data Gear) </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
612 <li> Task に格納されている Code Gear を実行する </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
613 <li> Code Gear を実行した結果、生成された Output Data Gear を Tree に書き出す(3.Write Data Gear) </li>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
614 </ol>
19
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
615 </td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
616 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
617 </tbody>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
618 </table>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
619
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
620 <ul>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
621 <li>Task が完了したら次の Task を取得する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
622 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
623
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
624
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
625 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
626 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
627 <!-- _S9SLIDE_ -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
628 <h2 id="taskmanger">TaskManger</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
629 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
630 <li>TaskManager は Task の依存関係の解決を行う</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
631 <li>Thread の作成と停止も行う</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
632 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
633
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
634 <div style="text-align: center;">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
635 <img src="./images/taskManager.svg" alt="message" width="800" />
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
636 </div>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
637
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
638
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
639 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
640 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
641 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
642 <h2 id="section-2">プロトタイプの実行</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
643 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
644 <li>今回 Gears OS の構成要素である Persistent Data Tree, TaskQueue, Worker の実装を行った</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
645 <li>これにより、 Gears OS を用いて依存関係のない並列処理の実行が可能になった</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
646 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
647
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
648
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
649 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
650 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
651 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
652 <h2 id="gears-os--code-gear-">Gears OS で実行する Code Gear 例</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
653 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
654 <li>プロトタイプのタスクの例題として Twice を実装した</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
655 <li>Twice は与えられた整数配列を2倍にする例題である</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
656 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
657
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
658 <pre lang="c"><code>// Twice Code Gear
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
659 __code twice(struct LoopCounter* loopCounter, int index, int alignment, int* array) {
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
660 int i = loopCounter-&gt;i;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
661
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
662 if (i &lt; alignment) {
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
663 array[i+index*alignment] = array[i+index*alignment]*2;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
664 loopCounter-&gt;i++;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
665
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
666 goto twice(loopCounter, index, alignment, array);
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
667 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
668
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
669 loopCounter-&gt;i = 0;
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
670
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
671 goto exit();
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
672 }
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
673 </code></pre>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
674
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
675
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
676 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
677 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
678 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
679 <h2 id="section-3">並列処理の確認</h2>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
680 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
681 <li>Twice を使用し、Gears OS が実際に並列処理されているかどうかの確認を行った</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
682 <li>環境
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
683 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
684 <li>Memory : 16GB</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
685 <li>CPU : 6-core Intel Xeon 2.66GHZ x 2</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
686 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
687 </li>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
688 <li>要素数 : 2^17 * 1000</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
689 <li>分割数 : 640 タスク</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
690 <li>1 Task 当たりの処理量 : 2^11 * 100 elements</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
691 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
692
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
693 <table border="1" align="center" width="50%">
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
694 <tbody>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
695 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
696 <td style="text-align: center;">Number of Processors</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
697 <td style="text-align: center;">Time(ms)</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
698 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
699 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
700 <td style="text-align: center;">1 CPU</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
701 <td style="text-align: right;">1315</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
702 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
703 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
704 <td style="text-align: center;">2 CPUs</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
705 <td style="text-align: right;">689</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
706 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
707 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
708 <td style="text-align: center;">4 CPUs</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
709 <td style="text-align: right;">366</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
710 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
711 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
712 <td style="text-align: center;">8 CPUs</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
713 <td style="text-align: right;">189</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
714 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
715 <tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
716 <td style="text-align: center;">12 CPUs</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
717 <td style="text-align: right;">111</td>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
718 </tr>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
719 </tbody>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
720 </table>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
721
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
722 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
723 <li>1cpu と 12cpu では 11.8 倍の向上が見られた</li>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
724 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
725
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
726
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
727 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
728 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
729 <!-- _S9SLIDE_ -->
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
730 <h2 id="cerium-">Cerium との比較</h2>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
731 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
732 <li>Cerium は本研究室で開発していた並列プログラミングフレームワーク</li>
21
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 20
diff changeset
733 <li>Cerium では Task を依存関係に沿って実行することで並列実行を可能にする
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
734 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
735 <li>本来 Task はデータに依存するもので Task 間の依存関係ではデータの依存関係を保証することが出来ない</li>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
736 <li>Gears OS の Task 中身は Code Gear になっており、必要な Input Data Gear が揃わない限り実行しないため、データの依存関係を保証できる</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
737 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
738 </li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
739 <li>Task には汎用ポインタとしてデータの受け渡しを行う
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
740 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
741 <li>型情報がなく、型の検査を行うことが出来ない</li>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
742 <li>Gears OS では 型情報をもつ Data Gear を定義</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
743 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
744 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
745 </ul>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
746
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
747
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
748 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
749 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
750 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
751 <h2 id="os-">既存の OS への対応</h2>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
752 <ul>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
753 <li>Gears OS は従来の OS が行ってきたネットワーク管理、メモリ管理、並行制御などのメタな部分を Meta Code/Data Gear として定義</li>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
754 <li>通常の Code Gear から必要な制御を Meta Code Gear で行うことで従来のOSが行ってきた制御の提供を行う</li>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
755 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
756
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
757
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
758 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
759 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
760 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
761 <h2 id="section-4">まとめ</h2>
17
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
762 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
763 <li>Code Gear、 Data Gear によって構成される Gears OS の基本的な機能として TaskQueue、 Persistent Data Tree、 Worker の実装を行った</li>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
764 <li>依存関係のない Twice を実装し、並列処理が行えることを確認した</li>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
765 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
766
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
767
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
768 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
769 <div class='slide '>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
770 <!-- _S9SLIDE_ -->
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
771 <h2 id="section-5">今後の課題</h2>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
772 <ul>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
773 <li>一般的に並列処理には依存関係が存在する
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
774 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
775 <li>複雑な並列処理を実行できるようにするために Task Manager の実装を行い、 依存関係のある並列処理の例題を作成し、評価する</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
776 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
777 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
778 <li>GPUなどの他のプロセッサ演算に利用することが出来ない
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
779 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
780 <li>Data Gear などのデータをGPUにマッピングするための機構が必要</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
781 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
782 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
783 <li>Gears OS でのデバック手法
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
784 <ul>
20
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
785 <li>継続はスタックを積まないため、スタックトレースを使わないデバック手法の考案</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
786 <li>並列処理でのデバック手法も考案する必要がある</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
787 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
788 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
789 <li>型情報の検査
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
790 <ul>
18
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
791 <li>プログラムの正しさを保証するために Data Gear の情報を検査するシステムを Meta Computation として実装する</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
792 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
793 </li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
794 <li>Contextの動的生成
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
795 <ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
796 <li>今は静的に自分で生成している</li>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
797 <li>CbC 用の Runtime をつくり、 Context を動的に生成</li>
16
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
798 </ul>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
799 </li>
15
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
800 </ul>
14
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
801 <!-- === end markdown block === -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
802 </div>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
803
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
804
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
805 </div><!-- presentation -->
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
806 </body>
Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
parents:
diff changeset
807 </html>