Linux semaphore implementation ...

Davide Libenzi (davidel@maticad.it)
Thu, 10 Jun 1999 14:33:27 +0200


Hi guys,

can anyone explain to me why having a semaphore with N process
waiting for, up() release all N tasks of which only one get the free way ?
This cause N call to wakeup() and N-1 call to schedule().
Why don't implement a FIFO queue inside the semaphore and release
only one of waiting processes when up() is called ?
When We have few tasks waiting for semaphore it dosn't mean, but in
a hi loaded queue this can lead to a time penalty.
More, having a FIFO queue give a deterministic "time to wait" to a
blocked process.
Probably I've missed something in Linux semaphore implementation
and I'd like someone explain to me.

PS: has someone tried the scheduler patch I've submitted yesterday ?

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/