Mercurial > hg > Members > yuuhi > slide
view s6/blank.html @ 15:9683e2b1bbe7
sched_setaffinity
author | Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 18 Nov 2014 18:09:17 +0900 |
parents | 75b31f123159 |
children | 642a7f5a5bad |
line wrap: on
line source
<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>Seminar</title> <!-- Notes on CSS media types used: 1) projection -> slideshow mode (display one slide at-a-time; hide all others) 2) screen -> outline mode (display all slides-at-once on screen) 3) print -> print (and print preview) Note: toggle between projection/screen (that is, slideshow/outline) mode using t-key Questions, comments? - send them along to the mailinglist/forum online @ http://groups.google.com/group/webslideshow --> <!-- style sheet links --> <link rel="stylesheet/less" href="themes/blank/projection.css.less" media="screen,projection"> <link rel="stylesheet/less" href="themes/blank/screen.css.less" media="screen"> <link rel="stylesheet/less" href="themes/blank/print.css.less" media="print"> <link rel="stylesheet/less" href="blank.css.less" media="screen,projection"> <!-- Notes about less css support - all less stylesheets (*.css.less) need to get listed/loaded first (before the less.js script) - find more info about less.js online @ http://lesscss.org ***** NOTE: less.js browser script currently won’t work if you’re using Google Chrome and the path to your page starts with "file:///" due to a known Chrome issue. (In the developer/js console you will see: XMLHttpRequest cannot load file:///../s6/shared/projection.css.less. Cross origin requests are only supported for HTTP.) --> <!-- add js libs (less, jquery) --> <script src="js/less-1.1.4.min.js"></script> <script src="js/jquery-1.7.min.js"></script> <!-- S6 JS --> <script src="js/jquery.slideshow.js"></script> <script src="js/jquery.slideshow.counter.js"></script> <script src="js/jquery.slideshow.controls.js"></script> <script src="js/jquery.slideshow.footer.js"></script> <script src="js/jquery.slideshow.autoplay.js"></script> <script> $(document).ready( function() { Slideshow.init(); // Example 2: Start Off in Outline Mode // Slideshow.init( { mode: 'outline' } ); // Example 3: Use Custom Transition // Slideshow.transition = transitionScrollUp; // Slideshow.init(); // Example 4: Start Off in Autoplay Mode with Custom Transition // Slideshow.transition = transitionScrollUp; // Slideshow.init( { mode: 'autoplay' } ); } ); </script> <!-- Better Browser Banner for Microsoft Internet Explorer (IE) --> <!--[if IE]> <script src="js/jquery.microsoft.js"></script> <![endif]--> </head> <body> <div class="layout"> <div id="header"></div> <div id="footer"> <div align="right"> <img src="images/concurrency.png" width="200"> </div> </div> </div> <div class="presentation"> <!-- add slides here; example --> <div class='slide cover'> <table width="90%" height="90%" border="0" align="center"> <tr> <td><div align="center"> <h1><font color="#808db5">Ceriumの再設計</font></h1> </div></td> </tr> <tr> <td><div align="left"> Yuhi TOMARI <script> var date = new Date(); var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); var monthList = new Array("January","February","March","April","May","June", "July","August","September","October","November","December"); document.write(monthList[month]+" "+day+", "+year); </script> <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:300%;height:0.2em;"> </div></td> </tr> </table> </div> <div class='slide'> <h2>研究目的</h2> <ul> <li>当研究室ではCS/DSを使用したプログラミングを行っている</li> <dd>CS/DSについて <br>プログラムをCode Segment/Data Segmentという単位に分けて書くという手法を提案している <br>Code Segment:処理の単位(実行単位) <br>Data Segment:データ構造</dd> <li>CS/DSベースのプログラミングモデルの開発</li> <dd>CS/DSを用いた手法でプログラミングを行う言語、Continuation Based Cを用いて開発を行う</dd> <li>独自のMemory Managementの機構を持つ</li> <li>Cerium、Alice、Jungleで得られた知見を……</li> <li>名前も考える必要がある?(システム自体の名前と、CS/DSの名前)</li> </ul> <p>ただこれCerium再実装の話なので、使わないかも</p> </div> <div class='slide'> <h2>進捗</h2> <ul> <li><dt>CPU固定でthreadを生成するAPI</dt> <dd>OSXで無理っぽい->(できるのでは->無理っぽい)x2</dd> <dd>とりあえずLinuxで例題の作成</dd> </li> <li> <dt>LinuxでCeriumが動くかどうか</dt> </li> </ul> </div> <div class='slide'> <h2>Affinityを設定するAPI(Linux)</h2> <pre class="code"> int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *mask); </pre> <ul> <li><dt>affinity(親和度、cpu_set_t)は、そのスレッドが実行を許可されているCPUの集合を決定する <dd>maskにCPUをsetするときは、CPU_SETを使用する(例:CPU_SET(cpu_id,&mask)</dd></dt></li> <li><dt>スレッドのaffinityマスクを一つのCPUに設定し、スレッドをCPUに括りつけることができる(Man page)</dt></li> </ul> </div> <div class='slide'> <h2>sched_setaffinity Sample</h2> <pre class="code"> void set_cpu(int cpu_id) { cpu_set_t mask; CPU_ZERO(&mask); CPU_SET(cpu_id, &mask); if (sched_setaffinity(0, sizeof(mask), &mask) == -1) { printf("Failed to set CPU affinity. \n"); return; } printf("Succeed to set CPU %d\n",cpu_id); return; }</pre> <p> どうやって本当に割り当てられてるか調べるか。taskset? sar? </p> </div> <div class='slide'> <h2>Todo</h2> <ul> <li><dt>sched_setaffinityをCeriumに実装</dt></li> <li><dt>Memory Allocatorの設計と実装</dt></li> </ul> </div> </div> <!-- presentation --> </body> </html>