-
Notifications
You must be signed in to change notification settings - Fork 72
Process Scheduling
Inao edited this page Jun 14, 2023
·
2 revisions
Processes are stored in a list with 80 slots.
Each slot contains a linkedList with processes of that priority.
If a new process has to be run and if the new one has a higher priority than the current one, it preempts the other process and starts running. The other one goes back inside the list to wait according to priority. If two processes are at the same level, they solve it "collaboratively". The interpreter flag preemptionYields in the header of an image decides if the waiting at the same level is handled as a queue or a stack.
If there is no process to run the VM quits. An idle process is at priority 10 and is always running. If something is lower than 10 it will never run.