# HG changeset patch # User menikon # Date 1581245580 -32400 # Node ID 53114bdcb0c320e7081f4a3e4752319b1336b75f # Parent 40726bcd527241a252d5abdcba81246214820567 tweak diff -r 40726bcd5272 -r 53114bdcb0c3 final_main/chapter1.tex --- a/final_main/chapter1.tex Sat Feb 08 21:05:19 2020 +0900 +++ b/final_main/chapter1.tex Sun Feb 09 19:53:00 2020 +0900 @@ -1,13 +1,6 @@ -\chapter{はじめに} -\label{chap:introduction} +\chapter{xv6 の OS の信頼性保証} +%\label{chap:introduction} \pagenumbering{arabic} %序論の目安としては1枚半ぐらい. %英語発表者は,最終予稿の「はじめに」の英訳などを載せてもいいかも. - -\section{背景と目的} - - -\section{論文の構成} - -%\section{Introduction} diff -r 40726bcd5272 -r 53114bdcb0c3 final_main/chapter2.tex --- a/final_main/chapter2.tex Sat Feb 08 21:05:19 2020 +0900 +++ b/final_main/chapter2.tex Sun Feb 09 19:53:00 2020 +0900 @@ -1,6 +1,6 @@ \chapter{Continuation based C} %\label{chap:concept} - +\section{Continuation based Cの概要} Continuation based C \cite{cbc} (以下CbC) は基本的な処理単位を CodeGear として定義し, CodeGea 間で遷移するようにプログラムを記述する C 言語と互換性のある当研究室で開発されたプログラミング言語である.図\ref{fig:codegear}はCodeGear間の継続する際の処理の流れを示している. \begin{figure}[ht] diff -r 40726bcd5272 -r 53114bdcb0c3 final_main/chapter3.tex --- a/final_main/chapter3.tex Sat Feb 08 21:05:19 2020 +0900 +++ b/final_main/chapter3.tex Sun Feb 09 19:53:00 2020 +0900 @@ -1,12 +1,14 @@ \chapter{GearsOS} -\label{chap:poordirection} - +%\label{chap:poordirection} +\section{GearsOS の概要} +Gears OS は CbC によって記述されており, CodeGear と DataGear の単位を用いて開発されている OS である. +Gears OS は 一連の実行が行われる際に使用される CodeGear と DataGear を全て持っている Context と呼ばれるものを持っている.Gears OS は CodeGear 間の継続などの際,常に context を持ち歩いており CodeGear と DataGear の参照が必要になる場合,この Context を通して参照される. \section{Context} context とは一連の実行が行われる際に使用される CodeGear と DataGear の集合である. 従来のスレッドやプロセスに対応する.Context は接続可能な CodeGear, Data Gear のリスト. Data Gear を確保するメモリ空間, 実行される Task への Code Gear 等を持っている. CodeGear が 別の CodeGear に遷移する際, 必ず context を参照し enum で定義された CodeGear の番号を指定し遷移する. ノーマルレベルで見た際の CodeGar,DataGer および context の関係を以下の図\ref{fig:cbc} に簡潔に示す. -\vspace{10mm} +%\vspace{10mm} \begin{figure}[ht] \begin{center} \includegraphics[width=100mm]{fig/context.pdf} diff -r 40726bcd5272 -r 53114bdcb0c3 final_main/chapter4.tex --- a/final_main/chapter4.tex Sat Feb 08 21:05:19 2020 +0900 +++ b/final_main/chapter4.tex Sun Feb 09 19:53:00 2020 +0900 @@ -1,5 +1,5 @@ \chapter{xv6} -\section{xv6 とは} +\section{xv6 の概要} xv6 \cite{xv6} とは MIT のオペレーティングコースの教育目的で2006年に開発されたオペレーティングシステムである. xv6 はオリジナルである v6 が非常に古い C 言語で書かれてい る為, ANSI-C に書き換えられ x86 に再実装された. xv6 は read や write などの systemcall, プロセス, 仮想メモリ, カーネルとユーザーの分離, 割り込み, ファイルシステムなど Unix の基本的な構造を持っている. 本研究で使われているのは ARM\cite{arm} 上で動作する Raspberry Pi 用に改良されたxv6を使用する. @@ -8,35 +8,69 @@ %どんなものか書く %processについて(軽く) - \section{xv6 のFileSystem構造} +xv6 の FileSystem は図\ref{fig:xv6filesystem} のように7つの階層によって構成されている. \begin{figure}[ht] \begin{center} \includegraphics[width=50mm]{fig/FileSystemLayout.pdf} \end{center} - \caption{xv6 の FileSystem } + \caption{xv6 の FileSystem 構造} \label{fig:xv6filesystem} \end{figure} +\begin{itemize} + \item File descriptor 階層 + Unixの資源はファイルとして表現され,コンソールのようなデバイスはもちろん,実際のファイルもファイルとして表現されている. + File descriptor 階層はこの + + \item Pathname 階層 + \item Directory 階層 + \item Inode 階層 + \item Logging 階層 + \item Bffer cache 階層 + \item Disk 階層 +\end{itemize} + \newpage -xv6 の FileSystem の構造を以下の図\ref{fig:filesystem}に示す. +xv6 の FileSystem の Disk の割り当てを以下の図\ref{fig:filesystem}に示す. \begin{figure}[ht] \begin{center} \includegraphics[width=150mm]{fig/xv6filesystemlayout.pdf} \end{center} - \caption{xv6 の FileSystem } + \caption{xv6 の FileSystem に関する Disk の割り当て} \label{fig:filesystem} \end{figure} \begin{itemize} \item boot sector + \\boot sectorを保持しているだけで FileSystem はこのブロックを使用することはない. + \item super block - \item inode + \\ブロックのファイルサイズやデータブロックの数, inodeの数, log 中のブロック数などが格納されている. + + \item inodes + \\inodeが格納されている. + \item block bitmap + \\block bitmap は使用しているブロックが記憶されている. + \item data blocks + \\block bitmap において使用可能であることが記録されており,ファイルやディレクトリが保持されている. + \item log + \\Logging 階層の log が格納されている. + \end{itemize} \section{FilleSystem の API} %関数や構造体などを解説しそのまま利用されているところをかく +\begin{itemize} + \item + \item + \item + \item + \item + \item + \item +\end{itemize} diff -r 40726bcd5272 -r 53114bdcb0c3 final_main/main.out --- a/final_main/main.out Sat Feb 08 21:05:19 2020 +0900 +++ b/final_main/main.out Sun Feb 09 19:53:00 2020 +0900 @@ -1,14 +1,14 @@ -\BOOKMARK [0][-]{chapter.1}{第1章 はじめに}{}% 1 -\BOOKMARK [1][-]{section.1.1}{1.1 背景と目的}{chapter.1}% 2 -\BOOKMARK [1][-]{section.1.2}{1.2 論文の構成}{chapter.1}% 3 -\BOOKMARK [0][-]{chapter.2}{第2章 Continuation based C}{}% 4 -\BOOKMARK [1][-]{section.2.1}{2.1 CodeGear}{chapter.2}% 5 -\BOOKMARK [1][-]{section.2.2}{2.2 DataGear}{chapter.2}% 6 -\BOOKMARK [0][-]{chapter.3}{第3章 GearsOS}{}% 7 -\BOOKMARK [1][-]{section.3.1}{3.1 Context}{chapter.3}% 8 -\BOOKMARK [1][-]{section.3.2}{3.2 inetrface}{chapter.3}% 9 +\BOOKMARK [0][-]{chapter.1}{第1章 xv6 の OS の信頼性保証}{}% 1 +\BOOKMARK [0][-]{chapter.2}{第2章 Continuation based C}{}% 2 +\BOOKMARK [1][-]{section.2.1}{2.1 Continuation based Cの概要}{chapter.2}% 3 +\BOOKMARK [1][-]{section.2.2}{2.2 CodeGear}{chapter.2}% 4 +\BOOKMARK [1][-]{section.2.3}{2.3 DataGear}{chapter.2}% 5 +\BOOKMARK [0][-]{chapter.3}{第3章 GearsOS}{}% 6 +\BOOKMARK [1][-]{section.3.1}{3.1 GearsOS の概要}{chapter.3}% 7 +\BOOKMARK [1][-]{section.3.2}{3.2 Context}{chapter.3}% 8 +\BOOKMARK [1][-]{section.3.3}{3.3 inetrface}{chapter.3}% 9 \BOOKMARK [0][-]{chapter.4}{第4章 xv6}{}% 10 -\BOOKMARK [1][-]{section.4.1}{4.1 xv6 とは}{chapter.4}% 11 +\BOOKMARK [1][-]{section.4.1}{4.1 xv6 の概要}{chapter.4}% 11 \BOOKMARK [1][-]{section.4.2}{4.2 xv6 のFileSystem構造}{chapter.4}% 12 \BOOKMARK [1][-]{section.4.3}{4.3 FilleSystem の API}{chapter.4}% 13 \BOOKMARK [0][-]{chapter.5}{第5章 CbCによるFileSystemの書き換え}{}% 14 diff -r 40726bcd5272 -r 53114bdcb0c3 final_main/main.pdf Binary file final_main/main.pdf has changed diff -r 40726bcd5272 -r 53114bdcb0c3 rewrite_xv6_FileSystem_in_CbC.mm --- a/rewrite_xv6_FileSystem_in_CbC.mm Sat Feb 08 21:05:19 2020 +0900 +++ b/rewrite_xv6_FileSystem_in_CbC.mm Sun Feb 09 19:53:00 2020 +0900 @@ -1,18 +1,33 @@ - + + + - + + + + - + + + + - + + + + + + + + @@ -22,27 +37,78 @@ - + + + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +