Mercurial > hg > Papers > 2014 > masakoha-thesis > final
changeset 71:6bddfb10df11
fix
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 25 Feb 2014 21:40:27 +0900 |
parents | 286a8f57becf |
children | 3bf281002f72 |
files | paper/chapter4.tex paper/fig/blockread.graffle paper/thesis-paper.pdf preliminary/final-thesis.pdf preliminary/final-thesis.tex |
diffstat | 5 files changed, 1278 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/paper/chapter4.tex Tue Feb 25 14:33:01 2014 +0900 +++ b/paper/chapter4.tex Tue Feb 25 21:40:27 2014 +0900 @@ -132,7 +132,7 @@ \section{I/O 専用 thread の実装} Cerium Task Manager では、各種 Task にデバイスを設定することができる。デバイスとは、GPU や CPU であり、GPUを利用するときは GPU\_ANY、CPU を利用するときは SPE\_ANYと設定することによってデバイスを利用できる。 -SPE\_ANY を使用すると、Task Manager で CPU の割り振りを自動的に行ってくれる便利な機能である。しかし、この機能を使用すると、Blocked Read に影響を与えてしまう。 +SPE\_ANY を使用すると、Task Manager で CPU の割り振りを自動的に行う。しかし、この機能を使用すると、Blocked Read に影響を与えてしまう。 Blocked Read 、Task それぞれに SPE\_ANY で CPUを自動的に割り振ると、Task Manager 側で自動的に CPU を割り当てる。このように CPU を割り当ててしまうと、本来 Blocked Read は連続で読み込むはずが、他の Task を割り当てられてしまう。 (図\ref{fig:speany}) @@ -145,10 +145,10 @@ \label{fig:speany} \end{figure} -この問題を解決するために、Task Manager に新しく I/O 専用の thread を用意した。 +この問題を解決するために、Task Manager に新しく I/O 専用の thread を用意した。(図\ref{fig:addio0}) %この問題を解決するために、Task Manager に IO\_0という新しいデバイス設定を追加した。 -この設定は他のデバイス設定よりも priority を高く設定している。(\ref{fig:addio0}) +この設定は他のデバイス設定よりも priority を高く設定している。 \begin{figure}[htbp] \begin{center} @@ -158,13 +158,40 @@ \label{fig:addio0} \end{figure} -SPE\_ANY よりも高く設定しているので、IO\_0 で設定を行う Read Task に SPE\_ANY で設定した 文字列検索 Task に割り込まれることがなくなる。 +SPE\_ANY で使用する CPU の設定よりも高く設定しているので、IO\_0 で設定を行う Read Task に SPE\_ANY で設定した 文字列検索 Task に割り込まれることがなくなる。 (図\ref{fig:io0}) \begin{figure}[htbp] \begin{center} \includegraphics[width=1.0\textwidth]{fig/io0.pdf} \end{center} -\caption{[image]priority を上げたときの image 図} +\caption{Blocked Read Task を IO\_0 での実装時} \label{fig:io0} \end{figure} + +\newpage +IO\_0 の priority を高く実装したソースコードは以下のようになる。 +\begin{breakbox} +\begin{verbatim} +void * +CpuThreads::cpu_thread_run(void *args) +{ + cpu_thread_arg_t *argt = (cpu_thread_arg_t *) args; + + ・・・ + + if (argt->cpuid >= argt->cpu_num) { + // set IO thread priory maximum + int policy; + struct sched_param param; + pthread_getschedparam(pthread_self(), &policy, ¶m); + param.sched_priority = 1; + pthread_setschedparam(pthread_self(), policy, ¶m); + } + + return NULL; +} +\end{verbatim} +\end{breakbox} + +(ソース説明)
--- a/paper/fig/blockread.graffle Tue Feb 25 14:33:01 2014 +0900 +++ b/paper/fig/blockread.graffle Tue Feb 25 21:40:27 2014 +0900 @@ -26,7 +26,7 @@ <key>MasterSheets</key> <array/> <key>ModificationDate</key> - <string>2014-02-24 09:48:59 +0000</string> + <string>2014-02-25 12:26:02 +0000</string> <key>Modifier</key> <string>masataka kohagura</string> <key>NotesVisible</key> @@ -28341,7 +28341,7 @@ <key>Points</key> <array> <string>{157.72335141816603, 232.07150597754608}</string> - <string>{157.72338344326749, 248.5065476340697}</string> + <string>{157.72338344326747, 248.5065476340697}</string> </array> <key>Style</key> <dict> @@ -36819,6 +36819,1212 @@ <key>GraphicsList</key> <array> <dict> + <key>Bounds</key> + <string>{{349.83002928005732, 112.35235622913868}, {108.41831207275391, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>83</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 wait for Output Data}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{243.64874258292048, 73.25925488982746}, {108.41831207275391, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>82</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 spawn Output Data}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{165.26627324696224, 59.259258212703131}, {81.463137313527341, 28}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>81</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 wait for\ +file read}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>AllowToConnect</key> + <false/> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>87</integer> + <key>Points</key> + <array> + <string>{369.32896222233944, 253.9936572872839}</string> + <string>{407.76977495207439, 211.54560281664553}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + </dict> + <dict> + <key>AllowToConnect</key> + <false/> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>73</integer> + <key>Points</key> + <array> + <string>{369.32894897460938, 233.82559103016305}</string> + <string>{395.58490270484458, 206.51466797364506}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + </dict> + <dict> + <key>AllowToConnect</key> + <false/> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>72</integer> + <key>Points</key> + <array> + <string>{369.32894897460938, 160.7163508481004}</string> + <string>{395.58490158839709, 188.67089596956819}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + </dict> + <dict> + <key>AllowToConnect</key> + <false/> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>62</integer> + </dict> + <key>ID</key> + <integer>70</integer> + <key>Points</key> + <array> + <string>{369.32896222233944, 143.48946092014191}</string> + <string>{419.50243577478443, 184.18386725525298}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>52</integer> + </dict> + <key>ID</key> + <integer>69</integer> + <key>Points</key> + <array> + <string>{293.77336668065089, 261.76210954640061}</string> + <string>{264.53048820004096, 269.97740650994837}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>60</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>51</integer> + </dict> + <key>ID</key> + <integer>68</integer> + <key>Points</key> + <array> + <string>{287.36645562654638, 234.7032853856476}</string> + <string>{267.69540837965349, 235.6672055667959}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>59</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>50</integer> + </dict> + <key>ID</key> + <integer>67</integer> + <key>Points</key> + <array> + <string>{287.36642220845039, 159.77561736965555}</string> + <string>{267.69542393572857, 158.81171150147918}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>55</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>28</integer> + </dict> + <key>ID</key> + <integer>66</integer> + <key>Points</key> + <array> + <string>{293.77328244680677, 132.71676848016759}</string> + <string>{264.53050935538141, 124.50151658384615}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>FilledArrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>54</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>52</integer> + </dict> + <key>ID</key> + <integer>65</integer> + <key>Points</key> + <array> + <string>{183.49285030115306, 262.43781723862367}</string> + <string>{191.80789890658932, 253.29921570905844}</string> + <string>{212.35765330484233, 253.29921570905844}</string> + <string>{225.76468571828983, 264.56145477864015}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>47</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>51</integer> + </dict> + <key>ID</key> + <integer>64</integer> + <key>Points</key> + <array> + <string>{182.19324748926189, 222.64794375790373}</string> + <string>{191.80789376886767, 210.89872323676454}</string> + <string>{212.35764816712063, 210.89872323676454}</string> + <string>{226.85845272979398, 224.44266155136057}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>46</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>63</integer> + <key>Points</key> + <array> + <string>{180.27231672314932, 143.53164879550511}</string> + <string>{191.80790294741374, 132.85200477392701}</string> + <string>{212.35765734566669, 132.85200477392701}</string> + <string>{225.81004116434357, 145.30621858185688}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>Head</key> + <dict> + <key>ID</key> + <integer>28</integer> + </dict> + <key>ID</key> + <integer>35</integer> + <key>Points</key> + <array> + <string>{183.25662822953271, 103.34382564020828}</string> + <string>{192.76627965277558, 92.697403177720687}</string> + <string>{213.31603405102859, 92.697403177720687}</string> + <string>{226.76841786970544, 105.15161698565052}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>LineType</key> + <integer>1</integer> + <key>TailArrow</key> + <string>Arrow</string> + </dict> + </dict> + <key>Tail</key> + <dict> + <key>ID</key> + <integer>1</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{390.63884893286468, 183.59107764089654}, {90.731513977050781, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>62</integer> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Result Task}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{287.86584946941747, 242.33088234514204}, {81.463103909583637, 19.295995712280273}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>60</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Output Data}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{287.86585639268458, 223.03488938207519}, {81.463103909583637, 19.295995712280273}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>59</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Output Data}</string> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>58</integer> + <key>Points</key> + <array> + <string>{327.84303487611038, 183.26216910861453}</string> + <string>{327.84303487611038, 211.2167148771924}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>2</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{287.86582298874123, 152.14799269137089}, {81.463103909583637, 19.295995712280273}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>55</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Output Data}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{287.86582991200845, 132.85199972830398}, {81.463103909583637, 19.295995712280273}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>54</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 Output Data}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{213.31602108687596, 262.80766376930353}, {54, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>52</integer> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 task}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{213.31602108687596, 223.03493092281334}, {54, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>51</integer> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 task}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{213.31603405102854, 143.48945685495173}, {54, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>50</integer> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 task}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{213.31603405102859, 103.71672400846133}, {54, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>28</integer> + <key>Shape</key> + <string>Circle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 task}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>48</integer> + <key>Points</key> + <array> + <string>{165.26627488093757, 183.26218666204076}</string> + <string>{165.26627488093757, 211.21673243061869}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>2</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{138.76627276886592, 262.80764162659648}, {63.344825298837208, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>47</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 File Read}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{138.76627276886592, 223.03489581595906}, {63.344825298837208, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>46</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 File Read}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{138.76627276886592, 143.48945226567864}, {63.344825298837208, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>45</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 File Read}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{138.76628084405212, 103.71672630309789}, {63.344825298837208, 27.954545768578228}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>ID</key> + <integer>1</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 File Read}</string> + </dict> + </dict> + <dict> + <key>Bounds</key> + <string>{{99.999998233936481, 289.710876759602}, {35.433071398293073, 14}}</string> + <key>Class</key> + <string>ShapedGraphic</string> + <key>FitText</key> + <string>Vertical</string> + <key>Flow</key> + <string>Resize</string> + <key>ID</key> + <integer>44</integer> + <key>Shape</key> + <string>Rectangle</string> + <key>Style</key> + <dict> + <key>fill</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + <key>Text</key> + <dict> + <key>Pad</key> + <integer>0</integer> + <key>Text</key> + <string>{\rtf1\ansi\ansicpg932\cocoartf1265 +\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\qc + +\f0\fs24 \cf0 FILE}</string> + <key>VerticalPad</key> + <integer>0</integer> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>43</integer> + <key>Points</key> + <array> + <string>{117.21652858486596, 262.80763005446465}</string> + <string>{117.21652858486596, 290.76217582304253}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>NegativeControls</string> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>NegativeControls</string> + </dict> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>42</integer> + <key>Points</key> + <array> + <string>{117.21652858486596, 223.03490154432578}</string> + <string>{117.21652858486596, 250.98944731290354}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>NegativeControls</string> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>NegativeControls</string> + </dict> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>40</integer> + <key>Points</key> + <array> + <string>{117.21652858486601, 183.26217787078312}</string> + <string>{117.21652858486601, 211.21672363936099}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>0</string> + <key>Legacy</key> + <true/> + <key>Pattern</key> + <integer>2</integer> + <key>TailArrow</key> + <string>0</string> + </dict> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>39</integer> + <key>Points</key> + <array> + <string>{117.21653342146274, 143.48945705826318}</string> + <string>{117.21653342146274, 171.44400282684146}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>NegativeControls</string> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>NegativeControls</string> + </dict> + </dict> + </dict> + <dict> + <key>Class</key> + <string>LineGraphic</string> + <key>ID</key> + <integer>38</integer> + <key>Points</key> + <array> + <string>{117.21652858486607, 103.71672957002347}</string> + <string>{117.21652858486607, 131.6712753386017}</string> + </array> + <key>Style</key> + <dict> + <key>stroke</key> + <dict> + <key>HeadArrow</key> + <string>NegativeControls</string> + <key>Legacy</key> + <true/> + <key>TailArrow</key> + <string>NegativeControls</string> + </dict> + </dict> + </dict> + </array> + <key>GridInfo</key> + <dict/> + <key>HPages</key> + <integer>1</integer> + <key>KeepToScale</key> + <false/> + <key>Layers</key> + <array> + <dict> + <key>Lock</key> + <string>NO</string> + <key>Name</key> + <string>レイヤー 1</string> + <key>Print</key> + <string>YES</string> + <key>View</key> + <string>YES</string> + </dict> + </array> + <key>LayoutInfo</key> + <dict> + <key>Animate</key> + <string>NO</string> + <key>circoMinDist</key> + <real>18</real> + <key>circoSeparation</key> + <real>0.0</real> + <key>layoutEngine</key> + <string>dot</string> + <key>neatoSeparation</key> + <real>0.0</real> + <key>twopiSeparation</key> + <real>0.0</real> + </dict> + <key>Orientation</key> + <integer>2</integer> + <key>PrintOnePage</key> + <false/> + <key>RowAlign</key> + <integer>1</integer> + <key>RowSpacing</key> + <real>36</real> + <key>SheetTitle</key> + <string>キャンバス 21</string> + <key>UniqueID</key> + <integer>23</integer> + <key>VPages</key> + <integer>1</integer> + </dict> + <dict> + <key>ActiveLayerIndex</key> + <integer>0</integer> + <key>AutoAdjust</key> + <true/> + <key>BackgroundGraphic</key> + <dict> + <key>Bounds</key> + <string>{{0, 0}, {558.99997329711914, 783}}</string> + <key>Class</key> + <string>SolidGraphic</string> + <key>ID</key> + <integer>2</integer> + <key>Style</key> + <dict> + <key>shadow</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + <key>stroke</key> + <dict> + <key>Draws</key> + <string>NO</string> + </dict> + </dict> + </dict> + <key>BaseZoom</key> + <integer>0</integer> + <key>CanvasOrigin</key> + <string>{0, 0}</string> + <key>ColumnAlign</key> + <integer>1</integer> + <key>ColumnSpacing</key> + <real>36</real> + <key>DisplayScale</key> + <string>1 0/72 in = 1.0000 in</string> + <key>GraphicsList</key> + <array> + <dict> <key>Class</key> <string>LineGraphic</string> <key>Head</key> @@ -36865,8 +38071,8 @@ <integer>51</integer> <key>Points</key> <array> - <string>{121.35421405866239, 177.31362701255151}</string> - <string>{123.14540006458277, 203.20489457295614}</string> + <string>{121.35419690447667, 177.313627049985}</string> + <string>{123.14535318667582, 203.20489465062303}</string> </array> <key>Style</key> <dict> @@ -36963,8 +38169,8 @@ <integer>48</integer> <key>Points</key> <array> - <string>{124.30637384751844, 233.09257366832264}</string> - <string>{124.5596274084397, 262.83334060157586}</string> + <string>{124.30637353461616, 233.09257366832279}</string> + <string>{124.55962647283349, 262.8333406015845}</string> </array> <key>Style</key> <dict> @@ -37110,8 +38316,8 @@ <integer>40</integer> <key>Points</key> <array> - <string>{403.59382811493339, 292.35182848951348}</string> - <string>{403.64431514489542, 316.72218912963075}</string> + <string>{403.59396363602571, 292.35182848870994}</string> + <string>{403.6446716642937, 316.72218908966272}</string> </array> <key>Style</key> <dict> @@ -37292,8 +38498,8 @@ <integer>30</integer> <key>Points</key> <array> - <string>{403.56304284685962, 233.46295594362414}</string> - <string>{403.5633814561657, 262.46294025488294}</string> + <string>{403.56288853323679, 233.46295594362397}</string> + <string>{403.56292769396885, 262.46294025487464}</string> </array> <key>Style</key> <dict> @@ -37418,8 +38624,8 @@ <integer>26</integer> <key>Points</key> <array> - <string>{322.4174582106013, 218.29040314444234}</string> - <string>{352.95783888363394, 218.37625532453504}</string> + <string>{322.4174582106013, 218.29040313965595}</string> + <string>{352.95783888363394, 218.37625531686001}</string> </array> <key>Style</key> <dict> @@ -37537,8 +38743,8 @@ <integer>15</integer> <key>Points</key> <array> - <string>{221.22318776784829, 136.39856705596634}</string> - <string>{167.05098451030736, 150.34218939748794}</string> + <string>{221.22318776784829, 136.3985670559714}</string> + <string>{167.05098451030736, 150.34218939749883}</string> </array> <key>Style</key> <dict> @@ -37572,8 +38778,8 @@ <integer>14</integer> <key>Points</key> <array> - <string>{360.67788647489022, 149.63888940375787}</string> - <string>{314.68249365772874, 137.10721546307607}</string> + <string>{360.6778899855093, 149.63755189528572}</string> + <string>{314.68250063891441, 137.10456144123449}</string> </array> <key>Style</key> <dict> @@ -37607,8 +38813,8 @@ <integer>13</integer> <key>Points</key> <array> - <string>{407.40662155379846, 87.907401162756742}</string> - <string>{407.40648048194021, 147.42592798173524}</string> + <string>{407.40664071342786, 87.907401162756742}</string> + <string>{407.40664071342786, 147.42592798173553}</string> </array> <key>Style</key> <dict> @@ -38144,8 +39350,8 @@ <integer>40</integer> <key>Points</key> <array> - <string>{403.59398321789575, 292.35182848870966}</string> - <string>{403.64472317891733, 316.72218908964658}</string> + <string>{403.5939860473419, 292.35182848870966}</string> + <string>{403.64473062242774, 316.72218908964658}</string> </array> <key>Style</key> <dict> @@ -38452,8 +39658,8 @@ <integer>26</integer> <key>Points</key> <array> - <string>{322.4174582106013, 218.29040313779441}</string> - <string>{352.95783888363394, 218.37625531387505}</string> + <string>{322.4174582106013, 218.29040313707046}</string> + <string>{352.95783888363394, 218.37625531271416}</string> </array> <key>Style</key> <dict> @@ -38571,8 +39777,8 @@ <integer>15</integer> <key>Points</key> <array> - <string>{221.22318776784829, 136.39856705597245}</string> - <string>{167.05098451030736, 150.34218939750116}</string> + <string>{221.22318776784829, 136.39856705597271}</string> + <string>{167.05098451030736, 150.34218939750167}</string> </array> <key>Style</key> <dict> @@ -38606,8 +39812,8 @@ <integer>14</integer> <key>Points</key> <array> - <string>{360.67789088236265, 149.6372122094283}</string> - <string>{314.68250239440016, 137.10388739400713}</string> + <string>{360.67789111602877, 149.63712594094957}</string> + <string>{314.68250282392256, 137.10371620165293}</string> </array> <key>Style</key> <dict> @@ -39106,7 +40312,7 @@ <key>ExpandedCanvases</key> <array/> <key>Frame</key> - <string>{{1149, 943}, {1184, 874}}</string> + <string>{{746, 1266}, {1184, 874}}</string> <key>ListView</key> <true/> <key>OutlineWidth</key> @@ -39120,7 +40326,7 @@ <key>SidebarWidth</key> <integer>120</integer> <key>VisibleRegion</key> - <string>{{-108.99999999999999, 20.740740374446084}, {777.03702331406942, 544.44443482920974}}</string> + <string>{{-108.99999999999999, 0}, {777.03702331406942, 544.44443482920974}}</string> <key>Zoom</key> <real>1.3500000238418579</real> <key>ZoomValues</key> @@ -39225,6 +40431,11 @@ <real>1.3500000238418579</real> <real>1</real> </array> + <array> + <string>キャンバス 21</string> + <real>1.3500000238418579</real> + <real>1</real> + </array> </array> </dict> </dict>
--- a/preliminary/final-thesis.tex Tue Feb 25 14:33:01 2014 +0900 +++ b/preliminary/final-thesis.tex Tue Feb 25 21:40:27 2014 +0900 @@ -24,8 +24,7 @@ \maketitle \thispagestyle{fancy} -\section{はじめに} -\subsection{研究背景と目的} +\section{研究背景と目的} 近年、CPU 1 コア当たりのクロック数が頭打ちとなっているため、シングルコアでの処理能力はほとんど上がっていない。 それを解決した結果、シングルコアからマルチコアへの移行によって CPU 性能が向上している。 しかし、マルチコア CPU を最大限に活かすためには、プログラムの並列度を向上させなければならない。 @@ -42,14 +41,14 @@ Cerium Task ManagerはPlayStation 3/Cell、Mac OS X及びLinux上で利用することが可能で、近年ではGPUでの利用も可能となった。\cite{tomari} \section{I/O を含む Task の概要} -ファイルを読み込んで一定の大きさでファイルを分割し (File Read)、それらに対してそれぞれ文字列検索等の処理 (Run Tasks)を行う。 -そしてそれぞれの処理から返されたの結果 (Output Data)を最後に集計をして結果を返す(Run resultTask)。(図\ref{fig:includeio}) +ファイルを読み込んで一定の大きさでファイルを分割し (File Read)、それらに対してそれぞれ文字列検索等の処理 (Task)を行う。 +そしてそれぞれの処理から返されたの結果 (Output Data)を最後に集計をして結果を返す(Result Task)。(図\ref{fig:includeio}) 図\ref{fig:includeio} \begin{figure}[htbp] \begin{center} -\includegraphics[width=0.4\textwidth]{pic/includeio.pdf} +\includegraphics[width=0.5\textwidth]{pic/includeio.pdf} \end{center} \caption{I/O を含む Task} \label{fig:includeio} @@ -85,9 +84,9 @@ \subsection{I/O 専用 thread の実装} Cerium Task Manager では Task 単位で CPU Type の設定を変更することができる。 SPE\_ANY という Type を設定すると、Cerium Task Manager 側が自動的に CPU を割り振る。 -しかし、今回の実装でこの Type を使用してしまうと、Blocked Read Task の隙間時間に Task が割り振られてしまう問題がある。 -その問題を解決するために、IO\_0 という Type を新しく実装した。 -IO\_0 は他の Type よりも priority を高く設定しているため、他の Task に割り込まれることがないようチューニングを行った。 +しかし、今回の実装でこの Type を使用してしまうと、Blocked Read Task に割り込んで Task が割り振られてしまう問題がある。 +その問題を解決するために、IO\_0 という I/O 専用の thread を実装した。 +この Thread は I/O を最優先に実行されるようにチューニングを行った。 (図\ref{fig:io0}) %% %(図\ref{fig:speany})