changeset 13:8ebb2cf0bce4

fix: memory management
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Fri, 06 May 2022 15:54:16 +0900
parents 7e0661e3f924
children 995537e30650
files Paper/paper.aux Paper/paper.log Paper/paper.pdf Paper/paper.synctex.gz Paper/paper.tex
diffstat 5 files changed, 70 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/Paper/paper.aux	Fri May 06 12:41:46 2022 +0900
+++ b/Paper/paper.aux	Fri May 06 15:54:16 2022 +0900
@@ -34,9 +34,10 @@
 \@writefile{toc}{\contentsline {subsection}{\numberline {5.1}{mkdir}}{4}{}\protected@file@percent }
 \newlabel{src:mkdir}{{3}{4}}
 \@writefile{lol}{\contentsline {lstlisting}{\numberline {3}mkdirのCodeGear}{4}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}{ls}}{4}{}\protected@file@percent }
+\citation{cfile}
 \@writefile{lof}{\contentsline {figure}{\numberline {6}{\ignorespaces mkdirの操作の流れ\relax }}{5}{}\protected@file@percent }
 \newlabel{fig:mkdir}{{6}{5}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}{ls}}{5}{}\protected@file@percent }
 \newlabel{src:ls}{{4}{5}}
 \@writefile{lol}{\contentsline {lstlisting}{\numberline {4}lsのCodeGear}{5}{}\protected@file@percent }
 \@writefile{lof}{\contentsline {figure}{\numberline {7}{\ignorespaces lsの操作の流れ\relax }}{5}{}\protected@file@percent }
@@ -44,27 +45,25 @@
 \@writefile{toc}{\contentsline {subsection}{\numberline {5.3}{cd}}{5}{}\protected@file@percent }
 \newlabel{src:cd}{{5}{5}}
 \@writefile{lol}{\contentsline {lstlisting}{\numberline {5}cdのCodeGear}{5}{}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces cdの操作の流れ\relax }}{5}{}\protected@file@percent }
-\newlabel{fig:cd}{{8}{5}}
-\citation{cfile}
 \citation{file}
+\@writefile{lof}{\contentsline {figure}{\numberline {8}{\ignorespaces cdの操作の流れ\relax }}{6}{}\protected@file@percent }
+\newlabel{fig:cd}{{8}{6}}
+\@writefile{toc}{\contentsline {section}{\numberline {6}\hskip 1zw{GearsFileSystemにおけるファイルの構成}}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {7}\hskip 1zw{GearsOSのメモリマネージメントシステムの考察}}{6}{}\protected@file@percent }
+\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces WordCount with CbC\relax }}{6}{}\protected@file@percent }
+\newlabel{fig:WCStates}{{9}{6}}
+\@writefile{toc}{\contentsline {section}{\numberline {8}\hskip 1zw{今後の課題}}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}{GearsShell}}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.2}{GearsDirectory filename}}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.3}{GearsDirectory path}}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.4}{ファイルのバックアップ}}{6}{}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.5}{GearsDirectory on disk}}{6}{}\protected@file@percent }
 \citation{*}
 \bibstyle{ipsjunsrt}
 \bibdata{matac-bib}
 \bibcite{modelcheck}{1}
 \bibcite{cbcllvm}{2}
 \bibcite{cbc}{3}
-\@writefile{toc}{\contentsline {section}{\numberline {6}\hskip 1zw{GearsFileSystemにおけるファイルの構成}}{6}{}\protected@file@percent }
-\@writefile{lof}{\contentsline {figure}{\numberline {9}{\ignorespaces WordCount with CbC\relax }}{6}{}\protected@file@percent }
-\newlabel{fig:WCStates}{{9}{6}}
-\@writefile{toc}{\contentsline {section}{\numberline {7}\hskip 1zw{今後の課題}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}{GearsShell}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}{GearsDirectory filename}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.3}{GearsDirectory path}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.4}{ファイルのバックアップ}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.5}{GearsDirectory on disk}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.6}{Memory Management}}{6}{}\protected@file@percent }
-\@writefile{toc}{\contentsline {section}{\numberline {8}\hskip 1zw{まとめ}}{6}{}\protected@file@percent }
 \bibcite{gears}{4}
 \bibcite{gearsos}{5}
 \bibcite{cr}{6}
@@ -74,5 +73,6 @@
 \bibcite{cfile}{10}
 \bibcite{file}{11}
 \bibcite{christie}{12}
+\@writefile{toc}{\contentsline {section}{\numberline {9}\hskip 1zw{まとめ}}{7}{}\protected@file@percent }
 \newlabel{ipsj@lastpage}{{}{7}}
 \gdef \@abspage@last{7}
