-
Notifications
You must be signed in to change notification settings - Fork 0
/
structNonPeriodic.h
79 lines (69 loc) · 1.1 KB
/
structNonPeriodic.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
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
/*
* Author: Akhil Tarikere
* Date: 10/3/20
*
* To store the input data in appropriate data structures.
* Contains the ADTs of non-periodic and scheduling parts.
*
*/
#include <stdbool.h>
/*
* The ADT of an aperiodic job.
*/
typedef struct
{
int jobNum;
float arrivalTime;
float wcet;
bool alive;
float timeLeft;
float responseTime;
}
AperiodicJob;
/*
* The ADT of a Sporadic job.
*/
typedef struct
{
int jobNum;
float arrivalTime;
float wcet;
float deadline;
// [startFrame, maxFrame);
// [.] => can use that frame as well.
// (.) => cannot use that frame.
int startFrame;
int maxFrame;
bool alive;
bool accepted;
bool rejected;
float timeLeft;
float responseTime;
}
SporadicJob;
/*
* The ADT of periodic job (job and not a task).
*/
typedef struct
{
int taskNum;
int instanceNum;
int splitNum;
float wcet;
bool alive;
float finishTime;
float responseTime;
float executionTime;
}
PeriodicJob;
/*
* The ADT of a frame that will be used by the scheduler.
*/
typedef struct
{
int frameNum;
int numPeriodicJobs;
PeriodicJob *periodicJobs;
float slack;
}
ScheduleFrame;