Kernel: Add basic process priority support.

For now, the WindowServer process will run with high priority,
while the Finalizer process will run with low priority.
Everyone else gets to be "normal".

At the moment, priority simply determines the size of your time slices.
This commit is contained in:
Andreas Kling 2019-02-07 12:21:17 +01:00
commit 71b9ec1ae0
Notes: sideshowbarker 2024-07-19 15:50:13 +09:00
6 changed files with 46 additions and 7 deletions

View file

@ -187,6 +187,7 @@ void init()
});
Process::create_kernel_process("Finalizer", [] {
g_finalizer = current;
current->set_priority(Process::LowPriority);
for (;;) {
Process::finalize_dying_processes();
current->block(Process::BlockedLurking);