Re: New semaphore __wake_up() implementation ...

Mark Hull-Richter (markh@procom.com)
Fri, 11 Jun 1999 07:52:39 -0700


[Sorry, I meant to post this to the list.]

Andrea Arcangeli wrote:
>
> On Fri, 11 Jun 1999, V Ganesh wrote:
>
> >but if the semaphore was being used for mutual exclusion then you should
> >wake up the highest priority process, which is what I think Davide is
> >doing. previously we just kicked the herd in the ass and they all thundered
>
> I think we should wakeup the last process that gone to sleep even in the
> up() case. We should simple ask for an EXCLUSIVE wakeup.
>
The traditional approach is to wake up the first process that blocked on
the semaphore. It preserves the order of acquisition (FIFO) and removes
the possibility of process starvation, which can easily occur in a LIFO
approach. It also tends to promote data integrity (order of updates is
preserved).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/