-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecond_chance.html
81 lines (67 loc) · 3.74 KB
/
second_chance.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Second Chance</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css2?family=Baloo+Bhai+2&family=Bree+Serif&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/aboutus.css">
<link rel="stylesheet" href="css/homepage.css">
<link rel="stylesheet" href="css/common2.css">
</head>
<body>
<header>
<nav>
<div class="logo">
<img src="img/website_logo1.png" alt="">
</div>
<input type="checkbox" id="check">
<label for="check" class="checkbtn">
<i class="fas fa-bars"></i>
</label>
<ul>
<li><a class="active" href="index.html">HOME</a></li>
<li><a href="#" class="main-dropdown" id="drop-down" onclick="toggle()">ALGORITHMS <img src="img/dropdown.jpeg" alt="" class="downside"></a> </li>
<ul class="dropdown" aria-labelledby="navbarDropdown" id="dropdowntoggle">
<li><a class="dropdown-item" href="fifo.html">First In First Out</a></li>
<li><a class="dropdown-item" href="lru.html">Least Recently Used</a></li>
<li><a class="dropdown-item" href="mru.html">Most Recently Used</a></li>
<li><a class="dropdown-item" href="second_chance.html">Second Chance</a></li>
<li><a class="dropdown-item" href="optimal.html">Optimal</a></li>
</ul>
</ul>
</nav>
</header>
<section id="title">
<h1>Second Chance Page Replacement</h1>
<!-- <h3>(LRU)</h3> -->
<h4>A brief introduction to the topic of Second Chance Page Replacement</h4>
</section>
<section id="intro">
<p>A modified form of the FIFO page replacement algorithm, known as the Second-chance page replacement algorithm, fares relatively better than FIFO at little cost for the improvement. <br> It works by looking at the front of the queue as FIFO does, but instead of immediately paging out that page, it checks to see if its referenced bit is set. If it is not set, the page is swapped out. Otherwise, the referenced bit is cleared, the page is inserted at the back of the queue (as if it were a new page) and this process is repeated. This can also be thought of as a circular queue. <br> If all the pages have their referenced bit set, on the second encounter of the first page in the list, that page will be swapped out, as it now has its referenced bit cleared. If all the pages have their reference bit cleared, then second chance algorithm degenerates into pure FIFO.
</p>
</section>
<section class="example">
<div>
<img src="images/second_chance.png" controls></video>
</div>
</section>
<section class="expl">
<div>
Advantages <br>
<li>Checks reference bits and replaces the page at the back of the queue giving it a “second chance”.</li>
<!-- <li>Simple data structures are used.</li>
<li>Highly efficient.</li> -->
<br>Disadvantages
<li>May suffer from belady’s anomaly.</li>
<li>Can degenerate into pure FIFO algorithm.</li>
</div>
</section>
<section class="button-123">
<a href="sc_simulator.html"><button class="btn-123">Simulator</button></a>
</section>
<script src="js/navbar.js"></script>
</body>
</html>