view 13/Dec-2013/10th.html @ 51:d8f499590d82

rename 201* to 1*
author Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp>
date Sun, 16 Mar 2014 13:36:04 +0900
parents 2013/Dec-2013/10th.html@e4748bca1eb3
children
line wrap: on
line source

<!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>