P/V using SysV semop(2)

Andrew Valencia vandys at hpisoa1.HP.COM
Wed Aug 31 02:31:11 AEST 1988


>Ah, but all processes sleeping awaiting a semaphore "unblock" sleep with the
>same priority (PSEMN)- the CPU consumption factor (p_cpu) is not taken into
>consideration when assigning priorities to sleeping processes.  Processes
>are removed from the run queue using the following rules:

    You're right; p->p_pri is used to choose the run queue (unless the process
is real-time, but that's another story).  Since it's set in sleep(), the
priority used to select a run queue is unchanging.  However, our VM system
(both paging and swapping sections) takes a bigger picture of the process's
behaviour.  If it isn't involved (for instance, on an empty system),
then you're quite likely to see something approaching FIFO.  Once it gets
involved, all bets are off, and the more starved processes are likely to
start catching up.

					Andy



More information about the Comp.unix.wizards mailing list