comparison s6/blank.html @ 1:3488934d6d23

hoge
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Fri, 09 May 2014 11:17:10 +0900
parents 6dca8c7e1cb6
children 105ba499ae40
comparison
equal deleted inserted replaced
0:6dca8c7e1cb6 1:3488934d6d23
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset='utf-8'> 4 <meta charset='utf-8'>
5 <title>[your_title]</title> 5 <title>Seminar</title>
6 6
7 <!-- 7 <!--
8 Notes on CSS media types used: 8 Notes on CSS media types used:
9 9
10 1) projection -> slideshow mode (display one slide at-a-time; hide all others) 10 1) projection -> slideshow mode (display one slide at-a-time; hide all others)
11 2) screen -> outline mode (display all slides-at-once on screen) 11 2) screen -> outline mode (display all slides-at-once on screen)
12 3) print -> print (and print preview) 12 3) print -> print (and print preview)
13 13
14 Note: toggle between projection/screen (that is, slideshow/outline) mode using t-key 14 Note: toggle between projection/screen (that is, slideshow/outline) mode using t-key
15 15
16 Questions, comments? 16 Questions, comments?
17 - send them along to the mailinglist/forum online @ http://groups.google.com/group/webslideshow 17 - send them along to the mailinglist/forum online @ http://groups.google.com/group/webslideshow
18 --> 18 -->
19 19
20 <!-- style sheet links --> 20 <!-- style sheet links -->
21 <link rel="stylesheet/less" href="themes/blank/projection.css.less" media="screen,projection"> 21 <link rel="stylesheet/less" href="themes/blank/projection.css.less" media="screen,projection">
22 <link rel="stylesheet/less" href="themes/blank/screen.css.less" media="screen"> 22 <link rel="stylesheet/less" href="themes/blank/screen.css.less" media="screen">
23 <link rel="stylesheet/less" href="themes/blank/print.css.less" media="print"> 23 <link rel="stylesheet/less" href="themes/blank/print.css.less" media="print">
24 24
25 <link rel="stylesheet/less" href="blank.css.less" media="screen,projection"> 25 <link rel="stylesheet/less" href="blank.css.less" media="screen,projection">
26 26
27 <!-- Notes about less css support 27 <!-- Notes about less css support
28 - all less stylesheets (*.css.less) need to get listed/loaded first (before the less.js script) 28 - all less stylesheets (*.css.less) need to get listed/loaded first (before the less.js script)
29 - find more info about less.js online @ http://lesscss.org 29 - find more info about less.js online @ http://lesscss.org
30 30
31 ***** NOTE: 31 ***** NOTE:
32 less.js browser script currently won’t work if you’re using Google Chrome 32 less.js browser script currently won’t work if you’re using Google Chrome
33 and the path to your page starts with "file:///" due to a known Chrome issue. 33 and the path to your page starts with "file:///" due to a known Chrome issue.
34 (In the developer/js console you will see: 34 (In the developer/js console you will see:
35 XMLHttpRequest cannot load file:///../s6/shared/projection.css.less. 35 XMLHttpRequest cannot load file:///../s6/shared/projection.css.less.
36 Cross origin requests are only supported for HTTP.) 36 Cross origin requests are only supported for HTTP.)
37 --> 37 -->
38 38
39 <!-- add js libs (less, jquery) --> 39 <!-- add js libs (less, jquery) -->
40 <script src="js/less-1.1.4.min.js"></script> 40 <script src="js/less-1.1.4.min.js"></script>
41 <script src="js/jquery-1.7.min.js"></script> 41 <script src="js/jquery-1.7.min.js"></script>
42 42
43 <!-- S6 JS --> 43 <!-- S6 JS -->
44 <script src="js/jquery.slideshow.js"></script> 44 <script src="js/jquery.slideshow.js"></script>
45 <script src="js/jquery.slideshow.counter.js"></script> 45 <script src="js/jquery.slideshow.counter.js"></script>
46 <script src="js/jquery.slideshow.controls.js"></script> 46 <script src="js/jquery.slideshow.controls.js"></script>
47 <script src="js/jquery.slideshow.footer.js"></script> 47 <script src="js/jquery.slideshow.footer.js"></script>
48 <script src="js/jquery.slideshow.autoplay.js"></script> 48 <script src="js/jquery.slideshow.autoplay.js"></script>
49 <script> 49 <script>
50 $(document).ready( function() { 50 $(document).ready( function() {
51 Slideshow.init(); 51 Slideshow.init();
52 52
53 // Example 2: Start Off in Outline Mode 53 // Example 2: Start Off in Outline Mode
54 // Slideshow.init( { mode: 'outline' } ); 54 // Slideshow.init( { mode: 'outline' } );
55 55
56 // Example 3: Use Custom Transition 56 // Example 3: Use Custom Transition
57 // Slideshow.transition = transitionScrollUp; 57 // Slideshow.transition = transitionScrollUp;
58 // Slideshow.init(); 58 // Slideshow.init();
59 59
60 // Example 4: Start Off in Autoplay Mode with Custom Transition 60 // Example 4: Start Off in Autoplay Mode with Custom Transition
61 // Slideshow.transition = transitionScrollUp; 61 // Slideshow.transition = transitionScrollUp;
62 // Slideshow.init( { mode: 'autoplay' } ); 62 // Slideshow.init( { mode: 'autoplay' } );
63 } ); 63 } );
64 </script> 64 </script>
65 65
66 <!-- Better Browser Banner for Microsoft Internet Explorer (IE) --> 66 <!-- Better Browser Banner for Microsoft Internet Explorer (IE) -->
67 <!--[if IE]> 67 <!--[if IE]>
68 <script src="js/jquery.microsoft.js"></script> 68 <script src="js/jquery.microsoft.js"></script>
69 <![endif]--> 69 <![endif]-->
70 70
71 </head> 71 </head>
72 <body> 72 <body>
73 73
74 <div class="layout"> 74 <div class="layout">
75 <div id="header"></div> 75 <div id="header"></div>
76 <div id="footer"> 76 <div id="footer">
77 <div align="right"> 77 <div align="right">
78 <img src="images/concurrency.png" width="200"> 78 <img src="images/concurrency.png" width="200">
79 </div>
80 </div>
79 </div> 81 </div>
80 </div> 82
81 </div> 83 <div class="presentation">
82 84
83 <div class="presentation"> 85 <!-- add slides here; example -->
84 86
85 <!-- add slides here; example --> 87 <div class='slide cover'>
86 88 <table width="90%" height="90%" border="0" align="center">
87 <div class='slide cover'> 89 <tr>
88 <table width="90%" height="90%" border="0" align="center"> 90 <td><div align="center">
89 <tr> 91 <h1><font color="#808db5">CeriumにおけるGPUとMultiCore CPUの同時実行</font></h1>
90 <td><div align="center"> 92 </div></td>
91 <h1><font color="#808db5">CeriumにおけるGPUとMultiCore CPUの同時実行</font></h1> 93 </tr>
92 </div></td> 94 <tr>
93 </tr> 95 <td><div align="left">
94 <tr> 96 Yuhi TOMARI
95 <td><div align="left"> 97 <script>
96 <name>Yuhi TOMARI Apr 8,2014</name> 98 var date = new Date();
97 </div></td> 99 var year = date.getFullYear();
98 </tr> 100 var month = date.getMonth();
99 </table> 101 var day = date.getDate();
100 </div> 102
101 103 var monthList = new Array("January","February","March","April","May","June",
102 <div class='slide'> 104 "July","August","September","October","November","December");
103 <h2>研究目的</h2> 105
104 <p> 106 document.write(monthList[month]+" "+day+", "+year);
105 当研究室ではCellおよびLinux、 107
106 Mac OSX上で動く並列プログラミングフレームワーク、 108 </script>
107 Ceriumの開発・改良を行っている。 109 <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:300%;height:0.2em;">
108 </p> 110 </div></td>
109 <p>本研究では新たにGPU上での並列実行に対応し、 111 </tr>
110 ヘテロジニアス(異種混合)環境下でのプログラミングをサポートする 112 </table>
111 </p> 113 </div>
112 <p> 114
113 GPGPUでは通常のマルチコア<font color="red">CPUとは異なる並列プログラミング</font> 115 <div class='slide'>
114 と<font color="red">特別なチューニング</font>が必要となる。 116 <h2>研究目的</h2>
115 そこでCeriumを用いてその差を吸収し、自動的なチューニングを可能にする。 117 <p>
116 </p> 118 当研究室ではCellおよびLinux、
117 <p> 119 Mac OSX上で動く並列プログラミングフレームワーク、
118 しかし、GPUのみで並列計算を行った場合、Taskによっては並列度が出ない場合がある。 120 Ceriumの開発・改良を行っている。
119 そこでチューニングの一環として、MultiCoreとGPU上での同時実行を可能にする。 121 </p>
120 </p> 122 <p>本研究では新たにGPU上での並列実行に対応し、
121 </div> 123 ヘテロジニアス(異種混合)環境下でのプログラミングをサポートする
122 124 </p>
123 <!-- h1.hidden => use heading just for table of contents (toc) --> 125 <p>
124 <div class='slide'> 126 GPGPUでは通常のマルチコア<font color="red">CPUとは異なる並列プログラミング</font>
125 <h2>進捗</h2> 127 と<font color="red">特別なチューニング</font>が必要となる。
126 <dl> 128 そこでCeriumを用いてその差を吸収し、自動的なチューニングを可能にする。
127 <dt>s6 Slide整えて遊んでた</dt> 129 </p>
128 <dt>mallocのお勉強</dt> 130 <p>
129 <dd>kernel reading party(小崎さん)</dd> 131 しかし、GPUのみで並列計算を行った場合、Taskによっては並列度が出ない場合がある。
130 <dd><a href="http://shelby.tv/video/youtube/0-vWT-t0UHg/the-67th-yokohama-kernel-reading-party">動画</a></dd> 132 そこでチューニングの一環として、MultiCoreとGPU上での同時実行を可能にする。
131 <dd><a href="http://www.slideshare.net/kosaki55tea/glibc-malloc">資料</a></dd> 133 </p>
132 </ul> 134 </div>
133 </div> 135
134 136 <!-- h1.hidden => use heading just for table of contents (toc) -->
135 </div> <!-- presentation --> 137 <div class='slide'>
136 </body> 138 <h2>進捗</h2>
139 <dl>
140 <dt>s6 Slide整えて遊んでた</dt>
141 <dt>mallocのお勉強</dt>
142 <dd>kernel reading party(小崎さん)</dd>
143 <dd><a href="http://shelby.tv/video/youtube/0-vWT-t0UHg/the-67th-yokohama-kernel-reading-party">動画</a></dd>
144 <dd><a href="http://www.slideshare.net/kosaki55tea/glibc-malloc">資料</a></dd>
145 </div>
146
147 <div class='slide'>
148 <h2>mallocってなんだっけ……?</h2>
149 <img src="images/malloc.png" width="500">
150 <pre class="code">
151 void *malloc(size_t size);</pre>
152 <ul>
153 <li>mallocはsizeバイト分のメモリを割り当て、ポインタを返す</li>
154 <li>返ってくるのはvoidのポインタなので、戻り値を型でキャストする必要がある</li>
155 <li>中身は初期化されていない</li>
156 <li>確保した領域はfreeを忘れずに</li>
157 </ul>
158 <pre class="code">
159 char *str = (char*)malloc(length); // 使う型でキャストする</pre>
160 </div>
161
162 <div class='slide'>
163 <h2>古典的malloc</h2>
164 <img src="images/heap.png" width="700">
165 <ul>
166 <li>使用可能なブロックを繋げたリスト構造、free list (freeされているブロックのlist?)
167 <li>listを使ってメモリを管理
168 <li>管理領域(header)分だけ多くallocateして、先頭に管理領域を付加
169 <li>first fit
170 </ul>
171 <hr>
172 <pre class="code">
173 union header {
174 struct {
175 union header *ptr; // 空きリストの上なら次のブロック
176 unsigned size; // このブロックの大きさ
177 } s;
178 };</pre>
179 </div>
180
181 <div class='slide'>
182 <h2>First Fit</h2>
183 <p>
184 リストを頭から見ていって、最初に見つけたものを使用するというすごいシンプルな方法。
185 </p>
186 <img src="images/firstfit.png" width="500">
187 </div>
188
189 <div class='slide'>
190 <h2>First Fit</h2>
191 <img src="images/firstfit2.png" width="500">
192 <p>実は、もう一個先にもっと適切なブロックがあった。こんな場合に対応できない…というか、対応しないのがfirst fit。</p>
193 <p>あまりよくない……</p>
194 </div>
195
196 <div class='slide'>
197 <h2>free</h2>
198 <pre class="code">
199 void free(void *ptr);</pre>
200 <p>
201 メモリの開放自体は、使用中のブロックをfree listに追加するだけで良い。
202 引数で受け取ったポインタ部分を開放したら良い……かに思える。
203 でもそれだけじゃダメで、開放したい領域と隣接しているブロックが空きブロックなら併合しないといけない。
204 </p>
205 <img src="images/free_merge.png" width="700">
206 </div>
207
208 <div class='slide'>
209 <h2>free</h2>
210 <img src="images/free1.png" width="700">
211 <p>
212 listから最初のポインタと、その次のポインタを取得。prev < p < nextを満たすまで走査していく
213 </p>
214 </div>
215
216 <div class='slide'>
217 <h2>free</h2>
218 <img src="images/free2.png" width="700">
219 <p>あった!!</p>
220 <p>
221 開放後に前後のメモリと併合する必要がある場合があるので、prevとp・pとnextが隣接してるか判定する。
222 </p>
223 <ul>
224 <li>(prev+prev-&gt size) != p なので、隣接していない </li>
225 <li>(p+p-&gt size) = next なので、隣接している</li>
226 <p>ブロックが隣接している場合は併合する。</p>
227 </div>
228
229 <div class='slide'>
230 <h2>free</h2>
231 <img src="images/free3.png" width="700">
232 <p>チェックに引っかかったところをマージする。</p>
233 </div>
234
235 <div class='slide'>
236 <h2>古典的malloc & freeまとめ</h2>
237 <p>フラグメンテーションが頻発する。</p>
238 <ul>
239 <li><p>このmallocが主流だった時は「メモリはプログラムの最初に一気に確保するもの」だった</p></li>
240 <li><p>メモリが充分に空いている状態で、
241 必要なメモリを一気に確保するならフラグメンテーションは起きにくい</p></li>
242 <li><p>今はJava・C++のようなオブジェクト指向言語、
243 Rubyのようなスクリプト言語等、小さいmallocが頻発する</p></li>
244 <li><p>それをfirst fitでやるのはよくない</p></li>
245 </ul>
246
247 </div>
248
249
250 <div class='slide'>
251 <h2>mallocの改良</h2>
252 <p>そもそも、一つのfree listで管理することが無理がある</p>
253 <p>サイズ16用のリスト、サイズ24用のリスト……というようにリストを複数作ってやる</p>
254 </div>
255 </div> <!-- presentation -->
256 </body>
137 </html> 257 </html>