annotate marp-slide/slide.md @ 74:8c087f2ae631

...
author matac42 <matac@cr.ie.u-ryukyu.ac.jp>
date Wed, 14 Feb 2024 09:44:07 +0900
parents c4b013299ff6
children c6d41c973c8a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 marp: true
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 theme: cr
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 paginate: true
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 <!-- 全体の流れ
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 - 目的
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 - 基礎概念
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 - 問題提起 -> 解決 の繰り返し
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 - 評価 -->
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 # GearsOSのファイルシステムにおける GCとレプリケーション
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 <!--
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 スピーカーノート
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 -->
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
19 琉球大学 理工学研究科 工学専攻 知能情報プログラム
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 河野研究室
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 又吉 雄斗
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 <!-- 目的 -->
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 ## システム全体の信頼性を上げたい
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 - システムの構成要素全体の信頼性を上げる必要がある
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 - アプリケーション
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 - OS
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 - ファイルシステム
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 - DB
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 - メモリとSSD
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 - 分散ノード
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 - ネットワーク
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 ## Gears OSを使って実現する
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 - CodeGear
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 - 処理の単位
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 - DataGear
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 - データの単位
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 - metaGear
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 - データの整合性
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 - 資源管理
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 ## 信頼性を上げる方法
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 - 証明
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 - GearsAgdaを使ってinvariantを証明する
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 - テスト
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 - モデル検査
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 - システムの構成要素全体にこれらの方法を適用したい
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 - 既存システムの信頼性における問題点の解決
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 <!-- ここからGears OSの基礎概念だと明示する -->
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 ## Continuation based C
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 - Cの下位言語である
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 - 処理の単位 CodeGear
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 - データの単位 DataGear
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 - ノーマルレベルとメタレベルの切り分け
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 - gotoによる軽量継続
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 ## CodeGearとmetaCodeGearの関係
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 - ノーマルレベルとメタレベルの存在
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 ![w:1100](figs/meta_cg_dg.svg)
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 ## Context
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 - Gears OS上全てのCodeGear,DataGearの参照を持つ
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 - OS上の処理の実行単位
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 - プロセスに相当
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 - Gearの概念ではmetaDataGearに当たる
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 - ノーマルレベルから直接参照されない
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 - metaCodeGearから参照される
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
94
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 ## 3種類のGears OS
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
96
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 - GearsAgda(Agda)
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 - 形式手法による信頼性の向上
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
99 - CbC x.v6
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
100 - スタンドアロンOS
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
101 - Gears OS(CbC) ← 今回の実装対象
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 - ユーザーレベルタスクマネージメント
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
106 ## GearsAgdaとGearsOSの対応
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
107
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
108 - GearsOSのCodeGearと直接対応している
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
109 - GearsAgdaでRedBlackTreeの証明が進められている
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
110 - find完了、insert証明中
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
111 - GearsOSの構造はRedBlackTreeが多くを占める
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
112
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
113 GearsAgdaでRedBlackTreeが証明できれば、GearsOSのファイルシステムの大部分を証明したことになる
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 ## CodeGear遷移の流れ
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 ![w:1100](figs/context.svg)
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
123 ## 非破壊RedBlackTree
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
124
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
125 ![w:1100](figs/nondestructive_tree_modification.png)
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
126
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
127 ---
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
128
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
129 <!-- ここまでがGears OSの基礎概念だと明示する -->
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
130
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
131 ## GearsFilesystem
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
132
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
133 - GearsOSで書かれたファイルシステム
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
134 - i-nodeによるディレクトリシステム
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
135 - 分散ファイルシステムの通信機能
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
136 - 非破壊RedBlackTreeで構成される
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
137 - ディスク上とメモリ上のデータ構造を統一する
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
141 ## ファイルシステムの信頼性
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
142
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
143 - 電源断時にデータが残るpersistency
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
144 - データを書き込めたかどうかを判定するatomic write
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
145 - ノード喪失時にデータを保護する多重性
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
146 - 複数のコピーを調停するコミット機構
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
147
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
148 ---
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
149
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
150 ## メモリ管理や多重性の機能がない
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
151
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
152 <!-- それぞれが何のためにあるのか説明する感じでやると良い -->
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
153
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
154 メモリ管理
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
155
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
156 - アロケーション
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
157 - GC(ガベージコレクション)
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
158
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
159 多重性
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
160
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
161 - レプリケーション
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
162 - バックアップ
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
167 ## メモリ管理や多重性の機能の要件
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
168
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
169 <!-- 照明のしやすさの維持が唐突な感じ
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
170 動作の正しさがわかりやすい実装で証明しやすく -->
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
171
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
172 - 信頼性を上げたい
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
173 - 証明のしやすい実装
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
174 - データの持続性
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
175 - 持続性のあるストレージにちゃんとコピーする
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
176 - 適切なタイミングでコピーを行う
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
177 - 非破壊RedBlackTreeのメモリ管理
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
178 - 非破壊RedBlackTreeは履歴を全て持つ
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
179 - 過去の履歴分のメモリを解放する必要がある
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
180
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
181 ---
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
182
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
183 ## GearsOSにおけるGC
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
184 <!-- -->
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
185 CopyingGCを採用する
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
186 - 新しいContextのメモリに新規にコピーする
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
187 - 古いContextをそのまま全部解放する
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
188
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
189 ---
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
190
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
191 ## GearsOSにおけるレプリケーション
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
192
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
193 <!-- -->
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
194
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
195 単純に木をコピーする
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
196 複数のストレージに同時に木を置く
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
197 そのうちの一部は持続的なストレージにする
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
198 システム起動時には必要な分をメモリにコピーする
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
199
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
200 トランザクションも考慮する
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
201
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
202 ---
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
203
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
204 ## RedBlackTreeのトランザクション
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
205
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
206 - 木のルートのすげ替えがトランザクションになる
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
207 - read
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
208 - write
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 ## copyRedBlackTreeの実装をした
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
214 - RedBlackTreeのコピーを行う
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
215 - GCやレプリケーションの機能のために木のコピーが必要
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
216
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
219 ## copyRedBlackTreeによって出来ること
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 多重性やメモリ管理に関する機能を追加できる
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 GC(defragmentation)
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 レプリケーション
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 バックアップ
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 ## Tree InterfaceのAPIとして実装
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
232 ## コピーのアルゴリズム詳細
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
233
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
234 ![w:1100](figs/)
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 ## アロケーション部分
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
240 ![w:1100](figs/)
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
241
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 ## swap
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
246 ![w:1100](figs/)
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
247
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
248 ---
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
249
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
250 ## 実行方法
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
251
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 ## 評価
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 非破壊RedBlackTreeの増大抑制できる
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257 コピーするだけなので木が持続的
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 課題点
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 同一Contextへコピーしている
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
260 コピーの正しさ
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
261 Stack使っているので余計なメモリを消費する
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
262 Stackも非破壊であるという問題がある
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
263 -> 証明しやすさを優先しているから
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
264 Stackが非破壊である意味があまりない?のでここを破壊でやる。
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 ## 今後の研究方針
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
270 別Contextコピー
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
271 GearsAgdaでの記述
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
272 Stack領域の圧縮
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
273 - Stackの再利用?
73
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
274 GC,レプリケーションの実装
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
275 多重性以外の機能
c4b013299ff6 outline(slide & poster)
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 72
diff changeset
276
72
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 ---
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 ## まとめ
b2a541a2c178 create slide & poster
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280
74
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
281 - copyRedBlackTreeを実装した
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
282 - それにより多重性を確保できるようになった
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
283 - 多重性はシステムの信頼性を向上させる
matac42 <matac@cr.ie.u-ryukyu.ac.jp>
parents: 73
diff changeset
284 - 非破壊RedBlackTreeの増大抑制により実用的なシステム構築が可能になった