annotate slide/index.html @ 19:36958c5e0b90

add slide pages 8-17
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Fri, 31 Jan 2014 23:49:02 +0900
parents e735ac7509c6
children 7b4609c77ac1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 <!DOCTYPE html>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 <html>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 <head>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 <title>Presentation</title>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
6
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 <meta charset='utf-8'>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 <script
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 src='./slides.js'></script>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 </head>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 <style>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 /* Your individual styles here, or just use inline styles if that’s
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 what you want. */
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 </style>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 <body style='display: none'>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 <section class='slides layout-regular template-default'>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 <!--
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 Your slides (<article>s) go here. Delete or comment out the
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 slides below.
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 -->
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 <article >
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
26 <h1>Cerium による並列処理向け I/O の設計と実装</h1>
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
27 <h3 class="title">Masataka Kohagura 12th, February</h3>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 <div align="right">担当教官 : 河野 真治</div>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 </article>
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
30
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 <article >
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
32 <h3>研究背景と目的</h3>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 <p>
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
34 近年のCPUのほとんどはマルチコアであり、それらの性能を引き出すためには並列プログラミングが必須となっている。そこで当研究室では Cerium Library の開発を行い、提供することによって並列プログラミングを容易にしている。
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 </p>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 <p>
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
37 先行研究では Task の並列化によって、プログラム全体の処理速度は向上しているが、ファイル読み込み等の I/O に対して並列に Task が動作するようにはされていない。
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 </p>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 <p>
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
40 本研究では I/O と Task の並列化の設計、実装によってプログラム全体の処理速度、処理効率を上げていく。
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 </p>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 </article>
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
43
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
44 <article >
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
45 <h3>Cerium とは</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
46 <p>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
47 </p>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
48 <p>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
49 </p>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
50 <p>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
51 </p>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
52 </article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
53
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 <article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
55 <h3>Cerium の流れ</h3>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 <table border="0" cellpadding="0" cellspacing="0">
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 <tbody>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 <tr>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
59 <td><img src='images/cerium.png' style="height:350px"></td>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 <td>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 <ol>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 <li>Taskを生成</li>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 <li>依存関係のチェック</li>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 <li>Schedulerに転送</li>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 <li>並列実行</li>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 </ol>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 </td>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 </tr>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 </tbody>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 </table>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 </article>
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
72
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 <article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
74 <h3>Cerium Task の生成(1)</h3>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
75 <br>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
76 <h3 class="yellow">main.cc の記述</h3>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
77 <pre>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
78 // Task の宣言
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
79 HTaskPtr multiply = manager->create_task(MULTIPLY_TASK);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
80 // Task を実行する デバイスの設定
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
81 multiply->set_cpu(SPE_ANY);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
82 // Task に入力データのアドレスを追加
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
83 multiply->set_inData(0, i_data1, sizeof(float)*length);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
84 multiply->set_inData(1, i_data2, sizeof(float)*length);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
85 // Task に出力データのアドレスを追加
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
86 multiply->set_outData(0, o_data1, sizeof(float)*length);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
87 // Task へ値を1つだけ渡す
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
88 multiply->set_param(0,(long)length);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
89 // Task を TaskList に set する
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
90 multiply->spawn(); </pre>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 </article>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 <article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
94 <h3>Cerium Task の生成(2)</h3>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
95 <br>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
96 <h3 class="yellow">Task の記述</h3>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
97 <pre>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
98 static int
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
99 multiply(SchedTask *s,void *rbuf, void *wbuf)
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
100 {
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
101 // 登録した inData を取得
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
102 float indata1=(float*)s->get_input(rbuf,0);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
103 float indata2=(float*)s->get_input(rbuf,1);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
104 // 登録した outData を取得
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
105 float outdata=(float*)s->get_output(wbuf,0);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
106 // 登録した param を取得
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
107 long length=(long)s->get_param(0);
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
108 for (int i=0;i &lt; length;i++) {
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
109 outdata[i]=indata1[i]*indata2[i];
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
110 }
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
111 return 0;
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
112 } </pre>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 </article>
14
0e7c972b5ca1 write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
114
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 <article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
116 <h3>並列処理向け I/O の 設計と実装</h3>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
117 <br>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
118 <ul>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
119 <li>mmap の仕様</li>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
120 <li>divide read の実装</li>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
121 <li>Cerium の改良(IO_0 の追加)</li>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
122 </ul>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 </article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
124
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 <article>
16
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
126 <h3>mmap での I/O の実装(1)</h3>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
127 <br>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
128 <h3 class="yellow">FileRead.h の一部</h3>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
129 <pre>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
130 typedef struct fileRead {
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
131 struct fileRead *self;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
132 long fd;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
133 long division_size;
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
134 long file_size;
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
135 ・・・
16
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
136 char *read_text;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
137 CPU_TYPE cpu;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
138 } FileRead, *FileReadPtr;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
139 </pre>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
140 <p>
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
141 Fileを読み込む際にファイルの情報や、Read Task の情報を構造体の中に格納しておく。
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
142 </p>
16
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
143 </article>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
144
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
145 <article>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
146 <h3>mmap での I/O の実装(2)</h3>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
147 <br>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
148 <h3 class="yellow">mmap の記述</h3>
16
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
149 <pre>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
150 mmap(SchedTask *s, void *in, void *out)
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
151 {
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
152 FileReadPtr fr = (FileReadPtr)in;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
153 int map = MAP_PRIVATE;
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
154
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
155 fr->read_text =
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
156 (char*)mmap(NULL,fr->filesize,PROT_READ,map,fr->fd,(off_t)0);
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
157 }
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
158 </pre>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 </article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
160
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 <article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
162 <h3>mmap の仕様</h3>
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
163 <br>
16
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
164 <img src='images/mmap.png' style="height:300px">
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
165
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
166 <ul>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
167 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
168 code がシンプル (read を書いて読み込まなくていいため)
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
169 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
170 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
171 memory より大きなファイルは開けない
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
172 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
173 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
174 read の先読みがOS依存
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
175 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
176 </ul>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
177 </article>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
178
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
179 <article>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
180 <h3>divide read の設計</h3>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
181 <br>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
182 <img src='images/divide_read.png' style="height:250px">
16
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
183 <br>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
184
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
185 <ul>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
186 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
187 明示的な read
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
188 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
189 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
190 先読みを自分で書ける(制御できる)
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
191 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
192 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
193 code が煩雑
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
194 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
195 <li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
196 memory より大きなファイルを扱える
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
197 </li>
56cd6800acb5 write slide No.11 & add images
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
198 </ul>
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 </article>
15
9b071b32e3de add some files and write slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
200
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
201 <!--
17
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
202 <article>
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
203 <h3>divide read の実装(1)</h3>
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
204 <br>
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
205 <h3 class="yellow">Read Task の ブロック化</h3>
17
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
206 <pre>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
207 program_run(TaskManager *manager, char *filename)
17
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
208 {
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
209 FileReadPtr fr = (FileReadPtr)manager->allocate(sizeof(FileRead));
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
210 fr->self = fr;
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
211 fr->fd = fd;
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
212 ・・・
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
213 read = manager->create_task(RUN_READ_BLOCKS,
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
214 (memaddr)&fr->self, sizeof(memaddr),read_text,fr->filesize);
17
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
215
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
216 read->spawn();
17
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
217 }
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
218 </pre>
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
219 </article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
220
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
221 <article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
222 <h3>divide read の実装(2)</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
223 <br>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
224 <ul>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
225 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
226 divide read Task の実行の際に、ブロック単位で Task の生成、実行を行う。
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
227 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
228 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
229 1つずつ生成すると Task の数だけ memory address が取られるために肥大化してしまう。
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
230 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
231 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
232 しかしブロック単位で生成すると、同じ変数を使用しているので memory の節約になる。
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
233 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
234
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
235 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
236 </ul>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
237 </article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
238 -->
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
239
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
240 <article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
241 <h3>divide read の実装(1)</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
242 <br>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
243 <h3 class="yellow">divide Read の実装</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
244 <pre>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
245 // 生成するTaskが何番目か
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
246 read->set_param(0,(long)w->read_task_number);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
247 // 1つの Read Task で読み込む量
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
248 read->set_param(1,(long)w->read_division_size);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
249 // read_left_size : 残り読み込み量
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
250 if(w->read_left_size <= w->read_division_size){
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
251 read->set_param(2,(long)w->read_left_size);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
252 }else{
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
253 read->set_param(2,(long)w->read_division_size);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
254 }
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
255 // ファイルディスクリプタを渡す
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
256 read->set_param(3,(long)w->fd);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
257
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
258 //生成するTaskが何番目か
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
259 read->set_outData
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
260 (0,w->file_mmap + w->read_task_number*w->read_division_size,
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
261 w->read_division_size);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
262 </pre>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
263 </article>
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
264
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
265 <article>
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
266 <h3>divide read の実装(2)</h3>
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
267 <br>
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
268 <h3 class="yellow">divide Read の記述</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
269 <pre>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
270 static int
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
271 read_task(SchedTask *s, void *rbuf, void *wbuf)
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
272 {
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
273 long task_number = (long)s->get_param(0);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
274 long division_size = (long)s->get_param(1);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
275 long read_size = (long)s->get_param(2);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
276 long fd = (long)s->get_param(3);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
277
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
278 char *read_text = (char*)s->get_output(wbuf,0);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
279
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
280 pread(fd, read_text, (long)read_size , division_size*task_number);
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
281
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
282 return 0;
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
283 }
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
284 </pre>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
285 </article>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
286
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
287 <article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
288 <h3>divide read を実装した例題</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
289 <br>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
290 <ul>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
291 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
292 Boyer Moore String Search Algorithm を使用した文字列検索
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
293 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
294 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
295 検索対象の文字列が、あるファイルの中にいくつ存在するかカウントする例題
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
296 </li>
18
e735ac7509c6 add image spawn not blocks
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 17
diff changeset
297 </ul>
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
298
17
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
299 </article>
2d1060de4dfe write divide read の実装
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
300
19
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
301 <article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
302 <h3>ベンチマーク</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
303 <br>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
304 <h3 class="yellow">考察</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
305 </article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
306
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
307 <article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
308 <h3>まとめ</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
309 <br>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
310 </article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
311
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
312 <article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
313 <h3>大学院に進学してしたいこと</h3>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
314 <br>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
315 <ul>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
316 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
317 さらなる 並列処理向け I/O の動作を改善
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
318 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
319 <li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
320 動作の軽いソフトウェアシンセサイザーを Cerium で実装
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
321 </li>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
322 </ul>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
323
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
324 </article>
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
325
36958c5e0b90 add slide pages 8-17
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
326
13
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 </body>
ff5c2b4ca18a add slide
Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 </html>