changeset 12:f28541912af5

...
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Tue, 25 Jan 2022 12:42:14 +0900
parents 5f9d95ec1b54
children 8269301c8f2a
files paper/figs/inode.png paper/figs/inode.svg paper/src/cd.cbc paper/text/chapter2.tex paper/thesis.pdf
diffstat 5 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
Binary file paper/figs/inode.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/paper/figs/inode.svg	Tue Jan 25 12:42:14 2022 +0900
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Do not edit this file with editors other than diagrams.net -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="531px" height="361px" viewBox="-0.5 -0.5 531 361" content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2022-01-25T03:24:08.469Z&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36&quot; etag=&quot;mVexJA0tRwB2poCUgkaD&quot; version=&quot;16.4.5&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;AAaulOYO_kfhROZJ8ttr&quot; name=&quot;Page-1&quot;&gt;7Vptb+I4EP41fCyKEwjwsdDui0S11XWlu350iSHeOjFyzAL762+c2HkHsnsBcqhSpcaTsWM/84xnxqbnzILdZ4HX/hP3COvZlrfrOQ8920YWGsM/JdknEtdCiWAlqKeVMsEL/UVMTy3dUI9EBUXJOZN0XRQueBiShSzIsBB8W1Rbclb86hqvSEXwssCsKv2betJPpGN7lMm/ELryzZeRO0neBNgo65VEPvb4NidyHnvOTHAuk6dgNyNMgWdwSfp9OvA2nZggoWzSYfnj9et3vthK+XT/+dm5+z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9Rps7Av+/XB89ef9fDGFnKY/4VgWvRcDWP1R4GmeQvjYEScei+ZHG96UNHAiNM16oUiTEZTuEPUJqppHAIc51BG2Vt+FPqQs54CNPHNDYZAWpsiaIH+LPEEr+lxG1k7yN+U2WBqaoaGv18fl09cIdUN6BRRHn4YfIzmLwuCbqoyZ1q8tjv9z9sfQZbT65u6+opSsXQlzu7s8du14pvk4Ke/tXSAUtf5549zQf/6z07GpYG+uNjPWhmv7FN1LNfKjuP/wI=&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs><clipPath id="mx-clip-374-270-132-30-0"><rect x="374" y="270" width="132" height="30"/></clipPath><clipPath id="mx-clip-374-300-132-30-0"><rect x="374" y="300" width="132" height="30"/></clipPath><clipPath id="mx-clip-374-330-132-30-0"><rect x="374" y="330" width="132" height="30"/></clipPath></defs><g><rect x="90" y="20" width="160" height="180" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><ellipse cx="170" cy="60" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><ellipse cx="130" cy="140" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><path d="M 230 140 L 300 140 L 361.71 140.05" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 366.96 140.06 L 359.96 143.55 L 361.71 140.05 L 359.97 136.55 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><ellipse cx="210" cy="140" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><path d="M 130 120 L 170 80" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 170 80 L 210 120" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="370" y="0" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 15px; margin-left: 371px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">inode tree</div></div></div></foreignObject><text x="400" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">inode tree</text></switch></g><rect x="90" y="0" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 15px; margin-left: 91px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">index tree</div></div></div></foreignObject><text x="120" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">index tree</text></switch></g><ellipse cx="450" cy="60" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><ellipse cx="410" cy="140" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><ellipse cx="490" cy="140" rx="20" ry="20" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><path d="M 410 120 L 450 80" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 450 80 L 490 120" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><rect x="180" y="160" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 175px; margin-left: 181px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">key: 2<br />value: 0</div></div></div></foreignObject><text x="210" y="179" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">key: 2...</text></switch></g><path d="M 60 35 L 83.63 35" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 88.88 35 L 81.88 38.5 L 83.63 35 L 81.88 31.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="0" y="20" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 35px; margin-left: 1px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">get key: 2</div></div></div></foreignObject><text x="30" y="39" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">get key: 2</text></switch></g><rect x="370" y="20" width="160" height="180" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="280" y="120" width="60" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 135px; margin-left: 281px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">get key: 0</div></div></div></foreignObject><text x="310" y="139" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">get key: 0</text></switch></g><rect x="365" y="160" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 175px; margin-left: 366px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">key: 0<br />value: inode0</div></div></div></foreignObject><text x="410" y="179" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">key: 0...</text></switch></g><path d="M 370 270 L 370 240 L 510 240 L 510 270" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 370 270 L 370 360 L 510 360 L 510 270" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><path d="M 370 270 L 510 270" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/><g fill="rgb(0, 0, 0)" font-family="Helvetica" pointer-events="none" text-anchor="middle" font-size="12px"><text x="439.5" y="259.5">inode0</text></g><g fill="rgb(0, 0, 0)" font-family="Helvetica" pointer-events="none" clip-path="url(#mx-clip-374-270-132-30-0)" font-size="12px"><text x="375.5" y="289.5">File Type</text></g><g fill="rgb(0, 0, 0)" font-family="Helvetica" pointer-events="none" clip-path="url(#mx-clip-374-300-132-30-0)" font-size="12px"><text x="375.5" y="319.5">Permission</text></g><g fill="rgb(0, 0, 0)" font-family="Helvetica" pointer-events="none" clip-path="url(#mx-clip-374-330-132-30-0)" font-size="12px"><text x="375.5" y="349.5">...</text></g><path d="M 410 190 L 410.04 249.96" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="none"/></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>
\ No newline at end of file
--- a/paper/src/cd.cbc	Tue Jan 25 04:05:40 2022 +0900
+++ b/paper/src/cd.cbc	Tue Jan 25 12:42:14 2022 +0900
@@ -1,4 +1,3 @@
-// 仮
 __code cd2Child(struct GearsDirectoryImpl* gearsDirectory, struct Integer* name, __code next(...)) {
     struct FTree* cDirectory = new FTree();
     cDirectory = gearsDirectory->currentDirectory;
--- a/paper/text/chapter2.tex	Tue Jan 25 04:05:40 2022 +0900
+++ b/paper/text/chapter2.tex	Tue Jan 25 12:42:14 2022 +0900
@@ -181,16 +181,24 @@
 gearsOSにおけるinterfaceはCodeGearと各CodeGearが用いるI/O DataGearの集合を記述する.
 FileSystemTreeのinterfaceはfTreeとnodeのDataGearとput,get,remove,nextのCodeGearを持つ.
 FileSystemTreeの実体はRedBlackTreeであり,put,get,removeはRedBlackTreeの操作を行うためのCodeGearである.
-nextは遷移先のCodeGear
+nextは遷移先のCodeGearを参照するために用いる.
 \lstinputlisting[caption=FTreeのinterface,label=src:ftree]{src/FTree.h}
 
-
 \section{Treeによるdirectory構造}
 ディレクトリ構造は2つのRedBlackTreeで実装する.
 1つ目はinode numberとfileのポインタのペアを持つ木である.
-inode numberをkey,file pointerをvalueとして持つためinode numberからfile pointerを検索するために用いる.
+inode numberをkey,inodeをvalueとして持つためinode numberからinodeを検索するために用いる.
 2つ目はfilenameとinode numberのペアを持つ木である.
 filenameをkey, inode numberをvalueとして持つため,filenameからinode numberを検索するために用いる.
+これはinodeをfilenameで検索するためのindex treeであるといえる.
+図\ref{fig:inode}はindex treeを用いたinodeの検索の流れを表す.
+\begin{figure}[h]
+  \begin{center}
+      \includegraphics[width=120mm]{figs/inode.png}
+  \end{center}
+  \caption{index treeを用いたinodeの検索の流れ}
+  \label{fig:inode}
+\end{figure}
 
 \section{Unix Like な interface}
 ファイルやディレクトリの操作を行うinterfaceをUnix Likeに実装を行った.
Binary file paper/thesis.pdf has changed