--- a/Paper/paper.log	Fri May 06 12:41:46 2022 +0900
+++ b/Paper/paper.log	Fri May 06 15:54:16 2022 +0900
@@ -1,4 +1,4 @@
-This is e-pTeX, Version 3.141592653-p3.9.0-210218-2.6 (utf8.euc) (TeX Live 2021) (preloaded format=platex 2021.11.27)  6 MAY 2022 12:40
+This is e-pTeX, Version 3.141592653-p3.9.0-210218-2.6 (utf8.euc) (TeX Live 2021) (preloaded format=platex 2021.11.27)  6 MAY 2022 15:53
 entering extended mode
  restricted \write18 enabled.
  %&-line parsing enabled.
@@ -3145,32 +3145,32 @@
 LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <11.82813> not available
 (Font)              Font shape `JY1/gt/m/n' tried instead on input line 97.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 126.
-File: figs/cgdg.pdf Graphic file (type pdf)
-<figs/cgdg.pdf>
+(Font)              No change on input line 131.
  (I search kanjifont definition file: . . ) (I search font definition file: . . . . . . . )
-LaTeX Font Info:    Trying to load font information for OMS+txsy on input line 139.
+LaTeX Font Info:    Trying to load font information for OMS+txsy on input line 137.
  (/usr/local/texlive/2021/texmf-dist/tex/latex/txfonts/omstxsy.fd
 File: omstxsy.fd 2000/12/15 v3.1
 )
-LaTeX Font Info:    Trying to load font information for OT1+txsy on input line 139.
-LaTeX Font Info:    No file OT1txsy.fd. on input line 139.
+LaTeX Font Info:    Trying to load font information for OT1+txsy on input line 137.
+LaTeX Font Info:    No file OT1txsy.fd. on input line 137.
 
 
 LaTeX Font Warning: Font shape `OT1/txsy/m/n' undefined
-(Font)              using `OT1/cmr/m/n' instead on input line 139.
-
-LaTeX Font Info:    Trying to load font information for OT1+ptm on input line 139.
+(Font)              using `OT1/cmr/m/n' instead on input line 137.
+
+LaTeX Font Info:    Trying to load font information for OT1+ptm on input line 137.
 (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/ot1ptm.fd
 File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.
 ) [1
 
 
 ]
+File: figs/cgdg.pdf Graphic file (type pdf)
+<figs/cgdg.pdf>
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 153.
+(Font)              No change on input line 158.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 154.
+(Font)              No change on input line 159.
  (./src/hello.cbc)
 File: figs/context.pdf Graphic file (type pdf)
 <figs/context.pdf>
@@ -3178,67 +3178,66 @@
 <figs/meta-cg-dg.pdf>
  [2]
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 219.
+(Font)              No change on input line 224.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 222.
-LaTeX Font Info:    Calculating math sizes for size <8.8711> on input line 227.
- (./src/FTree.h)
+(Font)              No change on input line 227.
+LaTeX Font Info:    Calculating math sizes for size <8.8711> on input line 232.
+ (./src/FTree.h) [3]
 File: figs/inode.pdf Graphic file (type pdf)
 <figs/inode.pdf>
- [3]
 File: figs/nonDestroyTreeEdit.pdf Graphic file (type pdf)
 <figs/nonDestroyTreeEdit.pdf>
 
-Underfull \hbox (badness 4927) in paragraph at lines 304--304
+Underfull \hbox (badness 4927) in paragraph at lines 309--309
 []\OT1/cmr/bx/n/11.82813 GearsFileSystem \JY1/gt/m/n/11.82813 におけるインタ ー
  []
 
 LaTeX Font Info:    Font shape `JT1/mc/bx/n' in size <9.61035> not available
-(Font)              Font shape `JT1/gt/m/n' tried instead on input line 309.
+(Font)              Font shape `JT1/gt/m/n' tried instead on input line 314.
 LaTeX Font Info:    Font shape `JY1/mc/bx/n' in size <9.61035> not available
