-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.php
323 lines (249 loc) · 15.1 KB
/
blog.php
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<!--[if IE 8 ]><html class="no-js oldie ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]><html class="no-js oldie ie9" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html class="no-js" lang="en"> <!--<![endif]-->
<head>
<!--- basic page needs
================================================== -->
<meta charset="utf-8">
<title>IEEE VJTI</title>
<meta name="description" content="IEEE VJTI website">
<meta name="author" content="rsrade">
<!-- mobile specific metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS
================================================== -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/vendor.css">
<link rel="stylesheet" href="css/blog.css">
<link rel="stylesheet" href="css/main_v1.css">
<!-- script
================================================== -->
<script src="js/modernizr.js"></script>
<script src="js/pace.min.js"></script>
<script type="text/javascript" src="js/jquery-2.1.3.min.js"></script>
<!-- favicons
================================================== -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body id="top">
<!-- header
================================================== -->
<header>
<div class="header-logo">
<!-- <a href="index.html">IEEE VJTI</a>-->
<img class="img-rounded" src="images/logo_v3.png">
</div>
<a id="header-menu-trigger" href="#0">
<span class="header-menu-text">Menu</span>
<span class="header-menu-icon"></span>
</a>
<nav id="menu-nav-wrap">
<a href="#0" class="close-button" title="close"><span>Close</span></a>
<h3>IEEE VJTI</h3>
<ul class="nav-list">
<li><a href="index.html" title="Home">Home</a></li>
<li><a href="membership.html" title="Membership">Membership Benefits</a></li>
<li class="current"><a href="" title="Blogs">Blogs</a></li>
<li><a href="event.html" title="Events">Events</a></li>
<li><a href="library.html" title="Library">Library</a></li>
<li><a href="project.html" title="R & D">R & D</a></li>
<li><a href="team.html" title="Team">Our Team</a></li>
<li><a href="contact.html" title="Contact">Contact Us</a></li>
</ul>
<ul class="header-social-list">
<li>
<a href="https://www.facebook.com/IEEEVJTI/" title="IEEE VJTI Facebook"><i class="fa fa-facebook-square"></i></a>
</li>
<!-- <li>
<a href="#"><i class="fa fa-twitter"></i></a>
</li>
<li>
<a href="#"><i class="fa fa-instagram"></i></a>
</li> -->
<li>
<a href="https://www.youtube.com/channel/UCXkEZSsh_RWiBfrJIPY27vg/featured?view_as=subscriber" title="IEEE VJTI YouTube"><i class="fa fa-youtube"></i></a>
</li>
</ul>
</nav> <!-- end #menu-nav-wrap -->
</header> <!-- end header -->
<!-- home
================================================== -->
<section id="home">
<div class="overlay"></div>
<div class="home-content-table">
<div class="home-content-tablecell">
<div class="row">
<div class="col-twelve">
<h1 class="animate-intro">
IEEE VJTI
</h1>
<h3 class="animate-intro">Come Lets Invent & Discover Together.</h3>
<div class="more animate-intro">
<a class="button stroke" href="https://goo.gl/forms/K0WUKuQal9eUFeSS2" title="Subscribe">
Subscribe
</a>
</div>
</div> <!-- end col-twelve -->
</div> <!-- end row -->
</div> <!-- end home-content-tablecell -->
</div> <!-- end home-content-table -->
<ul class="home-social-list">
<li class="animate-intro">
<a href="https://www.facebook.com/IEEEVJTI/" title="IEEE VJTI Facebook"><i class="fa fa-facebook-square"></i></a>
</li>
<!-- <li class="animate-intro">
<a href="#"><i class="fa fa-twitter"></i></a>
</li>
<li class="animate-intro">
<a href="#"><i class="fa fa-instagram"></i></a>
</li> -->
<li class="animate-intro">
<a href="https://www.youtube.com/channel/UCXkEZSsh_RWiBfrJIPY27vg/featured?view_as=subscriber" title="IEEE VJTI YouTube"><i class="fa fa-youtube"></i></a>
</li>
</ul> <!-- end home-social-list -->
<div class="scrolldown">
<a href="#blog" class="scroll-icon smoothscroll">
Scroll Down
<i class="fa fa-long-arrow-right" aria-hidden="true"></i>
</a>
</div>
</section> <!-- end home -->
<!-- about
================================================== -->
<section id="blog">
<div class="row about-wrap with-bottom-sep">
<div class="col-full">
<div class="about-profile-bg"></div>
<div class="intro-head">
<h3 class="animate-this" id="section-title">BLOGS</h3>
<div class="section-title-divider1"></div>
</div>
</div> <!-- end col-full -->
</div> <!-- end about-wrap -->
</section>
<section id="content">
<div class="rows about-wrap">
<div class="col-full blogContent">
<div class="about-profile-bg"></div>
<div class="intro">
<!-- <a href="blogFull.php?id=<?php echo $res['id'] ?>"> -->
<h4 class="animate-this" id="section-title">ALL ABOUT CACHE MEMORY</h4>
<!-- </a> -->
<p class="details animate-this">Author: Soham Deshmukh<br> Published on 6 October 2017
</p>
<p class="para animate-this">
Clear the ‘Cache Memory’ to make your device faster, isn’t that a phrase a lot of us have heard repeatedly. Sometimes it does make the device work faster while sometime it doesn’t. Let’s go deep into what this Cache memory is, the necessity of it and how its helping you every day.
</p>
<p class="para animate-this">
In basic terms- Cache memory is a high speed memory available inside CPU in order to speed up access to data and instructions stored in RAM.
Whenever you open any program on Windows (Mac users don’t get offended :P), the program which is usually stored in your computer hard disk is loaded into the RAM, from where the CPU loads the program through ‘memory controller’ (memory controller is usually located inside the chipset on Intel processors or inside the CPU in AMD processors. These are the general steps the computer takes to open an application.
</p>
<p class="para animate-this">
So a natural question would be, why not directly fetch the data from the Hard Drive itself?
If you are thinking along the above lines, then you are absolutely right theoretically. But what you didn’t consider was the speed at which you can read and write to the memory. The HDD memory available in market has speed of 50-120 MB/s, while if are ready to shell out tremendous money in high speed SSD it still will give you a speed about 550MB/s. While a CPU running at 2+ GHz can easily transfer data internally at 16GB/s. That’s why we use RAM’s.
</p>
<p class="para animate-this">
Still RAM’s are not as fast as the CPU, leading for the CPU to enter wait states. This prevents the CPU from working at its full capacity and reduces the performance of the CPU (Burst mode solves this problem if your instructions are stored sequentially).
</p>
<p class="para animate-this">
Hope you are following on and not bored because we need to take a quick trip to DRAM and SRAM before we can proceed. <br>
</p>
<p class="para animate-this">
There are two types of RAM: DRAM and SRAM. To tell you in short DRAM uses capacitor as its primary unit while SRAM uses Flip-flops as their primary units. The capacitors lose their charge after sometime hence needs to be refreshed while there is no such necessity for flip-flops. As you have guessed by now SRAMs are much faster than DRAMs and can work at a comparable speed of CPU. But the advantages of SRAM come with a curse of high power consumption and of course high cost.
</p>
<p class="para animate-this">
So back to topic, what our engineering community did to lower the impact of using RAM memory that is slower than the CPU was using a small amount of static RAM between CPU and RAM memory. This technique is called memory cache and nowadays this small memory is located inside the CPU.
</p>
<p class="para animate-this">
The memory cache copies most recently accessed data from the RAM memory to the static memory and tries to guess what data the CPU will ask next, loading them to the static memory before the CPU actually ask for it. The goal is to make the CPU to access the memory cache instead of accessing directly the RAM memory, since it can retrieve data from the memory cache immediately or almost immediately, while it has to wait when accessing data located on RAM. The more the CPU accesses the memory cache instead of the RAM, the fastest the system will be.
</p>
<p class="para animate-this">
The steps of how the entire process takes place is as follows: -
<ol class="para animate-this">
<li class="animate-this">The CPU asks for instruction/data stored in address “a.”</li>
<li class="animate-this">Since the contents from address “a” aren’t inside the memory cache, the CPU has to fetch it directly from RAM.</li>
<li class="animate-this">The cache controller loads a line (typically 64 bytes) starting at address “a” into the memory cache. This is more data than the CPU requested, so if the program continues to run sequentially (i.e., asks for address a+1) the next instruction/data the CPU will ask will be already loaded in the memory cache.</li>
<li class="animate-this">. A circuit called prefetcher loads more data located after this line, i.e., starts loading the contents from address a+64 on into the cache.</li>
</ol>
</p>
<p class="para animate-this">
However, programs do not run like this, from time to time they jump from one memory position to another. The main challenge of the cache controller is trying to guess what address the CPU will jump, loading the content of this address into the memory cache before the CPU asks for it in order to avoid the CPU having to go to the RAM memory, what slows the system down. This task is called branch predicting and all modern CPUs have this feature.
</p>
<p class="para animate-this">
Modern CPUs have a hit rate of at least 80%, meaning that at least 80% of the time the CPU isn’t accessing the RAM memory directly, but the memory cache instead.
</p>
<p class="para animate-this">
Generally, there are two Cache memories the L1 and L2 cache which I wouldn’t go into as you already seem to be yawning (google them up if you are curious).
</p>
<p class="para animate-this">
Hope this article was able to shed some light on what Cache memory is, its purpose of existence and its working.
</p>
<p class="para-end animate-this">
Peace!
</p>
</div>
</div> <!-- end col-full -->
</div> <!-- end about-wrap -->
</section> <!-- end about -->
<!-- footer
================================================== -->
<footer>
<div class="footer-main">
<div class="row">
<div class="col-five tab-full footer-about">
<h4 class="h05">IEEE VJTI</h4>
<p>A committee of enthusiastic electrical and electronics engineering students under the world's largest technical professional organization for advancement of technology, Institute of Electrical and Electronics Engineers (IEEE).</p>
</div> <!-- end footer-about -->
<div class="col-three tab-full footer-social">
<h4 class="h05">Follow Us.</h4>
<ul class="list-links">
<li><a href="https://www.facebook.com/IEEEVJTI/">Facebook</a></li>
<!-- <li><a href="#">Twitter</a></li>
<li><a href="#">Instagram</a></li>
<li><a href="#">Behance</a></li> -->
<li><a href="https://www.youtube.com/channel/UCXkEZSsh_RWiBfrJIPY27vg/featured?view_as=subscriber">YouTube</a></li>
</ul>
</div> <!-- end footer-social -->
<div class="col-four tab-full footer-subscribe end">
<h4 class="h05">Get Notified.</h4>
<p>Notifications about upcoming events, newsletters, seminars and workshops.</p>
<div class="subscribe-form">
<form id="mc-form" class="group" novalidate="true">
<!-- <input type="email" value="" name="dEmail" class="email" id="mc-email" placeholder="type email" required=""> -->
<a href="https://goo.gl/forms/K0WUKuQal9eUFeSS2" class="button email">SUBSCRIBE <!-- <i class="icon-mail"></i> --></a>
<label for="mc-email" class="subscribe-message"></label>
</form>
</div>
</div> <!-- end footer-subscribe -->
</div> <!-- end row -->
</div> <!-- end footer-main -->
<div class="footer-bottom">
<div class="row">
<div class="col-twelve">
<div class="copyright">
<span>© Copyright IEEE VJTI 2017.</span><br>
</div>
<span>Designed by rsrade</span>
</div>
</div>
</div> <!-- end footer-bottom -->
<div id="go-top">
<a class="smoothscroll" title="Back to Top" href="#top">
<i class="fa fa-long-arrow-up" aria-hidden="true"></i>
</a>
</div>
</footer>
<div id="preloader">
<div id="loader"></div>
</div>
<!-- Java Script
================================================== -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
</html>