Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Sep 1997 21:49:11 -0700 (PDT)
From:      Julian Elischer <julian@whistle.com>
To:        Finn Arne Gangstad <finnag@guardian.no>
Cc:        Archie Cobbs <archie@whistle.com>, current@FreeBSD.ORG
Subject:   Re: timeout management (was: Re: cvs commit: ...)
Message-ID:  <Pine.BSF.3.95.970924214735.12006C-100000@current1.whistle.com>
In-Reply-To: <Pine.LNX.3.95.970925053231.28877A-100000@lucifer.guardian.no>

next in thread | previous in thread | raw e-mail | index | archive | help
> > 
> 
> Have you guys looked at the timer code in Linux? It basically is a small
> variation of this, which makes all operations  O(1) for almost
> every timer.
> 
> The idea is that instead of splitting each range into 2, you split each
> range into 256 (for the first range) and 32 for all other ranges.
> 
> Most timers will be less than 256 ticks into the future, so they will
> never be moved, and 99% of the rest will in the 32 * 256 ticks range, and
> will, if they are not cancelled (which around 90% seem to be), only be
> moved once. 
> 
> It's in kernel/sched.c if you're unfamiliar with Linux :)

the first set of 256 is similar to the new system in FreeBSD
The second one could be sonsidered as similar, but just
repeated.
> 
> - Finn Arne
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970924214735.12006C-100000>