Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 21b54e0

Browse files
committed
Latest Bootstrap
1 parent d8f9c9f commit 21b54e0

26 files changed

+809
-1092
lines changed

Bankers/banker.html

Lines changed: 60 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,63 @@
11
<!DOCTYPE html>
22
<html>
3-
4-
<head>
5-
<title> Banker </title>
6-
<script type="text/javascript" src="banker.js"></script>
7-
<meta charset="utf-8">
8-
<meta name="viewport" content="width=device-width, initial-scale=1">
9-
<link rel="stylesheet" type="text/css" href="../Index/css/bootswatch.css" />
10-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
11-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
12-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
13-
14-
<style>
15-
h1,
16-
h2,
17-
h4,
18-
h5 {
19-
text-align: center;
20-
}
21-
</style>
22-
</head>
23-
24-
<body>
25-
<nav class="navbar navbar-expand-lg navbar-light bg-light">
26-
<a class="navbar-brand" href="../Index/index.html">Operating System Simulator</a>
27-
28-
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="">
29-
<span class="navbar-toggler-icon"></span>
30-
</button>
31-
32-
33-
</nav>
34-
<br><br><br>
35-
<div >
36-
<div class="container">
37-
<div class="jumbotron">
38-
<h1 class="display-3" style="color:purple"><b>Banker's Algorithm</b></h1>
39-
<p style="color:orange">The Banker algorithm, sometimes referred to as the detection algorithm, is a resource allocation and deadlock avoidance algorithm developed by Edsger Dijkstra that tests for safety by simulating the allocation of predetermined maximum possible amounts of all resources, and then makes an "s-state" check to test for possible deadlock conditions for all other pending activities, before deciding whether allocation should be allowed to continue.</p>
40-
<br>
41-
</div>
42-
</div>
43-
44-
<!-- <div style = "width: 100%;;margin-left:10px;text-align:left;">
45-
<div style="float:left; margin-right:20px;">Number of Resources:</div>
46-
<input id = "totalres" onkeyup="addInitialRes()" type="text">
47-
<button class="btn btn-primary btn-success" style ="float:right;margin-right:20px;" onclick="clear_data()" >Clear Data</button>
48-
</div> -->
49-
50-
<div class="input-group input-group-lg" style="width: 350px; margin-left: 150px;">
51-
<div class="input-group-prepend">
52-
<span class="input-group-text" id="inputGroup-sizing-lg">Number of Resources:</span>
53-
</div>
54-
<input id="totalres" type="text" class="form-control" aria-label="Large" aria-describedby="inputGroup-sizing-sm"
55-
onkeyup="addInitialRes()">
56-
</div>
57-
58-
<!-- <button class="btn btn-primary btn-danger" style="margin: 10px 10px;" onclick="clear_data()">Clear Data</button> -->
59-
60-
<br><br />
61-
<br><br />
62-
<br><br />
63-
<div id="resources" style="margin-left:140px;"></div>
64-
<br><br />
65-
<br><br />
66-
<div id="table" class="container" style="text-align:center;">
67-
<div>
68-
69-
<div id="heading"></div>
70-
<br>
71-
<table id="tab" class="table table-striped table-bordered "
72-
style="border-color: black; border-width: 1px; bgcolor: white; width: 600px;display: inline-table;">
73-
<thead id="inp-head">
74-
</thead>
75-
<tbody id="ptable">
76-
</tbody>
77-
</table>
78-
</div>
79-
<div>
80-
<div id="heading_alloc"></div>
81-
<br>
82-
<table id="tab_alloc" class="table table-striped table-bordered "
83-
style="border-color: black; border-width: 1px; bgcolor: white; width: 600px;display: inline-table;">
84-
<thead id="inp-head_alloc">
85-
</thead>
86-
<tbody id="ptable_alloc">
87-
</tbody>
88-
</table>
89-
</div>
90-
</div>
91-
<br><br />
92-
<div id="inputsection" style="text-align:center">
93-
</div>
94-
<br><br />
95-
<br><br />
96-
<div id="firs_alloc" style="margin-left:10px">
97-
98-
</div>
99-
<div id="run" style="text-align:center;">
100-
<button class="btn btn-success" style="margin:50px 0px" onclick="banker()">Run</button>
101-
</div>
102-
<br><br />
103-
<br><br />
104-
<div id="operations">
105-
</div>
106-
<br><br />
107-
<div id="output1" style="text-align:center">
108-
</div>
109-
<br><br />
110-
<br><br />
111-
<div id="output" style="text-align:center">
112-
113-
</div>
114-
<br><br />
115-
<br><br />
116-
<div id="output2" style="text-align:center">
117-
118-
</div>
119-
<br><br />
120-
</body>
121-
3+
<head>
4+
<title>Banker's Algorithm</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
7+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
8+
<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" />
9+
<script type="text/javascript" src="banker.js"></script>
10+
</head>
11+
<body>
12+
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
13+
<a class="navbar-brand" href="../Index/index.html#bankers">Home</a>
14+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="">
15+
<span class="navbar-toggler-icon"></span>
16+
</button>
17+
</nav>
18+
<br>
19+
<div class="container">
20+
<div class="jumbotron">
21+
<h1 class="display-3">Banker's Safety Algorithm</h1>
22+
<p class="lead">Detection algorithm to avoid deadlock</p>
23+
<hr class="my-4">
24+
<p>Banker's Algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation of predetermined maximum possible amounts of all resources, and then makes an "safe-state" check to test for possible deadlock conditions for all other pending activities, before deciding whether allocation should be allowed to continue.</p>
25+
</div>
26+
<div class="jumbotron">
27+
<form name = "resource">
28+
<div class = "form-group" style="margin-left:50px; float:left;">
29+
<label>Number of Resource types:</label><input class="form-control" type="Number" onkeyup="BuildFormFields(parseInt(this.value, 10));" />
30+
<div id="FormFields" style=""></div>
31+
</div>
32+
</form>
33+
<form name = "Need">
34+
<div class = "form-group" style="margin-left:50px;float:left;">
35+
<label>Number of Processes:</label> <input class="form-control" type="Number" onkeyup="BuildFormFields2(y = parseInt(this.value, 10));" />
36+
<div id="FormFields1"></div>
37+
</div>
38+
</form>
39+
<form name = "Alloc">
40+
<div class = "form-group" style="margin-left:50px;float:left;margin-top:60px;">
41+
<div id="FormFields2"></div>
42+
</div>
43+
</form>
44+
45+
<table id="tab_need" class="table table-striped table-hover">
46+
47+
</table>
48+
49+
<table id="tab_alloc" class="table table-striped table-hover">
50+
51+
52+
</table>
53+
54+
<ul id = "printing">
55+
56+
</ul>
57+
</div>
58+
<div class="panel-footer">
59+
<button class="btn btn-primary btn-success" onclick="banker()">Run</button>
60+
</div>
61+
</div>
62+
</body>
12263
</html>

0 commit comments

Comments
 (0)