view paper/sigos.tex @ 14:02c08d07c371

Xv6 and English Abstract
author tobaru
date Thu, 09 May 2019 21:15:45 +0900
parents 440be813ef3c
children f4aee7339546
line wrap: on
line source

%%
%% 研究報告用スイッチ
%% [techrep]
%%
%% 欧文表記無しのスイッチ(etitle,eabstractは任意)
%% [noauthor]
%%

%\documentclass[submit,techrep]{ipsj}
\documentclass[submit,techrep,noauthor]{ipsj}

\usepackage[dvips]{graphicx}
\usepackage{latexsym}
\usepackage{pdfpages}

\def\Underline{\setbox0\hbox\bgroup\let\\\endUnderline}
\def\endUnderline{\vphantom{y}\egroup\smash{\underline{\box0}}\\}
\def\|{\verb|}
%

%\setcounter{巻数}{59}%vol59=2018
%\setcounter{号数}{10}
%\setcounter{page}{1}


\begin{document}

\title{GearsOS の Paging と Segmentation
}

\etitle{Implement Paging and Segmentation on GearsOS }

\affiliate{IPSJ}{情報処理学会\\
IPSJ, Chiyoda, Tokyo 101--0062, Japan}


\paffiliate{JU}{情報処理大学\\
Johoshori Uniersity}

\author{桃原 優}{Yu Tobaru}{IPSJ}
\author{東恩納 琢偉}{Takui Higashionna}{IPSJ}
\author{河野 真治}{Shinji Kono}{IPSJ,JU}

\begin{abstract}
現代のOSでは, User Space で Page Table Entry による メモリ管理を行えるOSは少ない。
本研究室ではメタレベルの処理を記述できる CbC と CbC を用いて実装する GearsOS の開発を行っている。
CbC を用いることでメモリ管理などの資源管理を行えるようになるが, 現在の GearsOS でのメモリ管理では単に Page Table Entry をコピーする Fork で実装している。さらに, 資源管理を行える CbC で軽量なハードウェアでも動かせるように Arm のバイナリを出力する Xv6 という OS を CbC で書き直して GearsOS を開発する手法も行なっている。本論文ではXv6 を参考に GearsOS にメモリ管理を行う API を考察する。


\end{abstract}

\begin{eabstract}
In modern OS, there are few OS that can manage memory by Page Table Entry in User Space. In this laboratory, we are developing GearsOS which is implemented using CbC and CbC that can describe meta-level processing. Using CbC enables resource management such as memory management, but with the current memory management with GearsOS, it is implemented by Fork, which simply copies Page Table Entry. In addition, CbC is used to rewrite the OS called Xv6 that outputs Arm binary so that it can run even lightweight hardware that can execute resource management, and also develops GearsOS. In this paper, we will consider the API that manages memory in GearsOS referring to Xv6.


\end{eabstract}


%
%\begin{jkeyword}
%情報処理学会論文誌ジャーナル,\LaTeX,スタイルファイル,べからず集
%\end{jkeyword}
%
%\begin{eabstract}
%This document is a guide to prepare a draft for submitting to IPSJ
%Journal, and the final camera-ready manuscript of a paper to appear in
%IPSJ Journal, using {\LaTeX} and special style files.  Since this
%document itself is produced with the style files, it will help you to
%refer its source file which is distributed with the style files.
%\end{eabstract}
%
%\begin{ekeyword}
%IPSJ Journal, \LaTeX, style files, ``Dos and Dont's'' list
%\end{ekeyword}

\maketitle


% 書けるならなぜこれをやっているかを1章に書く

%2

\section{Gears OS}
本研究室では並列実行のサポートと,  信頼性を保証する Gears OS の開発を行っている。
従来の OS が行うメモリ管理や並列実行などは Meta レベルで処理される。メタレベルの処理を行える CbC という言語で Gears OS を実装する事で, ノーマルレベルから 並列実行環境に合わせた記述ができるように設計や実装を行う。

\subsection{Continuation based C}
本研究室では、Code Gear と Data Gear という単位でプログラムを記述する CbC と CbC を用いて実装する Gears OS の研究を行っている。Code Gear は CbC における最も基本的な処理の単位である。 入力と出力を持ち、goto によって Code Gear から次の Code Gear へ遷移する事で継続的に処理を行う事によって並列処理を行うことができる。
Data Gear は Gears OS におけるデータの基本的な単位である。Input Data Gear と Output Data Gear があり, Code Gear の遷移の際に Input Data Gear を受け取り, Output Data Gear を書き出す。 


