Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!hpisoa1!vandys From: vandys@hpisoa1.HP.COM (Andrew Valencia) Newsgroups: comp.unix.wizards Subject: Re: P/V using SysV semop(2) Message-ID: <2200030@hpisoa1.HP.COM> Date: 30 Aug 88 16:31:11 GMT References: <1001@uwbull.uwbln.UUCP> Organization: Hewlett Packard, Cupertino Lines: 14 >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