#include "Process.h" #include #include #include #include Process::Process(const unsigned int id, std::vector page_table, const unsigned int execution_time, const unsigned int working_set_size) : page_table(std::move(page_table)), execution_time(execution_time), id(id) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution working_set_distribution(0, this->page_table.size() - 1); std::cout << page_table.size() - 1 << std::endl; for (int i = 0; i < working_set_size; ++i) { working_set.push_back(working_set_distribution(gen)); } } bool Process::is_finished(const unsigned int elapsed_time) const { return elapsed_time >= execution_time; }