1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 17:38:12 +00:00

Add a /bin/top program for process table monitoring.

It automagically computes %CPU usage based on the number of times a process
has been scheduled between samples. The colonel task is used as idle timer.
This is pretty cool. :^)
This commit is contained in:
Andreas Kling 2019-02-04 10:28:12 +01:00
parent 642e2447c9
commit c0cffe1134
8 changed files with 156 additions and 4 deletions

View file

@ -303,6 +303,11 @@ void Scheduler::prepare_to_modify_tss(Process& process)
load_task_register(s_redirection.selector);
}
Process* Scheduler::colonel()
{
return s_colonel_process;
}
void Scheduler::initialize()
{
memset(&s_redirection, 0, sizeof(s_redirection));