0
|
1 \documentclass[twocolumn,twoside,9.5pt]{jarticle}
|
|
2 \usepackage[dvipdfmx]{graphicx}
|
|
3 \usepackage{picins}
|
|
4 \usepackage{fancyhdr}
|
|
5 \pagestyle{fancy}
|
|
6 \lhead{\parpic{\includegraphics[height=1zw,clip,keepaspectratio]{pic/emblem-bitmap.pdf}}琉球大学主催 工学部情報工学科 卒業研究発表会}
|
|
7 \rhead{}
|
|
8 \cfoot{}
|
|
9
|
|
10 \setlength{\topmargin}{-1in \addtolength{\topmargin}{15mm}}
|
|
11 \setlength{\headheight}{0mm}
|
|
12 \setlength{\headsep}{5mm}
|
|
13 \setlength{\oddsidemargin}{-1in \addtolength{\oddsidemargin}{11mm}}
|
|
14 \setlength{\evensidemargin}{-1in \addtolength{\evensidemargin}{21mm}}
|
|
15 \setlength{\textwidth}{181mm}
|
|
16 \setlength{\textheight}{261mm}
|
|
17 \setlength{\footskip}{0mm}
|
|
18 \pagestyle{empty}
|
|
19
|
|
20 \begin{document}
|
1
|
21 \title{Implement asynchronous read of Cerium}
|
2
|
22 \author{148585H {Masataka}{KOHAGURA}}
|
0
|
23 \date{}
|
|
24 \maketitle
|
|
25 \thispagestyle{fancy}
|
|
26
|
1
|
27 \section{Abstract}
|
|
28 We are developing a Parallel task manager Cerium.
|
|
29 I/O Included programming, read times is more heavy than processing time of Task.
|
|
30 We assume to inplement included I/O programm by parallel programming. If I/O time is heavy, it is slowly included I/O programm.
|
|
31 In the conventional implementation, we implemented file read with "mmap()" or "read()".
|
|
32 Inplementation this function down the degree of parallelism because another CPU stop while reading files.
|
|
33 In real read situation, asynchronous read sometimes gives good result on word count example. We gives the result and analysis.
|
0
|
34 \section{Cerium Task Manager}
|
2
|
35 We program parallel per tashs with Task Manager.
|
|
36 It is treated function and sub routins as task and we set depending, Input Data, and output data.
|
|
37 And, it is managed Task Manager setting. This paper's ``Input Data" is text file of search subject.
|
0
|
38
|
2
|
39 Cerium Task Manager can use on PlayStaion 3/Cell, MacOS X and Linux.
|
0
|
40
|
2
|
41 \section{Outline included I/O Task}
|
|
42 Split the file constant size after file reading and splits file are excluded string search.
|
|
43 And returns the results to the last counting.
|
|
44 (fig\ref{fig:includeio})
|
0
|
45
|
|
46 \begin{figure}[htbp]
|
|
47 \begin{center}
|
|
48 \includegraphics[width=0.5\textwidth]{pic/includeio.pdf}
|
|
49 \end{center}
|
2
|
50 \caption{include I/O Task}
|
0
|
51 \label{fig:includeio}
|
|
52 \end{figure}
|
|
53
|
3
|
54 \section{Design and implementation of parallel processing for I/O}
|
0
|
55
|
3
|
56 \subsection{problems implementation of mmap}
|
|
57 In previous research we has done the reading of files in mmap.
|
|
58 Timing for reading files in mmap , not when the mmap function was called , for the first time the file is read when you access something with it mmap regions.
|
|
59 So divided Task is not to perform a string search immediately, the first time the file is stored in memory when it tries to string search .
|
|
60 Task is desirably performed simultaneously .
|
|
61 Since the reading is in mmap in each Task would happening , waiting Task by the I/O bottleneck occurs.
|
0
|
62
|
3
|
63 \subsection{Design and implementation of Asynchronous read}
|
|
64 Asynchronous read separate to a process to read certain size and to perform a string search .
|
|
65 In this way , I do a read-only Asynchronous read, it was generated separately the Task Blocks to perform a string search processing .
|
0
|
66
|
3
|
67 Read Task is not to read the entire file at once , performs a split certain size , each character string search is performed as soon as they are read.
|
|
68 Task When starting one by one, because it would compress memory in Task you start to perform the boot block summarizes multiple Task.
|
|
69
|
|
70 A text file to be processed in this one block , and we read in the Asynchronous Read, to start the Task Blocks in the range that has been read when you are finished loading .
|
|
71 If the Task, which is responsible for the range before it is read by the Asynchronous Read ends up starting, not return the correct results.
|
|
72 To prevent it, Task Blocks are always Blocked Read and wears wait to start from taking place.
|
|
73 (fig\ref{fig:blockedreadwait})
|
0
|
74
|
|
75 \begin{figure}[htbp]
|
|
76 \begin{center}
|
|
77 \includegraphics[width=0.5\textwidth]{pic/blockedreadwait.pdf}
|
|
78 \end{center}
|
|
79 \caption{Wait for Blocked Read}
|
|
80 \label{fig:blockedreadwait}
|
|
81 \end{figure}
|
|
82
|
3
|
83 \subsection{Implementation I/O thread}
|
|
84 It is possible to change the settings for the CPU Type in Cerium Task Manager In Task Unit.
|
|
85 If you set the Type of SPE\_ANY, Cerium Task Manager side automatically allocates CPU.
|
|
86 However, if you would use this Type in this implementation, there is a problem that the Task to interrupt the Blocked Read Task would have been allocated.
|
|
87 In order to solve the problem, an implementation of the thread of the dedicated I/O of IO\_0.
|
|
88 This Thread was tuned to run at the highest priority to the I/O.
|
|
89 (fig\ref{fig:io0})
|
0
|
90 %%
|
3
|
91 %(fig\ref{fig:speany})
|
0
|
92 %
|
|
93 %\begin{figure}[htbp]
|
|
94 %\begin{center}
|
|
95 %\includegraphics[width=0.4\textwidth]{pic/speany.pdf}
|
|
96 %\end{center}
|
|
97 %\caption{SPE\_ANYでの設定時}
|
|
98 %\label{fig:speany}
|
|
99 %\end{figure}
|
|
100
|
|
101
|
|
102 \begin{figure}[htbp]
|
|
103 \begin{center}
|
|
104 \includegraphics[width=0.4\textwidth]{pic/io0.pdf}
|
|
105 \end{center}
|
2
|
106 \caption{implement IO\_0}
|
0
|
107 \label{fig:io0}
|
|
108 \end{figure}
|
|
109
|
|
110 \newpage
|
|
111
|
2
|
112 \section{Benchmark}
|
0
|
113
|
|
114 \begin{itemize}
|
|
115 \item Mac OS X Mavericks (10.9.1)
|
|
116 \item HDD 1TB、Memory 16GB、CPU 2*2.66 GHz 6-Core Intel Xeon
|
|
117 \item CPU NUM 12
|
3
|
118 \item Is multiplied by the Booye-Moore String Search for the 10GB file , count what is included a number of search string
|
|
119 \item Time until the measurements returned results from reading the file
|
0
|
120 \end{itemize}
|
|
121
|
|
122 %以下の表\ref{table:result}に実行結果を示す。
|
|
123 \begin{tiny}
|
|
124 \begin{table}[ht]
|
|
125 \begin{center}
|
|
126 \label{table:result}
|
|
127 \small
|
|
128 \begin{tabular}[t]{c|r}
|
|
129 \hline
|
2
|
130 Read Method & Spend Average Time(s)\\
|
0
|
131 \hline
|
|
132 mmap & 154.6 \\
|
|
133 \hline
|
|
134 一括 Read & 114.9 \\
|
|
135 \hline
|
|
136 Blocked Read \& SPE\_ANY & 106.0 \\
|
|
137 \hline
|
|
138 Blocked Read \& IO\_0 & 99.2 \\
|
|
139 \hline
|
|
140 \end{tabular}
|
2
|
141 \caption{result}
|
0
|
142 \end{center}
|
|
143 \end{table}
|
|
144 \end{tiny}
|
|
145
|
|
146 %\ref{table:result}より、mmap より Blocked Read \& IO\_0 の実行速度が 36 \% 改善された。
|
3
|
147 From Table 1, the execution speed of Asynchronous Read \&SPE\_ANY has been improved 31\% from mmap.
|
|
148 In addition, CPU Type of Asynchronous Read was also seen further 4\% improvement by changing from SPE\_ANY to IO\_0.
|
|
149 From this , when performing parallel processing including I/O, instead of automatically to read by implementing in mmap, it is understood that better to control the reading in itself increases.
|
0
|
150
|
2
|
151 \section{conclusion}
|
3
|
152 When implementing the Task containing an I / O with mmap, because reading is not carried out only when some processing is applied with respect to the mmap regions , so that it would leave the loading on each Task.
|
|
153 As a method to solve it, and we implemented that performs Asynchronous Read and Task in parallel .
|
|
154 Also , Asynchronous Read is a result of improved so as not to be interrupted in another Task, 35 \% improvement in execution speed was observed .
|
|
155 From this study , Task , including an I / O , it is considered that there is room to further improve depending tuning.
|
0
|
156
|
|
157 \thispagestyle{fancy}
|
|
158 \begin{thebibliography}{9}
|
|
159
|
|
160 \bibitem{kinjyo}金城裕、河野真治、多賀野海人、小林佑亮 (琉球大学)\\
|
|
161 ゲームフレームワーク Cerium Task Manager の改良\\
|
|
162 情報処理学会システムソフトウェアとオペレーティング・システム研究会 (OS), April 2011
|
|
163
|
|
164 \end{thebibliography}
|
|
165 \end{document}
|