view final_main/chapter4.tex @ 12:996a70147cb0

fix
author menikon
date Tue, 11 Feb 2020 04:51:05 +0900
parents 53114bdcb0c3
children d393f08644e1
line wrap: on
line source

\chapter{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を使用する.


\section{FileSystem}
%どんなものか書く
FileSystem とは,コンピュータの資源を操作するための OS が持つ機能のことである.ファイルといえば記憶装置内に格納されている情報を指すが,デバイスやプロセス,カーネル内の処理をする際の情報などをファイルとして扱う FileSystem も存在する. OS ごとに利用している FileSystem は異なるが,一部の OS を除きほとんどの OS には FileSystem が存在する.
%記憶装置内に格納されているデータ,デバイスやプロセス,カーネル内の処理をする際の情報などファイルとして管理している.
%processについて(軽く)
\section{xv6 のFileSystem}
.xv6 の FileSystem は,デバイスやプロセス,カーネル内の処理をする際の情報などをファイルとして扱う FileSystem である.
xv6 の FileSystem は図\ref{fig:xv6filesystem} のように7つの階層によって構成されている.

\newpage
\begin{figure}[ht]
     \begin{center}
     \includegraphics[width=50mm]{fig/FileSystemLayout.pdf}
     \end{center}
     \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 の Disk の割り当てを以下の図\ref{fig:filesystem}に示す.

\begin{figure}[ht]
     \begin{center}
     \includegraphics[width=150mm]{fig/xv6filesystemlayout.pdf}
     \end{center}
     \caption{xv6 の FileSystem に関する Disk の割り当て}
    \label{fig:filesystem}
\end{figure}

\begin{itemize}
  \item boot sector
  \\boot sectorを保持しているだけで FileSystem はこのブロックを使用することはない.
  
  \item super block
 \\ブロックのファイルサイズやデータブロックの数, 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}