-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocedure.html
More file actions
461 lines (411 loc) · 17.4 KB
/
Copy pathprocedure.html
File metadata and controls
461 lines (411 loc) · 17.4 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
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
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
<!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, maximum-scale=1, user-scalable=no">
<title>Procedure - Deadlock Detection Algorithm</title>
<!-- Bootstrap 4.6 -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--dark-color: #1f2937;
--light-color: #f8fafc;
--border-color: #e5e7eb;
--text-primary: #111827;
--text-secondary: #6b7280;
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
color: var(--text-primary);
}
.navbar-custom {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--border-color);
box-shadow: var(--shadow-sm);
padding: 1rem 0;
}
.navbar-brand {
font-weight: 700;
font-size: 1.5rem;
color: var(--primary-color) !important;
text-decoration: none;
}
.main-container {
background: white;
border-radius: 20px;
box-shadow: var(--shadow-xl);
margin: 2rem auto;
max-width: 1400px;
overflow: hidden;
}
.sidebar {
background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
min-height: 800px;
padding: 2rem 0;
}
.sidebar-menu {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar-menu li {
margin: 0.5rem 0;
}
.sidebar-menu a {
display: flex;
align-items: center;
padding: 1rem 2rem;
color: rgba(255, 255, 255, 0.8);
text-decoration: none;
transition: all 0.3s ease;
border-radius: 0 25px 25px 0;
margin-right: 1rem;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
background: rgba(255, 255, 255, 0.1);
color: white;
transform: translateX(5px);
}
.sidebar-menu i {
margin-right: 1rem;
width: 20px;
text-align: center;
}
.content-area {
padding: 3rem;
min-height: 800px;
}
.page-header {
text-align: center;
margin-bottom: 3rem;
padding-bottom: 2rem;
border-bottom: 2px solid var(--border-color);
}
.page-title {
font-size: 2.5rem;
font-weight: 700;
color: var(--primary-color);
margin-bottom: 1rem;
}
.content-card {
background: white;
border-radius: 15px;
padding: 2rem;
box-shadow: var(--shadow-md);
border: 1px solid var(--border-color);
margin-bottom: 2rem;
}
.section-title {
font-size: 1.8rem;
font-weight: 600;
color: var(--dark-color);
margin-bottom: 1.5rem;
padding-bottom: 0.5rem;
border-bottom: 3px solid var(--accent-color);
display: inline-block;
}
.step-container {
background: linear-gradient(135deg, #f8fafc, #e2e8f0);
border-radius: 12px;
padding: 1.5rem;
margin: 1.5rem 0;
border-left: 4px solid var(--primary-color);
}
.step-number {
background: var(--primary-color);
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 600;
margin-right: 1rem;
}
.step-content {
font-size: 1.1rem;
line-height: 1.7;
color: var(--text-primary);
}
.formula-highlight {
background: var(--accent-color);
color: white;
padding: 0.5rem 1rem;
border-radius: 6px;
font-weight: 600;
display: inline-block;
margin: 0.5rem 0;
}
.sub-steps {
margin-left: 2rem;
margin-top: 1rem;
}
.sub-step {
background: white;
border-radius: 8px;
padding: 1rem;
margin: 0.8rem 0;
border-left: 3px solid var(--success-color);
box-shadow: var(--shadow-sm);
}
.breadcrumb-custom {
background: transparent;
padding: 0;
margin-bottom: 2rem;
}
.breadcrumb-custom .breadcrumb-item {
color: var(--text-secondary);
}
.breadcrumb-custom .breadcrumb-item.active {
color: var(--primary-color);
font-weight: 600;
}
.breadcrumb-custom .breadcrumb-item + .breadcrumb-item::before {
content: "→";
color: var(--text-secondary);
}
.footer-custom {
background: var(--dark-color);
color: white;
text-align: center;
padding: 2rem;
margin-top: 3rem;
}
.footer-custom h4 {
margin: 0;
font-weight: 500;
}
@media (max-width: 768px) {
.main-container {
margin: 1rem;
border-radius: 15px;
}
.content-area {
padding: 2rem 1.5rem;
}
.page-title {
font-size: 2rem;
}
.sidebar {
min-height: auto;
}
}
.fade-in {
animation: fadeIn 0.8s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
</style>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-custom fixed-top">
<div class="container">
<a class="navbar-brand" href="#">
<i class="fas fa-laptop-code me-2"></i>
Virtual Classes
</a>
</div>
</nav>
<!-- Main Container -->
<div class="container-fluid" style="margin-top: 80px;">
<div class="main-container">
<div class="row no-gutters">
<!-- Sidebar -->
<div class="col-lg-3">
<div class="sidebar">
<ul class="sidebar-menu">
<li>
<a href="index.html">
<i class="fas fa-bullseye"></i>
<span>Aim</span>
</a>
</li>
<li>
<a href="theory.html">
<i class="fas fa-book"></i>
<span>Theory</span>
</a>
</li>
<li>
<a href="pretest.html">
<i class="fas fa-clipboard-check"></i>
<span>Pre Test</span>
</a>
</li>
<li>
<a href="procedure.html" class="active">
<i class="fas fa-list-ol"></i>
<span>Procedure</span>
</a>
</li>
<li>
<a href="simulation.html">
<i class="fas fa-play-circle"></i>
<span>Simulation</span>
</a>
</li>
<li>
<a href="posttest.html">
<i class="fas fa-clipboard-check"></i>
<span>Post Test</span>
</a>
</li>
<li>
<a href="references.html">
<i class="fas fa-external-link-alt"></i>
<span>References</span>
</a>
</li>
</ul>
</div>
</div>
<!-- Content Area -->
<div class="col-lg-9">
<div class="content-area fade-in">
<!-- Breadcrumb -->
<nav aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-custom">
<li class="breadcrumb-item">Deadlock Detection Algorithm</li>
<li class="breadcrumb-item active">Procedure</li>
</ol>
</nav>
<!-- Page Header -->
<div class="page-header">
<h1 class="page-title">Deadlock Detection Algorithm</h1>
</div>
<!-- Content -->
<div class="content-card">
<h2 class="section-title"><i class="fas fa-list-ol me-2"></i>Procedure</h2>
<div class="step-container">
<div class="d-flex align-items-start">
<div class="step-number">1</div>
<div class="step-content">
Select the number of processes (P) and number of resources (R) and click the <strong>SUBMIT</strong> button to initialize the data structures, including the Allocation Matrix, Available Matrix (vector), and Maximum Matrix.
</div>
</div>
</div>
<div class="step-container">
<div class="d-flex align-items-start">
<div class="step-number">2</div>
<div class="step-content">
Enter the calculated values into the Need Matrix using the following formula:
<div class="formula-highlight">
Need matrix = Maximum matrix - Allocation matrix
</div>
</div>
</div>
</div>
<div class="step-container">
<div class="d-flex align-items-start">
<div class="step-number">3</div>
<div class="step-content">
Click on the <strong>CHECK</strong> button to verify the need matrix.
</div>
</div>
</div>
<div class="step-container">
<div class="d-flex align-items-start">
<div class="step-number">4</div>
<div class="step-content">
Click on the <strong>START</strong> button to create the Work and Finish Vectors
<div class="sub-steps">
<div class="sub-step">
<strong>Work Vector:</strong> Initialize with the current Available vector.
</div>
<div class="sub-step">
<strong>Finish Vector:</strong> Initialize all entries to false to indicate that no processes have been completed yet.
</div>
</div>
</div>
</div>
</div>
<div class="step-container">
<div class="d-flex align-items-start">
<div class="step-number">5</div>
<div class="step-content">
Click on the <strong>NEXT</strong> button to:
<div class="sub-steps">
<div class="sub-step">
Check if the need of process P<sub>i</sub> can be satisfied with the current Work vector using:
<div class="formula-highlight">Need<sub>i</sub> ≤ Work</div>
</div>
<div class="sub-step">
<strong>If true:</strong>
<ul class="mt-2">
<li>Temporarily allocate resources to process P<sub>i</sub>.</li>
<li>Update the Work vector to include the resources that process P<sub>i</sub> will release upon completion.</li>
<li>Mark process P<sub>i</sub> as finished (True) in the Finish vector.</li>
<li>Continue to the next process by repeating step 5 until all processes are marked as finished (True) or no further processes can be satisfied.</li>
</ul>
</div>
<div class="sub-step">
<strong>If false:</strong>
<ul class="mt-2">
<li>Repeat Step 5 until all processes are marked as finished (True) or no further processes can be satisfied.</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="step-container">
<div class="d-flex align-items-start">
<div class="step-number">6</div>
<div class="step-content">
<strong>Determine the final result:</strong> You will obtain either a safe or unsafe sequence based on the completion status of the processes.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="footer-custom">
<div class="container">
<h4><i class="fas fa-code me-2"></i>Developed by Nar Narayan Gaur</h4>
</div>
</footer>
<!-- Scripts -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
<script>
$(document).ready(function() {
// Add active class to current page
var currentPage = window.location.pathname.split('/').pop();
$('.sidebar-menu a').removeClass('active');
$('.sidebar-menu a[href="' + currentPage + '"]').addClass('active');
});
</script>
</body>
</html>