-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutilities.h
42 lines (36 loc) · 899 Bytes
/
utilities.h
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
#ifndef OS_PROJECT_CPU_SCHEDULING_ALGORITHMS_UTILITIES_H
#define OS_PROJECT_CPU_SCHEDULING_ALGORITHMS_UTILITIES_H
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include "Process.h"
unsigned int minArrivalTime
(
Process *processes[],
unsigned int p_len
);
unsigned int findFirstProcessInQueue
(
Process *processes[],
unsigned int p_len,
const bool status_period_0[p_len],
const bool status_period_1[p_len]
);
unsigned int findShortestProcess
(
Process *processes[],
unsigned int p_len,
unsigned int timeElapsed,
const bool status_period_0[p_len],
const bool status_period_1[p_len]
);
unsigned int findFirstProcessInLevel
(
Process *processes[],
unsigned int p_len,
const bool isInLevel[2][p_len],
unsigned int level,
const bool status_period_0[p_len],
const bool status_period_1[p_len]
);
#endif //OS_PROJECT_CPU_SCHEDULING_ALGORITHMS_UTILITIES_H