comparison Dec-2013/17th.html @ 3:104a8986166e

add 17th files
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Tue, 17 Dec 2013 16:41:20 +0900
parents Dec-2013/10th.html@6f538bc4614b
children a96eeacc9d7b
comparison
equal deleted inserted replaced
2:6f538bc4614b 3:104a8986166e
1 <!DOCTYPE html>
2
3 <!--
4 Google HTML5 slide template
5
6 Authors: Luke Mahé (code)
7 Marcin Wichary (code and design)
8
9 Dominic Mazzoni (browser compatibility)
10 Charles Chen (ChromeVox support)
11
12 URL: http://code.google.com/p/html5slides/
13 -->
14
15 <html>
16 <head>
17 <title>slide</title>
18
19 <meta charset='utf-8'>
20 <script
21 src='http://html5slides.googlecode.com/svn/trunk/slides.js'></script>
22 </head>
23
24 <style>
25 /* Your individual styles here, or just use inline styles if that’s
26 what you want. */
27 .slides article { background-image: none !important; background-color: white; }
28
29 </style>
30
31 <body style='display: none'>
32
33 <section class='slides layout-regular template-default'>
34
35 <!-- Your slides (<article>s) go here. Delete or comment out the
36 slides below.-->
37
38 <article>
39 <h1>
40 Cerium Task Manager
41 <br>
42 による正規表現の実装
43 </h1>
44 <p>
45 Masataka Kohagura
46 <br>
47 10th December , 2013
48 </p>
49 </article>
50
51 <article>
52 <h3>
53 研究目的
54 </h3>
55 <p>
56 マルチコア CPU を最大限に活かすためには、並列プログラミングによる並列度を向上させなければならないが、実装が難しい。
57 当研究室では Cerium Libraryを提供することによって並列プログラミングを容易にしているが、ファイル読み込み等のI/O部分に関してはまだ実装されていない。
58 </p>
59 <p>
60 本研究ではその例題として正規表現を実装し、I/Oの並列化の設計・実装によって既存の正規表現の処理速度、処理効率を上げる。
61 </p>
62
63 </article>
64
65 <article>
66 <h3>
67 今週のしたこと
68 </h3>
69 <p>
70 ・検索文字列のハードコーディングの脱却<br>
71 </p>
72 </article>
73
74 <!--
75 <article class='smaller'>
76 <h3>I/O並列化のシーケンス図(mmap)</h3>
77 <div align="center">
78 <IMG SRC="mmap.png">
79 </div>
80 <li>
81 codeがシンプル(readを書いて読み込まなくていいため)
82 </li>
83 <li>
84 memoryより大きなファイルは開けない
85 </li>
86 <li>
87 readの先読みがOS依存
88 </li>
89
90 </article>
91 -->
92
93
94 <article>
95
96 <h3>
97 main.cc:run_tasks内部(Taskへのデータ渡し)
98 </h3>
99 <section><pre>
100 Task *t_exec = 0;
101
102 t_exec = task_array->next_task_array(TASK_EXEC,t_exec);
103 t_exec->set_inData(0,w->file_mmap + a*w->division_size, size);
104 <font color="red">t_exec->set_inData(1,w->search_word, w->search_word_len);</font>
105 t_exec->set_inData(2,w->BMskip_table, 256);
106 </pre></section>
107
108 <h3>
109 ppe/Exec.cc(Task内でのデータの受取)
110 </h3>
111 <section><pre>
112 unsigned char *i_data = (unsigned char *)s->get_input(rbuf,0);
113 <font color="red">unsigned char *search_word = (unsigned char *)s->get_input(rbuf,1);</font>
114 int *skip_table = (int *)s->get_input(2);
115
116 s->printf("[in Exec search word = %p\n",search_word);
117 </pre></section>
118
119 </article>
120
121 <article>
122 <h3>
123 実行(アドレスの桁落ち(?)))
124 </h3>
125 <section><pre>
126 ./regex -file c.txt -cpu 1 -sw doing
127 in TMmain search_word = 0x7fba99c1a090
128 in run start search_word = 0x7fba99c1a090
129 in run tasks w->search_word = 0x7fba99c1a090
130 <font color="red">in Exec search word = 0x99c1a090</font>
131 zsh: segmentation fault ./regex -file c.txt -cpu 1 -sw doing
132 </pre></section>
133
134 <ul>
135 <li>
136 search_word のアドレスが上の桁から落ちている。skip_table(intの配列)でもセグフォが発生するので、skip_tableももしかしたらアドレスが同じように落ちているんじゃ・・・
137 </li>
138 </ul>
139 </article>
140
141
142 <article>
143 <h3>
144 ppe/Exec.ccの修正
145 </h3>
146 <section><pre>
147 unsigned char *i_data = <font color="red">(unsigned char *)s->get_inputAddr(0);</font>
148 unsigned char *search_word = <font color="red">(unsigned char *)s->get_inputAddr(1);</font>
149 int *skip_table = <font color="red">(int *)s->get_inputAddr(2);</font>
150
151 s->printf("in Exec search_word : %p\n",search_word);
152 </pre></section>
153
154 <h3>
155 実行
156 </h3>
157 <section><pre>
158 ./regex -file c.txt -cpu 1 -sw doing
159 in run_tasks w->search_word Addr: 0x7f989b708280
160 in Exec search_word Addr : 0x7f989b708280
161 HIT:27856
162 Time: 0.042276
163 </pre></section>
164 <li>
165 get_inputAddrだと正しくアドレスを受け渡しすることができた。
166 </li>
167 </article>
168
169 <article>
170 <h3>これからのすること</h3>
171 <ul>
172 <li>
173 シンヤさんのRegenのソース読み&実装
174 </li>
175 <li>
176 並列I/Oの実装<br>
177 (例題:filereadにてI/Oの分割読み込みのプログラムを実装)
178 </li>
179 </ul>
180 </article>
181
182 </body>
183 </html>