mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
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:
parent
ee2bb98b88
commit
71b9ec1ae0
6 changed files with 46 additions and 7 deletions
|
@ -496,7 +496,7 @@ ByteBuffer procfs$all(InodeIdentifier)
|
|||
auto processes = Process::all_processes();
|
||||
StringBuilder builder;
|
||||
auto build_process_line = [&builder] (Process* process) {
|
||||
builder.appendf("%u,%u,%u,%u,%u,%u,%u,%s,%u,%u,%s,%s,%u,%u,%u,%u,%u\n",
|
||||
builder.appendf("%u,%u,%u,%u,%u,%u,%u,%s,%u,%u,%s,%s,%u,%u,%u,%u,%u,%s\n",
|
||||
process->pid(),
|
||||
process->times_scheduled(),
|
||||
process->tty() ? process->tty()->pgid() : 0,
|
||||
|
@ -513,7 +513,8 @@ ByteBuffer procfs$all(InodeIdentifier)
|
|||
process->amount_resident(),
|
||||
process->amount_shared(),
|
||||
process->amount_in_bitmaps(),
|
||||
process->ticks()
|
||||
process->ticks(),
|
||||
to_string(process->priority())
|
||||
);
|
||||
};
|
||||
build_process_line(Scheduler::colonel());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue