1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/ableos/src/experiments/schedule.rs

25 lines
522 B
Rust
Raw Normal View History

2021-11-16 00:09:27 -06:00
pub type Priority = [Process; 512];
pub struct VirtualMemoryTable {}
struct Process {
id: u64,
mem_table: *mut VirtualMemoryTable, // Pointer to a memory table
}
pub struct Scheduler {
pub high_priority: Priority, //150
pub medium_priority: Priority, //100
pub low_priority: Priority, // 50
pub next_pid: u64,
}
impl Scheduler {
pub fn bump_up() {}
pub fn bump_down() {}
pub fn schedule(&mut self) {
let current_pid = self.next_pid;
self.next_pid += 1;
}
}