theseus-os / Theseus

Theseus is a modern OS written from scratch in Rust that explores 𝐢𝐧𝐭𝐫𝐚𝐥𝐢𝐧𝐠𝐮𝐚𝐥 𝐝𝐞𝐬𝐢𝐠𝐧: closing the semantic gap between compiler and hardware by maximally leveraging the power of language safety and affine types. Theseus aims to shift OS responsibilities like resource management into the compiler.
https://www.theseus-os.com/
MIT License
2.91k stars 172 forks source link

Replace Round Robin scheduling with The Multi-Level Feedback Queue #1096

Open jklott opened 10 months ago

jklott commented 10 months ago

Currently the scheduling algorithm uses round robin to determine how tasks should be running. Although adequate for many simple tasks, this can lead to issues like poor perfomance on long issues, improper prioritization, and high overhead. The use of multi-level feedback queue + priority boosting handles most of these issues by relying less on pre-emptiveness and correctly assigning/updating priorities in the scheduling queue.