-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRR.h
34 lines (26 loc) · 740 Bytes
/
RR.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
/*
AUTHORS: Dante Monaldo
FILEFAME: RR.h
DESCRIPTION: This class is designed to run a RR simulator and print the
results for the average wait time, average response time, average
turn around time, and the cpu usage.
*/
#ifndef RR_H
#define RR_H
#include "scheduler.h"
class RR : public Scheduler {
public:
RR(string input, int quantum);
void runScheduler();
protected:
// Returns the average response time
double avgRespQuery();
// Returns the average wait time
double avgWaitQuery();
// Returns the average turnaround time
double avgTurnaroundQuery();
// Returns the CPU usage in percentage form
double cpuUseQuery();
int timeQuantum;
};
#endif