Mercurial > hg > Papers > 2020 > menikon-thesis
view final_sub/utf8.tex @ 12:996a70147cb0
fix
author | menikon |
---|---|
date | Tue, 11 Feb 2020 04:51:05 +0900 |
parents | 102c40310142 |
children | a03d74165189 |
line wrap: on
line source
\documentclass[twocolumn,twoside,9.5pt]{jarticle} \usepackage[dvipdfmx]{graphicx} \usepackage{picins} \usepackage{fancyhdr} \usepackage{listings} \usepackage{caption} \usepackage{latexsym} \usepackage{url} \usepackage{abstract} \usepackage{float} \pagestyle{fancy} \lhead{\parpic{\includegraphics[height=1zw,keepaspectratio,bb=0 0 251 246]{pic/emblem-bitmap.pdf}}琉球大学主催 工学部情報工学科 卒業研究発表会} \rhead{} \cfoot{} \setlength{\topmargin}{-1in \addtolength{\topmargin}{15mm}} \setlength{\headheight}{0mm} \setlength{\headsep}{5mm} \setlength{\oddsidemargin}{-1in \addtolength{\oddsidemargin}{11mm}} \setlength{\evensidemargin}{-1in \addtolength{\evensidemargin}{21mm}} \setlength{\textwidth}{181mm} \setlength{\textheight}{261mm} \setlength{\footskip}{0mm} \pagestyle{empty} \usepackage{comment} \usepackage{listings} \lstset{ language=C, tabsize=2, frame=single, basicstyle={\ttfamily\footnotesize}, % identifierstyle={\footnotesize}, % commentstyle={\footnotesize\itshape}, % keywordstyle={\footnotesize\bfseries}, % ndkeywordstyle={\footnotesize}, % stringstyle={\footnotesize\ttfamily}, breaklines=true, captionpos=b, columns=[l]{fullflexible}, % xrightmargin=0zw, % xleftmargin=1zw, % aboveskip=1zw, numberstyle={\scriptsize}, % stepnumber=1, numbersep=0.5zw, % lineskip=-0.5ex, } \renewcommand{\lstlistingname}{Code} \usepackage{caption} \captionsetup[lstlisting]{font={small, tt}} \begin{document} \title{CbC による xv6 の FileSystem の書き換え} \author{学籍番号 : 165723C 氏名 : 坂本昂弘 {}{} 指導教員 : 河野真治} \date{2020年2月17日} \maketitle \thispagestyle{fancy} \section{section1} \section{xv6} xv6\cite{xv6}とはMITのオペレーティングコースの教育目的で2006年に開発されたオペレーティングシステムである. xv6 はオリジナルである v6 が非常に古いC言語で書かれている為, ANSI-Cに書き換えられ x86 に再実装された. xv6 はreadやwriteなどのsystemcall,プロセス,仮想メモリ,カーネルとユーザーの分離,割り込み,ファイルシステムなどUnixの基本的な構造を持っている. section{Continuation based C} xv6 kernel上でinterfaceを実装する際,当研究室で開発されたプログラミング言語 Continuation based C (CbC)を用いる. CbC は基本的な処理単位を CodeGearとして定義し,CodeGea間で遷移するようにプログラムを記述するC言語と互換性のあるプログラミング言語である. CodeGearは返り値を持たない為,関数内で処理が終了すると呼び出し元の関数に戻ることがなく別のCodeGearへ遷移する. 以下のCode1にCodeGear遷移時のコード例を示す. \lstinputlisting[label=cbcexample, caption=CodeGearの継続の例]{src/cbc_example.cbc} またCbCにおけるCodeGear間の継続にはスタックが使用できず,呼び出し元の環境などを持たない為軽量継続と呼ぶ. 現在CbCはCコンパイラであるGCC及びLLVMをバックエンドとしたclang上で実装されている. \section{context} contextとは一連の実行が行われる際に使用されるCodeGearとDataGearの集合である. 従来のスレッドやプロセスに対応する.Context は接続可能な CodeGear, Data Gear のリスト. Data Gear を確保するメモリ空間,実行される Task への Code Gear 等を持っている. CodeGearが別のCodeGearに遷移する際,必ずcontextを参照しenumで定義されたCodeGearの番号を指定し遷移する.ノーマルレベルで見た際のCodeGar,DataGerおよびcontextの関係を以下の図1に簡潔に示す. \begin{figure}[ht] \begin{center} \includegraphics[width=65mm]{pic/context.pdf} \end{center} \caption{CodeGear,DataGear,contxtの関係図} \label{fig:perl6buil} \end{figure} \section{CbCのInterface} 先述した通り, CbCのInterface は Gears OS のモジュール化の仕組みである. Interface は呼び出しの引数になる Data Gear の集合であり,そこで呼び出される Code Gear のエントリである.呼び出される Code Gear の引数となる Data Gear はここで 全て定義される. Interface を定義することで複数の実装を持つことができる.このInterfaceは,JavaのInterfaceやHaskellの型クラスに対応し,導入することで仕様と実装に分けて記述することが出来る. \section{xv6 の FileSystem} \section{CbC による xv6 FileSystem の書き換え} \section{まとめと今後の課題} \thispagestyle{fancy} %\begin{thebibliography}{9} \nocite{*} \bibliographystyle{junsrt} \bibliography{reference} %\end{thebibliography} \end{document}