So I want priority based scheduling and I'm currently in between making a priority based round robin or something else
here is the project the I'm making for multi-thread and scheduling: https://github.com/GhostedGaming/eclipse-threader
here is my os: https://github.com/GhostedGaming/eclipse-os
go to the overhaul branch
What kind of scheduler should I use?
-
GhostedGaming
- Member

- Posts: 35
- Joined: Wed Jul 02, 2025 11:46 pm
- Libera.chat IRC: GhostedGaming
Re: What kind of scheduler should I use?
So what is your question?
There are entire libraries on schedulers. Doubtful I could do an adequate job of summarizing, but you could do a prioritized round-robin like this:
There are entire libraries on schedulers. Doubtful I could do an adequate job of summarizing, but you could do a prioritized round-robin like this:
- Every thread has a static priority and a dynamic priority.
- The static priority is the one that is set with nice() or setpriority() or such calls.
- When a thread becomes ready to run, its dynamic priority is initialized to the static priority.
- Each time the scheduler runs, the dynamic priority is incremented.
- The scheduler picks the thread with the highest dynamic priority.
- Whenever a task is picked, its dynamic priority is reset, whether or not it blocks.
Carpe diem!
