-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRMAScheduler.h
More file actions
executable file
·42 lines (36 loc) · 939 Bytes
/
RMAScheduler.h
File metadata and controls
executable file
·42 lines (36 loc) · 939 Bytes
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
/*
* RMAScheduler.h
*
* Concrete subclass of a Scheduler implementing the
* Rate-Monotonic scheduling algorithm.
*
* Created on: Mar 13, 2013
* Author: dam7633
*/
#ifndef RMASCHEDULER_H_
#define RMASCHEDULER_H_
#include "Scheduler.h"
class RMAScheduler: public Scheduler {
public:
RMAScheduler();
virtual ~RMAScheduler();
/**
* Template method implementing the RMA algorithm.
*
* This scheduler fully utilizes the QNX fixed-priority
* scheduler by assigning descending priorities starting
* from TP_SCHEDULER.
*
* Because of this, RMA can only be run with a task set
* smaller in size than TP_SCHEDULER, and will cause an
* assertion failure otherwise.
*/
void scheduleTasks();
private:
/**
* Flag used to only schedule tasks on the first run,
* since RMA is a fixed-priority scheduler.
*/
bool taskPrioritiesSet;
};
#endif /* RMASCHEDULER_H_ */