view 14/March/slide/04th.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 2014/March/slide/04th.html@43c6da29d688
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 の並列処理向け I/O の設計と実装
        </h1>
        <p>
          Masataka Kohagura
          <br>
          21st January , 2014
        </p>
      </article>

        <article class='smaller'>
        <h3>研究背景と目的</h3>
        <p>
        近年のCPUのほとんどはマルチコアであり、それらの性能を引き出すためには並列プログラミングが必須となっている。そこで当研究室では Cerium Library の開発を行い、提供することによって並列プログラミングを容易にしている。
        </p>
        <p>
        先行研究では Task の並列化によって、プログラム全体の処理速度は向上しているが、ファイル読み込み等の I/O に対して並列に Task が動作するようにはされていない。
        </p>
        <p>
        現状では、ファイルを全て memory に mapping を行ってから Task が走るようになっているので、非常に大きいサイズのファイルを読み込むと、ファイルを memory に mapping するまでの時間がオーバーヘッドになってしまう。
        </p>
        <p>
        本研究では I/O と Task の並列化の設計、実装によってプログラム全体の処理速度、処理効率を上げていく。
        </p>
      </article>

        <article>
        <h3>
        したこと
        </h3>
        <ul>

        <li>
        2GB 以上のファイルが読み込めなかった -> 修正
        </li>

        <li>
        fileread をちょっとだけ測定
        </li>
        <ul>
    </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> 2GB 以上のファイルが読み込めなかった -> 修正 </h3>
    <p>
    manager->allocate(int) を使用したところ
    </p>
    <section><pre>
if (divide_read_flag != 0) {
    printf("[divide read mode]\n");
    <font color="red">w->file_mmap = (char*)manager->allocate((long)w->read_filesize);</font>
    r_run = manager->create_task
            (RUN_READ_BLOCKS, (memaddr)&w->self, sizeof(memaddr),0,0);
}else {
    printf("[mmap mode]\n");
    r_run = manager->create_task
            (MMAP , (memaddr)&w->self, sizeof(memaddr),0,0);
}
</pre></section>
    <p>
    divide read をする前に manager->alocate にて memory を確保する。
    この領域に、分割して読み込んだ file を mapping していく。
    </p>
    </article>

    <article>
    <h3>
    kernel/ppe/TaskManagerImpl.h
    </h3>
    <p>修正前</p>

<section><pre>
void* allocate(int size, int alignment)
{
#if defined(__SPU__) || ! defined(HAS_POSIX_MEMALIGN)
    buff =  malloc(size);
#else
    posix_memalign(&buff, alignment, size);
#endif
    return buff;
}
</pre></section>

    <p>修正後</p>
    <section><pre>
void* allocate(<font color="red">long size</font>, int alignment)
{
    ・・・
}
</pre></section>

    </article>

        <article>
        <h3>
        fileread
        </h3>
        <p>
        ファイルの読み込みだけを行うプログラム
        </p>
        <p>
        firefly 上で実行<br>
        2*2.66 GHz, HHD 1TB, memory 16GB<br>
        file size : 10740996168 Byte (約10GB)
        </p>

      <table>
        <tr>
            <table>
            <tr><td>mode</td><td>time(s)</td></tr>
            <tr><td>mmap</td><td>0.194788</td></tr>
            <tr><td>read_divide_size</td><td></td></tr>
            <tr><td>4*4096      Byte</td><td>391.734989</td></tr>
            <tr><td>4*4096*1024 Byte</td><td>123.563726</td></tr>
            </table>
       <tr>
     </table>
    </article>

</body>
</html>