-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlgo.html
More file actions
196 lines (172 loc) · 8.3 KB
/
Copy pathAlgo.html
File metadata and controls
196 lines (172 loc) · 8.3 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>OS CPU SCHEDULING Simulator</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script>
<!-- fontawesome for icons -->
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous" />
<link rel="stylesheet" href="assets/bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:300,400,700" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.6.1/css/pikaday.min.css" />
<link rel="stylesheet" href="assets/css/Navigation-Clean.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="assets/css/radio_button.css">
<link rel="stylesheet" href="assets/css/table.css">
<link rel="stylesheet" href="assets/css/avg.css">
<link rel="stylesheet" href="assets/css/style.css">
<link rel="stylesheet" href="../style.css">
</head>
<body>
<section class="sub-header">
<nav>
<a href="index.html">CPU Simulator</a>
<div class="nav-links" id="navLinks">
<i class="fas fa-window-close" onclick="hideMenu()"></i>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../docs.html">Docs</a></li>
<li><a href="../Simulator/simulator.html">Simulator</a></li>
<li><a href="../about.html">About</a></li>
</ul>
</div>
<i class="fas fa-bars" onclick="showMenu()"></i>
</nav>
<h1>Algorithms</h1>
</section>
<!-- <nav class="navbar">
<h2>CPU SCHEDULING SIMULATOR</h2>
</nav> -->
<form>
<div class="my-heading">
<h3 class="text-center">Select Your CPU Algorithm</h3>
</div>
<div style="height: 400px; padding: 5px;">
<div id="radio" class="container-radio">
<input class="option-input radio" type="radio" name="type" id="FCFS" onclick="radioClicked(this.id)">
<label for="FCFS"> FCFS (First Come First Serve)</label>
<br>
<input class="option-input radio" type="radio" name="type" id="SJF" onclick="radioClicked(this.id)">
<label for="SJF"> SJF (Shortest Job First)</label>
<br>
<input class="option-input radio" type="radio" name="type" id="RR" onclick="radioClicked(this.id)">
<label for="RR"> RRS (Round Robin Algorithm) </label>
<br>
<input class="option-input radio" type="radio" name="type" id="LJF" onclick="radioClicked(this.id)">
<label for="LJF"> LJF (Longest Job First)</label>
<br>
<input class="option-input radio" type="radio" name="type" id="PR" onclick="radioClicked(this.id)">
<label for="Priority"> Priority CPU Scheduling</label>
<br>
<input class="option-input radio" type="radio" name="type" id="LRTF" onclick="radioClicked(this.id)">
<label for="LRTF"> LRTF (Longest Remaining Time First)</label>
<br>
<input class="option-input radio" type="radio" name="type" id="SRTF" onclick="radioClicked(this.id)">
<label for="SRTF"> SRTF (Shortest Remaining Time First)</label>
<br>
<br>
</div>
</div>
<div class="MainPage">
<br><br>
<div class="InputFolder">
<strong>Enter Arrival Time:</strong>
<span><input type="number" min="0" id="AT" placeholder="Enter Arrival Time" style="height: 30px;
background-color: white; color: black; border: 2px solid
black; margin-left: 450px;" class="InputFiled"></span>
<br><br>
<strong>Enter Burst Time:  </strong>
<span><input type="number" min="0" id="BT" placeholder="Enter Burst Time" style="height: 30px;
background-color: white; color: black; border: 2px solid
black;margin-left: 450px;" class="InputFiled"></span>
<br><br>
<span id="timequanta" style="left: 0; display: none;">
<strong id="timetext" style="margin-left: 10px">Enter Time Quanta:  </strong>
<span><input type="number" min="0" id="TQ" placeholder="Enter Time Quanta" style="height: 30px;
background-color: white;
color: black; border: 2px solid black;" class="InputFiled"></span>
</span>
</div>
<br><br>
</form>
<div style="height:10px; ">
</div>
<table id="table" style="width: 100%;">
<thead>
<tr>
<th colspan="9" style="width: 100%; text-align: center;font-size:larger">CPU SCHEDULING
TABLE</th>
</tr>
</thead>
<tbody>
<tr>
<td id="PI" style="width:12%; color:blue">Process ID</td>
<td style="width: 12%; color:green">ArrivalTime</td>
<td style="width: 12%; color:red">Burst Time</td>
<td id="pcol" style="width: 10%; color:brown">Priority</td>
<td id="RS" style="width: 16%; color:chocolate">Response Time</td>
<td style="width: 10%; color:green">TAT</td>
<td style="width: 10%; color:crimson">CT</td>
<td style="width: 12%; color:red">Waiting Time</td>
<td id="color-code" style="width:6%; color:darkblue">Indicator</td>
</tr>
</tbody>
</table>
<br><br>
<div class="btnGang">
<button type="button" id="add" class="btn btn-primary" onclick="addRow()">Add Task</button>
<button type="button" id="delete" class="btn btn-danger" onclick="deleteRow()">Delet Task
</button>
<button type="button" class="btn btn-success" id="execute" onclick="calculate()">Visulized</button>
<div class="avg-text" id="average" style="color:green">Avg. Completion Time = <input class="ans-avg" type="text"
id="averagebox1" placeholder="0" readonly style="border-radius: 10px;"></div>
<br><br>
<div class="avg-text" id="average" style="color:red">Avg. Turn Around Time = <input class="ans-avg" type="text"
id="averagebox2" placeholder="0" readonly style="border-radius: 10px;"> </div>
<br><br>
</div>
<br>
<div class="visulizedChart">
<p>Visulized Graph 👇 & CPU Table 💻</p>
</div>
<br>
<div id="animator" style="display: block; position: relative;">
<span id="cover" style="display: block; position: absolute; margin:
0; top: 0; left: 2px; width: 100%; height: 100px;
background-color: whitesmoke; z-index: 8;">
</span>
<table id="mytb" style="display: inline; position: absolute; top:
2px; left: 2px;">
<tr id="processr"></tr>
<tr id="timer"></tr>
</table>
</div>
</div>
<br>
<br>
<br>
<div id="graph-container" style="padding: 50px;">
<center>
<canvas id="myChart" width="800" height="650" style="background-color: lightblue;"></canvas>
</center>
</div>
<!--Footer Section -->
<section class="footer">
<div class="icons">
<a href="#"><i class="fab fa-instagram"></i></a>
<a href="#"><i class="fab fa-github"></i></a>
<a href="#"><i class="fab fa-linkedin"></i></a>
</div>
<p>Made With <i class="far fa-heart"></i> by AEC-IT</p>
<p>
<i class="fa fa-copyright"></i> copyright 2024 || All rights reserved
</p>
</section>
</body>
<script src="assets/js/canvasjs.min.js"></script>
<script src="assets/js/os.js" defer></script>
<script src="assets/js/animation.js" defer></script>
<script src="assets/js/jquery.min.js" defer></script>
<script src="assets/js/Chart.min.js" defer></script>
</html>