-(Font)              Font shape `JY1/gt/m/n' tried instead on input line 309.
+(Font)              Font shape `JY1/gt/m/n' tried instead on input line 314.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 313.
+(Font)              No change on input line 318.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 313.
+(Font)              No change on input line 318.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 315.
+(Font)              No change on input line 320.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 316.
+(Font)              No change on input line 321.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 316.
+(Font)              No change on input line 321.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 317.
+(Font)              No change on input line 322.
 (./src/mkdir.cbc)
 File: figs/mkdir.pdf Graphic file (type pdf)
 <figs/mkdir.pdf>
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 330.
+(Font)              No change on input line 335.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 332.
+(Font)              No change on input line 337.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 334.
+(Font)              No change on input line 339.
  [4] (./src/ls.cbc)
 File: figs/ls.pdf Graphic file (type pdf)
 <figs/ls.pdf>
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 352.
+(Font)              No change on input line 357.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 353.
+(Font)              No change on input line 358.
 LaTeX Font Info:    Kanji font shape `JY1/gt/m/it' undefined
-(Font)              No change on input line 355.
+(Font)              No change on input line 360.
  (./src/cd.cbc)
 File: figs/cd.pdf Graphic file (type pdf)
 <figs/cd.pdf>
  [5]
 File: figs/wordCountStates.pdf Graphic file (type pdf)
 <figs/wordCountStates.pdf>
- (./paper.bbl
+ [6] (./paper.bbl
 Underfull \hbox (badness 10000) in paragraph at lines 9--10
 []\JY1/mc/m/n/8.8711 並列信頼研究室 []\OT1/cmr/m/n/8.8711 CbC, http://www.cr.ie.u-
  []
 
-[6]
+
 Underfull \hbox (badness 10000) in paragraph at lines 19--20
 []\JY1/mc/m/n/8.8711 並列信頼研究室 []\OT1/cmr/m/n/8.8711 GearsOS, http://www.cr.ie.u-
  []
@@ -3263,10 +3262,10 @@
 Here is how much of TeX's memory you used:
  4999 strings out of 479466
  76928 string characters out of 5870547
- 760281 words of memory out of 5000000
+ 762281 words of memory out of 5000000
  22644 multiletter control sequences out of 15000+600000
  434850 words of font info for 166 fonts, out of 8000000 for 9000
  929 hyphenation exceptions out of 8191
- 68i,11n,74p,294b,1693s stack positions out of 5000i,500n,10000p,200000b,80000s
-
-Output written on paper.dvi (7 pages, 57248 bytes).
+ 68i,10n,74p,294b,1681s stack positions out of 5000i,500n,10000p,200000b,80000s
+
+Output written on paper.dvi (7 pages, 59856 bytes).
Binary file Paper/paper.pdf has changed
Binary file Paper/paper.synctex.gz has changed
--- a/Paper/paper.tex	Fri May 06 12:41:46 2022 +0900
+++ b/Paper/paper.tex	Fri May 06 15:54:16 2022 +0900
@@ -119,6 +119,11 @@
 GearsOSへUnixのファイルシステムの仕組みを取り入れるアプローチをとりたい.
 それはGearsOSとCbCで書き換えたxv6の比較や,互いにファイルシステムの機能の移植が行える様にするためである.
 
+GearsOSのファイルシステムを構築するにあたり,メモリマネージメントについて考察する.
+現在,GearsOSにはメモリマネージメントのシステムが存在しない.
+しかしながら,ファイルシステムを構築するにあたりメモリマネージメントが必要不可欠である.
+メモリ上のRedBlackTreeで構築されたデータ構造をそのままディスクにコピーする形で実装することを目指したい.
+
 \section{Continuation based C}
 
 Continuation based C(CbC)\cite{cbcllvm,cbc}は,当研究室で開発しているCの下位言語である.
@@ -393,6 +398,16 @@
   \label{fig:WCStates}
 \end{figure}
 
+\section{GearsOSのメモリマネージメントシステムの考察}
+
+GearsOSのメモリマネージメントは,メモリ上のデータとディスク上のデータの構造が等しくなる形で実装をしたい.
+メモリ上とディスク上でデータの構造を等しくすることで,単純なコピーでメモリとディスク間のデータのやり取りを行うことができる.よって,比較的簡素に実装を行うことができると予想する.
+しかしながら,メモリ上とディスク上でオフセットの差が出る問題がある.
+これは,メタ計算でオフセットの差を吸収する処理を行うことで解決させる.
+また,メモリ上とディスク上のデータのアドレスが異なるため,ユーザーレベルからポインタを用いた場合,問題になる.
+しかしながら,GearsOSではユーザーレベルでポインタを用いることを禁止しているため,問題ないと考える.
+
+
 \section{今後の課題}
 
 \subsection{GearsShell}
@@ -418,14 +433,14 @@
 現状はGearsDirectoryのinodeはon memoryで実装されている.
 データの保存はdisk上に行うため,inodeをdisk上に構築し必要がある
 
-\subsection{Memory Management}
-
 \section{まとめ}
 
 本研究では主としてGearsFileSystemの構築に必要なGearsDirectoryの実装について説明した.
-いくつか課題はあるが,RedBlackTreeのシンプルなinterfaceにより比較的容易に実装を行うことができた.
+いくつか課題はあるが,RedBlackTreeのシンプルなインターフェースにより比較的容易に実装を行うことができた.
 また,RedBlackTreeを用いてinodeの仕組みを構築し,ls,cd,mkdirを作成するなどして,
 Unix Likeに構築することが出来た.
+メモリマネージメントについては,今後の研究で実装と考察を行い,
+Gears OSのメモリマネージメントシステムを構築していく.
 
 信頼性については,定理証明やモデル検査を用いて保証を行うが,
 非破壊的なTree編集によるディレクトリのバックアップやファイルのバックアップをファイルシステムに組み込むことでも