changeset 2:6f538bc4614b

add 10th December slide
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Tue, 10 Dec 2013 17:33:29 +0900
parents 815e0fac48a3
children 104a8986166e
files Dec-2013/10th.html Dec-2013/19th.html io-2012-slides.googlecode.com/git/.DS_Store io-2012-slides.googlecode.com/git/.gitignore
diffstat 4 files changed, 183 insertions(+), 231 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Dec-2013/10th.html	Tue Dec 10 17:33:29 2013 +0900
@@ -0,0 +1,183 @@
+<!DOCTYPE html>
+
+<!--
+  Google HTML5 slide template
+
+  Authors: Luke Mahé (code)
+           Marcin Wichary (code and design)
+           
+           Dominic Mazzoni (browser compatibility)
+           Charles Chen (ChromeVox support)
+
+  URL: http://code.google.com/p/html5slides/
+-->
+
+<html>
+  <head>
+    <title>slide</title>
+
+    <meta charset='utf-8'>
+    <script
+      src='http://html5slides.googlecode.com/svn/trunk/slides.js'></script>
+  </head>
+
+  <style>
+    /* Your individual styles here, or just use inline styles if that’s
+       what you want. */
+  .slides article { background-image: none !important; background-color: white; }
+
+  </style>
+
+  <body style='display: none'>
+
+    <section class='slides layout-regular template-default'>
+
+      <!-- Your slides (<article>s) go here. Delete or comment out the
+           slides below.-->
+
+      <article>
+        <h1>
+          Cerium Task Manager
+          <br>
+          による正規表現の実装
+        </h1>
+        <p>
+          Masataka Kohagura
+          <br>
+          10th December , 2013
+        </p>
+      </article>
+
+      <article>
+        <h3>
+        研究目的
+        </h3>
+        <p>
+        マルチコア CPU を最大限に活かすためには、並列プログラミングによる並列度を向上させなければならないが、実装が難しい。
+        当研究室では Cerium Libraryを提供することによって並列プログラミングを容易にしているが、ファイル読み込み等のI/O部分に関してはまだ実装されていない。
+        </p>
+        <p>
+        本研究ではその例題として正規表現を実装し、I/Oの並列化の設計・実装によって既存の正規表現の処理速度、処理効率を上げる。
+        </p>
+
+        </article>
+
+        <article>
+        <h3>
+        今週のしたこと
+        </h3>
+        <p>
+    ・検索文字列のハードコーディングの脱却<br>
+        </p>
+    </article>
+
+    <!--
+    <article class='smaller'>
+    <h3>I/O並列化のシーケンス図(mmap)</h3>
+    <div align="center">
+    <IMG SRC="mmap.png">
+    </div>
+    <li>
+codeがシンプル(readを書いて読み込まなくていいため)
+    </li>
+    <li>
+    memoryより大きなファイルは開けない
+    </li>
+    <li>
+    readの先読みがOS依存
+    </li>
+
+    </article>
+    -->
+
+
+    <article>
+
+    <h3>
+    main.cc:run_tasks内部(Taskへのデータ渡し)
+    </h3>
+    <section><pre>
+Task *t_exec = 0;
+
+t_exec = task_array->next_task_array(TASK_EXEC,t_exec);
+t_exec->set_inData(0,w->file_mmap + a*w->division_size, size);
+<font color="red">t_exec->set_inData(1,w->search_word, w->search_word_len);</font>
+t_exec->set_inData(2,w->BMskip_table, 256);
+</pre></section>
+
+    <h3>
+    ppe/Exec.cc(Task内でのデータの受取)
+    </h3>
+    <section><pre>
+unsigned char *i_data = (unsigned char *)s->get_input(rbuf,0);
+<font color="red">unsigned char *search_word = (unsigned char *)s->get_input(rbuf,1);</font>
+int *skip_table = (int *)s->get_input(2);
+
+s->printf("[in Exec search word = %p\n",search_word);
+</pre></section>
+
+</article>
+
+    <article>
+    <h3>
+    実行(アドレスの桁落ち(?)))
+    </h3>
+    <section><pre>
+./regex -file c.txt -cpu 1 -sw doing
+in TMmain  search_word    = 0x7fba99c1a090
+in run start search_word    = 0x7fba99c1a090
+in run tasks w->search_word = 0x7fba99c1a090
+<font color="red">in Exec search word         =     0x99c1a090</font>
+zsh: segmentation fault  ./regex -file c.txt -cpu 1 -sw doing
+</pre></section>
+
+    <ul>
+    <li>
+    search_word のアドレスが上の桁から落ちている。skip_table(intの配列)でもセグフォが発生するので、skip_tableももしかしたらアドレスが同じように落ちているんじゃ・・・
+    </li>
+    </ul>
+</article>
+
+
+    <article>
+    <h3>
+    ppe/Exec.ccの修正
+    </h3>
+    <section><pre>
+unsigned char *i_data = <font color="red">(unsigned char *)s->get_inputAddr(0);</font>
+unsigned char *search_word = <font color="red">(unsigned char *)s->get_inputAddr(1);</font>
+int *skip_table = <font color="red">(int *)s->get_inputAddr(2);</font>
+
+s->printf("in Exec search_word : %p\n",search_word);
+    </pre></section>
+
+    <h3>
+    実行
+    </h3>
+    <section><pre>
+./regex -file c.txt -cpu 1 -sw doing
+in run_tasks w->search_word Addr: 0x7f989b708280
+in Exec search_word Addr        : 0x7f989b708280
+HIT:27856
+Time: 0.042276
+</pre></section>
+    <li>
+    get_inputAddrだと正しくアドレスを受け渡しすることができた。
+    </li>
+</article>
+
+    <article>
+    <h3>これからのすること</h3>
+    <ul>
+    <li>
+    シンヤさんのRegenのソース読み&実装
+    </li>
+    <li>
+    並列I/Oの実装<br>
+    (例題:filereadにてI/Oの分割読み込みのプログラムを実装)
+    </li>
+    </ul>
+    </article>
+
+</body>
+</html>
--- a/Dec-2013/19th.html	Tue Dec 10 15:46:51 2013 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-<!DOCTYPE html>
-
-<!--
-  Google HTML5 slide template
-
-  Authors: Luke Mahé (code)
-           Marcin Wichary (code and design)
-           
-           Dominic Mazzoni (browser compatibility)
-           Charles Chen (ChromeVox support)
-
-  URL: http://code.google.com/p/html5slides/
--->
-
-<html>
-  <head>
-    <title>2013-11-19</title>
-
-    <meta charset='utf-8'>
-    <script
-      src='http://html5slides.googlecode.com/svn/trunk/slides.js'></script>
-  </head>
-
-  <style>
-    /* Your individual styles here, or just use inline styles if that’s
-       what you want. */
-  .slides article { background-image: none !important; background-color: white; }
-
-  </style>
-
-  <body style='display: none'>
-
-    <section class='slides layout-regular template-default'>
-
-      <!-- Your slides (<article>s) go here. Delete or comment out the
-           slides below.-->
-
-      <article>
-        <h1>
-          Cerium Task Manager
-          <br>
-          による正規表現の実装
-        </h1>
-        <p>
-          Masataka Kohagura
-          <br>
-          19th November , 2013
-        </p>
-      </article>
-
-      <article>
-        <h3>
-        研究目的
-        </h3>
-        <p>
-        マルチコア CPU を最大限に活かすためには、並列プログラミングによる並列度を向上させなければならないが、実装が難しい。
-        当研究室では Cerium Libraryを提供することによって並列プログラミングを容易にしているが、ファイル読み込み等のI/O部分に関してはまだ実装されていない。
-        </p>
-        <p>
-        本研究ではその例題として正規表現を実装し、I/Oの並列化の設計・実装によって既存の正規表現の処理速度、処理効率を上げる。
-        </p>
-        </article>
-
-        <article>
-        <h3>
-        今週のしたこと
-        </h3>
-        <p>
-    ・検索文字列のハードコーディングの脱却<br>
-(set_inData,get_input絡みでバグ??)
-    </p>
-    </article>
-
-    <!--
-    <article class='smaller'>
-    <h3>I/O並列化のシーケンス図(mmap)</h3>
-    <div align="center">
-    <IMG SRC="mmap.png">
-    </div>
-    <li>
-codeがシンプル(readを書いて読み込まなくていいため)
-    </li>
-    <li>
-    memoryより大きなファイルは開けない
-    </li>
-    <li>
-    readの先読みがOS依存
-    </li>
-
-    </article>
-    -->
-
-
-    <article>
-    <h3>
-    WordCount.h
-    </h3>
-    <section><pre>
-typedef struct wordCount {
-    struct wordCount *self;
-    int size;             // remaining file size
-    int division_size;    // for each word count task
-    (中略)
-<font color="red">    unsigned char *search_word;
-    int search_word_len;</font>
-    HTaskPtr t_print;
-} WordCount;
-</pre></section>
-</article>
-
-    <article>
-    <h3>
-    main.cc(task生成部分)
-    </h3>
-    <section><pre>
-run_tasks(SchedTask *manager,…)
-{
-    …
-    if(size != w->size){ //最後のタスクかどうかの判定
-        t_exec[k]->set_param(0,&set_one_task_length + EXTRA_LENGTH);
-        t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size+EXTRA_LENGTH);
-        <font color="red">t_exec[k]->set_inData(1,w->search_word, w->search_word_len); </font>
-    }else{
-        t_exec[k]->set_param(0,&set_one_task_length);
-        t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size);
-        <font color="red">t_exec[k]->set_inData(1,w->search_word, w->search_word_len); </font>
-    }
-    …
-}
-</pre></section>
-
-</article>
-
-
-    <article>
-    <h3>
-    main.cc(task生成部分)
-    </h3>
-    <section><pre>
-run_tasks(SchedTask *manager,…)
-{
-    …
-    if(size != w->size){ //最後のタスクかどうかの判定
-        t_exec[k]->set_param(0,&set_one_task_length + EXTRA_LENGTH);
-        t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size+EXTRA_LENGTH);
-        <font color="red">t_exec[k]->set_inData(1,w->search_word, w->search_word_len); </font>
-    }else{
-        t_exec[k]->set_param(0,&set_one_task_length);
-        t_exec[k]->set_inData(0,w->file_mmap + a*w->division_size, size);
-        <font color="red">t_exec[k]->set_inData(1,w->search_word, w->search_word_len); </font>
-    }
-    …
-}
-</pre></section>
-
-</article>
-
-    <article>
-    <h3>
-    問題点
-    </h3>
-    <li>
-    複数の文字列をタスクに渡そうとすると、最初に渡す文字列に関しては渡せるが、後に渡す文字列がうまく渡らない。
-    </li>
-    <p>Exec.cc(get_input)</p>
-    <section><pre>
-run(SchedTask *s, void *rbuf, void *wbuf)
-{
-    unsigned char *i_data = (unsigned char *)s->get_input(rbuf,0);
-    unsigned char *search_word = (unsigned char*)s->get_input(rbuf,1);
-        …
-    s->printf("[i_data]\n%s\n",i_data);
-    s->printf("[search_word]\n%s\n",search_word);
-
-    return 0;
-}
-</pre></section>
-
-    <p>result</p>
-    <section><pre>
-(lldb) p i_data
-(unsigned char *) $2 = 0x000000010202ca00 "aaa bbb …"
-(lldb) p search_word
-(unsigned char *) $3 = 0x000000010202ca00 "aaa bbb …"
-</pre></section>
-    <li>文字列を複数受け取ろうとすると、index(1)のアドレスがindex(0)のアドレスと同じ場所を示す</li>
-    <li>この時のi_data sizeは8byte、search_word sizeは6Byteである。</li>
-    <li>i_data size = search_word sizeにしても同様</li>
-
-</article>
-
-</body>
-</html>
Binary file io-2012-slides.googlecode.com/git/.DS_Store has changed
--- a/io-2012-slides.googlecode.com/git/.gitignore	Tue Dec 10 15:46:51 2013 +0900
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-# Compiled source #
-###################
-*.com
-*.class
-*.dll
-*.exe
-*.o
-*.so
-*.pyc
-*.min.css
-#*.min.js
-.sass-cache/*
-
-# Packages #
-############
-# it's better to unpack these files and commit the raw source
-# git has its own built in compression methods
-*.7z
-*.dmg
-*.gz
-*.iso
-*.rar
-*.tar
-*.zip
-
-# Logs and databases #
-######################
-*.log
-*.sql
-*.sqlite
-
-# OS generated files #
-######################
-.DS_Store*
-ehthumbs.db
-Icon?
-Thumbs.db
-*~
\ No newline at end of file