Nice

Boyd Roberts boyd at necisa.ho.necisa.oz.au
Thu Jan 31 14:33:33 AEST 1991


In article <richard.665126102 at fafnir.la.locus.com> richard at locus.com (Richard M. Mathews) writes:
>...  In many (most?) versions of Unix if an interrupt
>makes a process runnable at a higher priority than the running process,
>a context switch will be forced immediately.

No, UNIX does not have pre-emptive scheduling.  When the above event occurs
the kernel context switches at the next user-mode trap, system call, sleep()
or the once-a-second context switch (time quantum expiry).

The low level scheduling is done by code executed by the running process
which checks whether a context switch is required.  If it is, the process
gives up the CPU.  A higher priority process being made runnable doesn't
_force_ the current process to give up the CPU, it gives it up when it
notices that it has to.


Boyd Roberts			boyd at necisa.ho.necisa.oz.au

``When the going gets wierd, the weird turn pro...''



More information about the Comp.unix.internals mailing list