-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (81 loc) · 4.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SJF Preemptive Scheduler - Simulator</title>
<meta name="description"
content="This project is a simulation of the Shortest Job First (SJF) preemptive or shortest-remaining-time-first scheduling algorithm.">
<meta name="author" content="Sajmir Doko">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body class="h-100">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-5 form-add-process m-auto">
<div class="text-center">
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="57" fill="currentColor" class="bi bi-cpu-fill mb-4"
viewBox="0 0 16 16">
<path d="M6.5 6a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5h-3z" />
<path
d="M5.5.5a.5.5 0 0 0-1 0V2A2.5 2.5 0 0 0 2 4.5H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2v1H.5a.5.5 0 0 0 0 1H2A2.5 2.5 0 0 0 4.5 14v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14h1v1.5a.5.5 0 0 0 1 0V14a2.5 2.5 0 0 0 2.5-2.5h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14v-1h1.5a.5.5 0 0 0 0-1H14A2.5 2.5 0 0 0 11.5 2V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5a.5.5 0 0 0-1 0V2h-1V.5zm1 4.5h3A1.5 1.5 0 0 1 11 6.5v3A1.5 1.5 0 0 1 9.5 11h-3A1.5 1.5 0 0 1 5 9.5v-3A1.5 1.5 0 0 1 6.5 5z" />
</svg>
<h1 class="h3 mb-3 fw-normal">SJF Preemptive Scheduler</h1>
</div>
<form id="addProcessForm">
<div class="form-floating">
<input type="number" id="processId" name="processId" class="form-control" placeholder="Process ID" required>
<label for="processId">Process ID</label>
</div>
<div class="form-floating">
<input type="number" id="arrivalTime" name="arrivalTime" class="form-control" placeholder="Arrival Time"
required>
<label for="arrivalTime">Arrival Time</label>
</div>
<div class="form-floating">
<input type="number" id="burstTime" name="burstTime" class="form-control" placeholder="Burst ID" required>
<label for="burstTime">Burst Time</label>
</div>
<button type="submit" class="btn btn-outline-primary mt-2"><i class="bi bi-plus-circle"></i> Add
Process</button>
</form>
<div class="btn-group w-100 mt-4" role="group" aria-label="Buttons">
<button id="runButton" type="button" class="btn btn-lg btn-success w-75"><i class="bi bi-cpu"></i> Run
Scheduler</button>
<button id="resetButton" type="button" class="btn btn-outline-danger"><i class="bi bi-stars"></i>
Reset</button>
</div>
</div>
<div class="col-sm-12 col-md-7">
<div class="table-responsive">
<table id="resultsTable" class="table table-sm">
<thead>
<tr>
<th scope="col">Process</th>
<th scope="col">Arrival Time</th>
<th scope="col">Burst Time</th>
<th scope="col">Completion Time</th>
<th scope="col">Turn Around Time</th>
<th scope="col">Waiting Time</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="results">
<ul id="result" class="list-group list-group-flush"></ul>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous">
</script>
<script src="js/script.js"></script>
</body>
</html>