-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPU.hpp
More file actions
22 lines (17 loc) · 729 Bytes
/
Copy pathCPU.hpp
File metadata and controls
22 lines (17 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef CPU_H
#define CPU_H
#include "Process.hpp"
class CPU
{
private:
bool is_idle_ = true;
Process currently_serving_;
public:
CPU(); // default constructor
CPU(const Process ¤tly_serving); // parameterized constructor
bool isIdle() const; // @return true if CPU is idle
Process currentlyServing() const; // @return process CPU is currently serving
void setIsIdle(const bool &is_idle); // set CPU status (boolean)
void setCurrentProcess(const Process ¤tly_serving); // set process CPU is currently serving
}; //end Simulation
#endif // CPU_H