Each process has a priority and can either be runnable, blocked or suspended. If there is a runnable process with priority P, then no processes with priority less than P will run. When there are runnable processes with equal priority, they will be scheduled in a round-robin manner.
If a process with priority P is running and a blocked process with priority greater than P becomes runnable, the second process will run when the scheduler is next invoked (either explicity or at the next preemption tick).
To find the priority of a process, use
. This can be changed using
change-process-priority proc-1 10)
Another way to specify the priority is to create the process with
, passing the keyword
"SORTER-DOT" '(:priority 10) #'sorter #\.)
"SORTER-DASH" () #'sorter #\-))