% \setlength\intextsep{0pt}
% \setlength\textfloatsep{0pt}


 \begin{figure}[ht]
 \begin{center}
   \includegraphics[width=80mm,bb=0 0 595 642]{../images/codesegment.pdf}
 \end{center}
 \caption{Code Gear 間の継続}
 \label{fig:codegear}
\end{figure}


\subsection{Meta Code Gear と Meta Data Gear}
Gears OS ではメタ計算を Meta Code Gear, Meta Data Gear で表現する。CbC でもノーマルレベルとメタ計算を行うメタレベルの記述の2種類がある。この2つのレベルはプログラミング言語レベルでの変換として実現される。メタレベルへの変換は, Perl による変換スクリプトで実装している。
Gears OS では, Meta Code Gear は通常の Code Gear の直前,  直後に挿入され, メタ計算を実行する。 Code Gear 間の継続はノーマルレベルでは 図\ref{fig:metacodegear} の上のように見えるが, メタレベルでは Code Gear は  図\ref{fig:metacodegear} の下のように継続を行っている。


% Data Gear を Paging , Code Gear を Segmentation として
図\ref{fig:metacodegear} に Gears OS の構成図を示す。


\begin{figure}[ht]
 \begin{center}
   \includegraphics[width=80mm,bb=0 0 595 642]{../images/meta_cg_dg.pdf}
 \end{center}
 \caption{ノーマルレベルとメタレベルの継続の見え方}
 \label{fig:metacodegear}
\end{figure}


%3
\section{Paging と Segmentation}
メモリ管理の手法に, Paging と Segmentation がある。Paging ではメモリを Page と呼ばれる固定長の単位に分割し, メモリとスワップ領域で Page を入れ替えて管理を行う。Segmentation では可変長の単位に分割するので,  Paging と比べてメモリを無駄なく扱うことができる。近年では, Paging を採用している OS が多い。


\section{GearsOS での Paging}

\section{User Space で Page Table を操作する利点}

\section{Xv6 からの書き換え}
\subsection{Xv6}
Xv6 とは, マサチューセッツ工科大の大学院生向け講義の教材として使うために, UNIX V6 とい う OS を ANSI-C に書き換え, x86 に移植した Xv6 OS である。Xv6 は Arm のバイナリを出力するので, Raspberry Pi や 携帯など様々なハードウェアで動かすことができる。

\subsection{Xv6 を元にした GearsOS の実装}
Gears OS はメモリ管理やCPUの管理を User Space から操作できることを目標に実装しているので,  メモリに限りのあるハードウェアで動くように実装できる方が好ましい。ANSI-C で書かれている Xv6 を CbC に書き直し,  それを元に Gears OS を実装していく。
Xv6 の新しい要素として Gears OS の Context の部分を User Space 側で実行する。 

\subsection{メモリコントロール}
Context に必要な Page Table を提供する Interface と User Space からアクセスする API が必要である。
Page Table に相当するデータを Input Data Gear で受け取って変更した後, Context にあるメモリコントロールを担当する Meta Data Gear に goto してアクセスする。
その際に, Page Table Entry のバリデーションをチェックして反映することで,  他のプロセスから Page Table を書き換えられることを防ぐ。




%4.1
\subsection{表題・著者名等}




\begin{acknowledgment}
CbC や Gears OS の説明では, 先行研究を元に本稿を作成した。また,  河野 真治 准教授にさまざまなご教授を頂いた事を感謝する。
\end{acknowledgment}



\begin{thebibliography}{10}

\bibitem{okumura}
奥村晴彦:改訂第5版\LaTeXe 美文書作成入門,
技術評論社(2010).

\bibitem{companion}
Goossens, M., Mittelbach, F. and Samarin, A.:
{\it The LaTeX Companion},
Addison Wesley, Reading, Massachusetts (1993).

\bibitem{book1}
木下是雄:
理科系の作文技術,
中公新書(1981).

\bibitem{book2}
Strunk W. J. and White E.B.:
{\it The Elements of Style, Forth Edition},
Longman (2000).

\bibitem{book3}
Blake G. and Bly R.W.:
{\it The Elements of Technical Writing},
Longman (1993).

\bibitem{book4}
Higham N.J.:
{\it Handbook of Writing for the Mathematical Sciences},
SIAM (1998).

\bibitem{webpage1}
情報処理学会論文誌ジャーナル編集委員会:
投稿者マニュアル(online),
\urlj{http://www.ipsj.or.jp/journal /submit/manual/j\_manual.html}
(2007.04.05).

\bibitem{webpage2}
情報処理学会論文誌ジャーナル編集委員会:
べからず集(online),
\urlj{http://www.ipsj.or.jp/journal/manual /bekarazu.html}
(2011.09.15).

\end{thebibliography}




\end{document}