Re: New semaphore __wake_up() implementation ...

Davide Libenzi (davidel@maticad.it)
Fri, 11 Jun 1999 16:58:25 +0200


>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.
>
>Here a patch to do that:

I don't agree here.
I think that we need a goodness() loop calculation in __sem_wake_up() to
extract
the more suitable task.
Suppose You have a lot of processes waiting on a semaphore with a number of
waiting tasks is always > 0.
Is this case the first process entered in wait queue never goes executed.

With a goodness loop solution a waiting task accumulate priority in counter
and
it will exist an exit door for the poor task.

Cheers,
Davide.

--
"Debian, the Freedom in Freedom"

- 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/