view slide/slide.html @ 35:ecbdcda618a4

fix slide
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Sun, 30 Jan 2022 00:10:50 +0900
parents f1d771f257e6
children 13120531542b
line wrap: on
line source






<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="content-type" content="text/html;charset=utf-8">
   <title>GearsOSにおけるinodeを用いたFileSystemの設計</title>

   <meta name="generator" content="Slide Show (S9) v4.1.0 on Ruby 3.0.3 (2021-11-24) [arm64-darwin21]">
   <meta name="author"    content="又吉 雄斗" >

<!-- style sheet links -->
<link rel="stylesheet" href="s6/themes/projection.css"   media="screen,projection">
<link rel="stylesheet" href="s6/themes/screen.css"       media="screen">
<link rel="stylesheet" href="s6/themes/print.css"        media="print">
<link rel="stylesheet" href="s6/themes/blank.css"        media="screen,projection">

<!-- JS -->
<script src="s6/js/jquery-1.11.3.min.js"></script>
<script src="s6/js/jquery.slideshow.js"></script>
<script src="s6/js/jquery.slideshow.counter.js"></script>
<script src="s6/js/jquery.slideshow.controls.js"></script>
<script src="s6/js/jquery.slideshow.footer.js"></script>
<script src="s6/js/jquery.slideshow.autoplay.js"></script>

<!-- prettify -->
<link rel="stylesheet" href="scripts/prettify.css">
<script src="scripts/prettify.js"></script>

<script>
  $(document).ready( function() {
    Slideshow.init();

    $('code').each(function(_, el) {
      if (!el.classList.contains('noprettyprint')) {
        el.classList.add('prettyprint');
      }
    });
    prettyPrint();
  } );

</script>

<!-- Better Browser Banner for Microsoft Internet Explorer (IE) -->
<!--[if IE]>
<script src="s6/js/jquery.microsoft.js"></script>
<![endif]-->

    

</head>
<body>

<div class="layout">
  <div id="header"></div>
  <div id="footer">
    <div align="right">
      <img src="s6/images/logo.svg" width="200px">
    </div>
  </div>
</div>

<div class="presentation">

  <div class='slide cover'>
    <table width="90%" height="90%" border="0" align="center">
      <tr>
        <td>
          <div align="center">
              <h1><font color="#808db5">GearsOSにおけるinodeを用いたFileSystemの設計</font></h1>
          </div>
        </td>
      </tr>
      <tr>
        <td>
          <div align="left">
              又吉 雄斗
              並列信頼研
            <hr style="color:#ffcc00;background-color:#ffcc00;text-align:left;border:none;width:100%;height:0.2em;">
          </div>
        </td>
      </tr>
    </table>
  </div>



<div class='slide'>
  
<!-- _S9SLIDE_ -->
<h2 id="gearsosにおけるfilesystemの設計">GearsOSにおけるFileSystemの設計</h2>

<ul>
  <li>アプリケーションの信頼性を保証するために,アプリケーションが動作するOSの信頼性を高める必要がある</li>
  <li>当研究室では,信頼性の保証を目的としたGearsOSを開発している</li>
  <li>GearsOSで未実装の機能であるファイルシステムの実装を行う</li>
  <li>Unix likeな実装</li>
</ul>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="inodeを用いたgearsdirectoryの実装">inodeを用いたgearsDirectoryの実装</h2>

<ul>
  <li>今回はディレクトリシステムを実装した</li>
  <li>GearsOSへUnixのFile systemの仕組みを取り入れるアプローチをとる</li>
  <li>Unixのinodeの仕組みを取り入れる</li>
  <li>GearsOSのディレクトリシステムであるgearsDirectoryについて説明する</li>
</ul>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="continuation-based-c">Continuation based C</h2>

<ul>
  <li>Cの下位言語である</li>
  <li>function callの代わりにgotoによる継続を用いる</li>
  <li>プログラムはCodeGearと呼ばれる処理の単位で記述</li>
  <li>ノーマルレベルとメタレベルの処理を切り分けることが可能である</li>
</ul>

<div style="text-align: center;">
  <img src="../paper/figs/dgcgdg.svg" width="1000" />
</div>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsos">GearsOS</h2>

<ul>
  <li>信頼性と拡張性の両立を目的として開発されている</li>
  <li>Gearという概念があり,実行の単位をCodeGear,データの単位をDataGearと呼ぶ</li>
  <li>軽量継続を基本とし,stackを持たない代わりに全てをContext経由で実行する</li>
  <li>ノーマルレベルとメタレベルの処理を切り分けることができる</li>
  <li>同様にGearの概念を持つCbC(Continuation based C)で記述されている.</li>
  <li>OSとして動作するために今後実装しなければならない機能がいくつか残っている.</li>
</ul>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsos-1">GearsOS</h2>

<h3 id="codegearとmetacodegearの関係">CodeGearとmetaCodeGearの関係</h3>

<div style="text-align: center;">
  <img src="../paper/figs/meta_cg_dg.svg" width="1200" />
</div>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsos-2">GearsOS</h2>

<h3 id="contextを参照する流れ">Contextを参照する流れ</h3>

<div style="text-align: center;">
  <img src="../paper/figs/context.svg" width="1200" />
</div>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="unixのfile-system">UnixのFile system</h2>

<h3 id="xv6">xv6</h3>

<ul>
  <li>MITで教育用の目的で開発されたOS</li>
  <li>Unixの基本的な構造を持つ</li>
  <li>当研究室ではxv6のCbCでの書き換え,分析を行なっている</li>
  <li>File systemではinodeの仕組みが用いられている</li>
</ul>

<h3 id="inode">inode</h3>

