Menu

Proposing a new process management architecture

For the last couple of days i was thinking for a fast and safe contex switcher, scheduler, thread scheduler.
As you may know Q1-kernel has a very new kind of core and thread control. The kernel runs on one core plus 2 threads (or 1 based on threads count) and the rest of cores and threads are separated in Nodes, more like a cluster with very fast communication. In this way every core has his own job and that means no core conflict.

So because of this the process management has been very basic with just a contex switcher and a simple scheduler but as i have been working on the OS, i started noticing that there is more switching to non usefull processes and this is because of the more complex nature of running so many things on one kernel.

In this case i have a new process management architecture.
It works kinda like this:
The two threads on every Node have a small algorithm that check the binary output of the process calculating the xor of every switcher, this is instant cause its just one calculation and on lasm that is so fast it cant even be calculated by binary speed tracker. Next there are 122 priority levels: from 0 to 7 there are dead processes 8-10 are so small that they can be trowed between higher level processes, 11-48 small processes runned at the end, 49-74 normal processes, 75-100 high processes, 101-122 need to be runned right now. The number of 122 comes from the algorithm margin of error and from one simple calculation this is the perfect grade system. Processes are checked and promoted or demoted by threads that have limited "balance". This is a seL4 kinda scheduler because of the balance but its more complex. The idea behind this scheduler is that every process needs a grade and the changes that can occur are small so the switcher is more safe without changing every value after x ticks. Optimized this scheduler can be as fast as a micro kernel ones but that is hard to accomplish being more complex. This scheduler needs to be optimized to handle a lot of syscall transactions and real to virtual memory.

Posted by Demian Alexandru 2025-11-04 Labels: GOOD?

Log in to post a comment.