Re: spinaphore conceptual draft (was discussion of RT patch)

Kyle Moffett
2005-05-29T15:32:24Z

On May 29, 2005, at 09:29:37, Joe Seigh wrote:
> If you went with a bakery algorithm and could tolerate FIFO service
> order,
> you could use the expected service time as the ticket increment value
> instead of 1. Before a thread gets a ticket, it examines the
> expected queue
> wait time, the difference between the current ticket and the next
> available
> ticket, to decide which increment to be applied to the next ticket
> value.
> The two possible increment values would be the uncontended resource
> service
> time and that value plus thread suspend/resume overhead. If the
> expected
> wait time is greater than the latter, it uses the latter as the
> increment
> value and suspends rather than spins.

Ah, interesting idea. Perhaps we ought to try implementing several of
the
ideas and benchmarking them. I'll work on a user-space operable
version of
my naive spinaphores, as well as an optimized assembly version, if I can
find the time in the next day or so.

Cheers,
Kyle Moffett

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a18 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$
r !y?(-)
------END GEEK CODE BLOCK------