1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:25:08 +00:00

Kernel: Make the colonel run at "Idle" priority (the lowest possible.)

This means it won't hog the CPU for more than a single timeslice. :^)
This commit is contained in:
Andreas Kling 2019-04-20 15:58:45 +02:00
parent 45a30b4dfa
commit ec365b82d5
4 changed files with 12 additions and 4 deletions

View file

@ -18,6 +18,8 @@ static dword time_slice_for(Process::Priority priority)
return 15;
case Process::LowPriority:
return 5;
case Process::IdlePriority:
return 1;
}
ASSERT_NOT_REACHED();
}
@ -385,7 +387,7 @@ void Scheduler::initialize()
initialize_redirection();
s_colonel_process = Process::create_kernel_process("colonel", nullptr);
// Make sure the colonel uses a smallish time slice.
s_colonel_process->set_priority(Process::LowPriority);
s_colonel_process->set_priority(Process::IdlePriority);
load_task_register(s_redirection.selector);
}