Mercurial > hg > Papers > 2014 > masakoha-thesis > final
diff slide/index.html @ 18:e735ac7509c6
add image spawn not blocks
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 30 Jan 2014 19:55:28 +0900 |
parents | 2d1060de4dfe |
children | 36958c5e0b90 |
line wrap: on
line diff
--- a/slide/index.html Wed Jan 29 18:29:16 2014 +0900 +++ b/slide/index.html Thu Jan 30 19:55:28 2014 +0900 @@ -120,22 +120,21 @@ struct fileRead *self; long fd; long division_size; - long task_number; - long task_num; - long left_task_num; - long filesize; - long left_size; - int task_blocks; + long file_size; + ・・・ char *read_text; CPU_TYPE cpu; } FileRead, *FileReadPtr; </pre> + <p> + Fileを読み込む際にファイルの情報や、Read Task の情報を構造体の中に格納しておく。 + </p> </article> <article> <h3>mmap での I/O の実装(2)</h3> <br> - <h3 class="yellow">Task の記述</h3> + <h3 class="yellow">mmap の記述</h3> <pre> mmap(SchedTask *s, void *in, void *out) { @@ -169,7 +168,7 @@ <article> <h3>divide read の設計</h3> <br> - <img src='images/oneread.png' style="height:250px"> + <img src='images/divide_read.png' style="height:250px"> <br> <ul> @@ -191,17 +190,34 @@ <article> <h3>divide read の実装(1)</h3> <br> - <h3 class="yellow">Task の記述</h3> + <h3 class="yellow">Read Task の生成</h3> <pre> -mmap(SchedTask *s, void *in, void *out) +program_run(TaskManager *manager, char *filename) { - FileReadPtr fr = (FileReadPtr)in; - int map = MAP_PRIVATE; + FileReadPtr fr = (FileReadPtr)manager->allocate(sizeof(FileRead)); + fr->self = fr; + fr->fd = fd; + ・・・ + read = manager->create_task(RUN_READ_BLOCKS, + (memaddr)&fr->self, sizeof(memaddr),read_text,fr->filesize); - fr->read_text = - (char*)mmap(NULL,fr->filesize,PROT_READ,map,fr->fd,(off_t)0); + read->spawn(); } </pre> + <p> + divide read Task の実行の際に、ブロック単位で Task の生成、実行を行う。 + </p> + </article> + + <article> + <h3>divide read の実装(2)</h3> + <br> + <h3 class="yellow">ブロック単位で生成、実行を行う理由</h3> + <ul> + <li> + + </li> + </ul> </article> </body>