forked from lurkingryuu/KOSS_teaching
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
225 lines (207 loc) · 6.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!doctype html>
<html>
<!--> hfksh <!-->
<!--> hfksh <!-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Memory Management</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css">
<link rel="stylesheet" href="plugin/highlight/vs2015.min.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- Memory Management -->
<section>
<h1>Memory Management</h1>
</section>
<!-- Garbage Collection -->
<section>
<!-- Intro -->
<section data-auto-animate>
<h2>Garbage Collection</h2>
</section>
<section data-auto-animate>
<h2>Garbage Collection</h2>
<p>It is a form of Automatic Memory Mangement, which reclaims memory which is no longer referenced</p>
</section>
<!-- Pros of GC -->
<section data-auto-animate>
<h3>Pros:</h3>
</section>
<section data-auto-animate>
<h3>Pros:</h3>
<ul>
<li>No need to Manually deallocate memory</li>
</ul>
</section>
<!-- Cons of GC -->
<section data-auto-animate>
<h3>Cons:</h3>
</section>
<section data-auto-animate>
<h3>Cons:</h3>
<ul>
<li>Additional Computational time and resources, hence, is overhead</li>
</ul>
</section>
<section data-auto-animate>
<h3>Cons:</h3>
<ul>
<li>Additional Computational time and resources and is overhead</li>
<li>Less control in hands of programmers sometimes</li>
</ul>
</section>
<section data-auto-animate>
<h3>Cons:</h3>
<ul>
<li>Additional Computational time and resources and is overhead</li>
<li>Less control in hands of programmers sometimes</li>
<li>Momentary lags and hangs of the application</li>
</ul>
</section>
</section>
<!-- Garbage Collection Strategies Intro -->
<section>
<section data-auto-animate>
<h2>Garbage Collection Strategies</h2>
</section>
</section>
<!-- Mark and sweep algorithm -->
<section>
<!-- Intro -->
<section data-auto-animate>
<h3>Mark-sweep Algorithm</h3>
</section>
<section data-auto-animate>
<h3>Mark-sweep</h3>
<p>It is one of the Garbage collection techniques used in laguages such as Java and Javascript</p>
</section>
<!-- Algorithm -->
<section data-auto-animate>
<h4>Algorithm:</h4>
</section>
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is initialized, it's in an unmarked state</li>
</ol>
</section>
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is initialized, it's in an unmarked state</li>
<li>In Marking Phase, we mark all of the objects which are reachable</li>
</ol>
</section>
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is initialized, it's in an unmarked state</li>
<li>In Marking Phase, we mark all of the objects which are reachable</li>
<li>We parse through all objects, if an object is marked, we unmark it, else we free the memory used by that object</li>
</ol>
</section>
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is initialized, it's in an unmarked state</li>
<li>In Marking Phase, we mark all of the objects which are reachable</li>
<li>We parse through all objects, if an object is marked, we unmark it, else we free the memory used by that object</li>
<li>We Repeat this process of marking and sweeping</li>
</ol>
</section>
</section>
<!-- Reference counting -->
<section>
<!-- Intro -->
<section data-auto-animate>
<h3>Reference counting</h3>
</section>
<section data-auto-animate>
<h3>Reference counting</h3>
It is used in Python
</section>
<!-- Algorithm -->
<section data-auto-animate>
<h4>Algorithm:</h4>
</section>
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is created and stored in a variable, it is assigned a value of 1</li>
</ol>
</section>
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is created and stored in a variable, it is assigned a value of 1</li>
<li>The value denotes the number of direct references to an object</li>
</ol>
</section >
<section data-auto-animate>
<h4>Algorithm:</h4>
<ol>
<li>When an object is created and stored in a variable, it is given a value of 1</li>
<li>The value denotes the number of direct references to an objec.</li>
<li>If an objects value reaches 0, it is called a dead object and the space used by that object is reclaimed</li>
</ol>
</section>
</section>
<!-- Ownership model in Rust -->
<section>
<!-- Intro -->
<section data-auto-animate>
<h1>Ownership model</h1>
</section>
<section data-auto-animate>
<h1>Ownership model</h1>
<p>Memory management can be done in ways other than Garbage collection or Manual memory management, like the Ownership model used in Rust</p>
</section>
<section data-auto-animate>
<p>In this Model, there are some rules to be followed while programming, if not followed, will give compile time errors.</p>
</section>
<!-- Rules -->
<section data-auto-animate>
<h3>Ownership Rules</h3>
</section>
<section data-auto-animate>
<h3>Ownership Rules</h3>
<ul>
<li>Each value in Rust has a variable That's called it's owner</li>
</ul>
</section>
<section data-auto-animate>
<h3>Ownership Rules</h3>
<ul>
<li>Each value in Rust has a variable That's called it's owner</li>
<li>There can only be one owner at a time</li>
</ul>
</section>
<section data-auto-animate>
<h3>Ownership Rules</h3>
<ul>
<li>Each value in Rust has a variable That's called it's owner</li>
<li>There can only be one owner at a time</li>
<li>When the owner goes out of scope the value will be dropped</li>
</ul>
</section>
</section>
</div>
</div>
<script src="dist/reveal.js"></script>
<script src="plugin/notes/notes.js"></script>
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script>
Reveal.initialize({
controls: false,
hash: true,
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
});
</script>
</body>
</html>