Linux-kernel mailing list archive 1999-23,: Re: New semaphore __wake_up() implementation ...

# Re: New semaphore __wake_up() implementation ...

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

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: David Luyer: "Re: Yamaha Opl3-Sa3 problems..."
- Previous message: Davide Libenzi: "Re: New semaphore __wake_up() implementation ..."
- Maybe in reply to: Davide Libenzi: "New semaphore __wake_up() implementation ..."
- Next in thread: V Ganesh: "Re: New semaphore __wake_up() implementation ..."

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

- Next message: David Luyer: "Re: Yamaha Opl3-Sa3 problems..."
- Previous message: Davide Libenzi: "Re: New semaphore __wake_up() implementation ..."
- Maybe in reply to: Davide Libenzi: "New semaphore __wake_up() implementation ..."
- Next in thread: V Ganesh: "Re: New semaphore __wake_up() implementation ..."