-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProcess.hpp
27 lines (25 loc) · 866 Bytes
/
Process.hpp
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
#ifndef PROCESS
#define PROCESS
#include "vector"
#include "MemManagementUnit.hpp"
#include "VirtualPage.hpp"
class Process{
public:
int id;
int working_set_size;
int virtual_page_count;
int burst_time;
Process(){}
Process(int id, int working_set_size, int virtual_page_count, int burst_time){
this->id = id;
this->working_set_size = working_set_size;
this->virtual_page_count = virtual_page_count;
this->burst_time = burst_time;
for(int virtual_page_address = 0; virtual_page_address < virtual_page_count; virtual_page_address++){
virtual_pages.push_back(VirtualPage{.virtual_page_address = virtual_page_address, .reference_bit = false, .presense_bit = false, .modification_bit= false});
}
}
std::vector<VirtualPage> virtual_pages;
void changeWorkingSet();
};
#endif