<ul>
  <li>ファイルの属性情報が書かれたデータである</li>
  <li>識別番号としてinode numberを持つ</li>
  <li>inodeはファイルシステム始動時にinode領域をディスク上に確保する</li>
</ul>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsfilesystemにおけるdirectoryの構成">GearsFileSystemにおけるdirectoryの構成</h2>

<div style="text-align: center;">
  <img src="../paper/figs/inode.svg" width="1000" />
</div>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="unix-like-な-interface">Unix Like な interface</h2>

<h3 id="mkdir">mkdir</h3>

<pre><code class="language-c">__code mkdir(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
    struct FTree* newDirectory = createFileSystemTree(context, gearsDirectory-&gt;currentDirectory);
    Node* inode = new Node();
    inode-&gt;key = gearsDirectory-&gt;INodeNumber;
    inode-&gt;value = newDirectory;
    struct FTree* cDirectory = new FTree();
    cDirectory = gearsDirectory-&gt;iNodeTree;
    goto cDirectory-&gt;put(inode, mkdir2);
}

__code mkdir2(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
    Node* dir = new Node();
    dir-&gt;key = name-&gt;value;
    Integer* iNum = new Integer();
    iNum-&gt;value = gearsDirectory-&gt;INodeNumber;
    dir-&gt;value = iNum;
    gearsDirectory-&gt;INodeNumber = gearsDirectory-&gt;INodeNumber + 1;
    struct FTree* cDirectory = new FTree();
    cDirectory = gearsDirectory-&gt;currentDirectory;
    goto cDirectory-&gt;put(dir, next(...));
}
</code></pre>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="unix-like-な-interface-1">Unix Like な interface</h2>

<h3 id="ls">ls</h3>

<pre><code class="language-c">__code ls(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
    Node* dir = new Node();
    dir-&gt;key = name-&gt;value;
    struct FTree* cDirectory = new FTree();
    cDirectory = gearsDirectory-&gt;currentDirectory;
    goto cDirectory-&gt;get(dir, ls2);
}

__code ls2(struct GearsDirectoryImpl* gearsDirectory, struct Node* node, __code next(...)) {
    printf("%d\n", node-&gt;key);
    goto next(...);
}
</code></pre>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="unix-like-な-interface-2">Unix Like な interface</h2>

<h3 id="cd">cd</h3>

<pre><code class="language-c">__code cd2Child(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
    struct FTree* cDirectory = new FTree();
    cDirectory = gearsDirectory-&gt;currentDirectory;
    struct Node* node = new Node();
    node-&gt;key = name-&gt;value;
    goto cDirectory-&gt;get(node, cd2Child2);
}

__code cd2Child2(struct GearsDirectoryImpl* gearsDirectory, struct Node* node, __code next(...)) {
    struct FTree* iNodeTree = new FTree();
    iNodeTree = gearsDirectory-&gt;iNodeTree;
    goto iNodeTree-&gt;get(node-&gt;value, cd2Child3);
}

__code cd2Child3(struct GearsDirectoryImpl* gearsDirectory, struct Node* node, __code next(...)) {
    gearsDirectory-&gt;currentDirectory = node-&gt;value;
    goto next(...);
}
</code></pre>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsdirectoryの非破壊的編集によるバックアップ">GearsDirectoryの非破壊的編集によるバックアップ</h2>

<ul>
  <li>GearsOSにおける永続データは非破壊的な編集を行う木構造を用いて保存する</li>
  <li>ディレクトリシステム自体にバックアップの機能を搭載することが可能と考える</li>
</ul>

<div style="text-align: center;">
  <img src="../paper/figs/nondestructive_tree_modification.png" width="1200" />
</div>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsfilesystemの今後">GearsFileSystemの今後</h2>

<h3 id="gearsshell">GearsShell</h3>

<ul>
  <li>現状のGearsOSはユーザーの入力を受け付けることが出来ず,プログラミングインターフェースの様に機能している.</li>
  <li>gearsFileSystemなどGearsOSの各機能と接続し,今回作成したcdやlsの様なコマンドを受け付けるGearsShellを作成したい.</li>
</ul>

<h3 id="gearsdirectory-filename">gearsDirectory filename</h3>

<ul>
  <li>現状はgearsDirectoryのfilenameはIntegerの構造で管理されている</li>
  <li>filenameは一般的に文字列型であるためIntegerから文字列型に変更する必要がある</li>
</ul>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="gearsfilesystemの今後-1">GearsFileSystemの今後</h2>

<h3 id="gearsdirectory-path">gearsDirectory path</h3>

<ul>
  <li>gearsDirectoryにはpathの機能が実装されていない</li>
  <li>full path指定のlsなどが実装できない状態である</li>
  <li>FileSystemTreeを拡張し,ノードをたどりpathを生成する様な機能を実装する必要がある</li>
</ul>

<h3 id="ファイルのバックアップ">ファイルのバックアップ</h3>

<ul>
  <li>レコードのDataをファイルの差分履歴として保持し,日時情報を付け加えることでVersion Control Systemのような機能を持たせることが可能であると考えられる</li>
</ul>



</div>

<div class='slide'>
  <!-- _S9SLIDE_ -->
<h2 id="まとめ">まとめ</h2>

<ul>
  <li>gearsDirectoryの実装について説明した</li>
  <li>RedBlackTreeのシンプルなinterfaceにより比較的容易に実装を行うことができた</li>
  <li>形式手法とファイルシステムの機能の両面で信頼性の向上が図れると考える</li>
  <li>RedBlackTreeを用いてinodeの仕組みを構築し,ls,cd,mkdirを作成するなどして,
Unix Likeに構築することが出来た.</li>
</ul>

</div>


</div><!-- presentation -->
</body>
</html>