22 lines
		
	
	
		
			498 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			498 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef KERNEL_H
 | 
						|
#define KERNEL_H
 | 
						|
 | 
						|
#include <vector>
 | 
						|
 | 
						|
#include "PhysicalPage.h"
 | 
						|
#include "PageTable.h"
 | 
						|
#include "List.h"
 | 
						|
#include "Process.h"
 | 
						|
 | 
						|
class Kernel {
 | 
						|
public:
 | 
						|
        List<PhysicalPage> free_pages, busy_pages;
 | 
						|
        std::vector<Process> RunQ;
 | 
						|
        Kernel(unsigned int RunQ_max_length, const List<PhysicalPage> &free_pages, const List<PhysicalPage> &busy_pages);
 | 
						|
        void page_fault(std::vector<PTE> *page_table, unsigned int idx);
 | 
						|
        void stat_update();
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
#endif //KERNEL_H
 |