[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Short sleeps.

Chris wrote:

> I'm no kernel expert but I don't believe that it isn't possible at present,
> especially on systems with a large number of processes. The new scheduler
> *may* allow this to be done, but until that becomes part of the stable
> tree I think you need to apply a realtime patch to get this to work. As I
> understand it - which could be utter bollocks, as I say I'm no kernel hacker
> - even if there was a method to request a processor-relinquishing 1ms delay

(...which there is - usleep has the necessary semantics to allow you to *request*
a 1ms delay - it's just that the kernel doesn't honor it)....

> the chances are that under the current kernel versions you would not get the
> processor back for well over that, the additional delay depending upon the
> number of processes running at the time.

Indeed - but even if the machine is completely idle - it doesn't return for

> The only alternative being to sit
> on the processor and hope your timeslice doesn't expire just as soon as the
> 1ms is reached.

...which is unacceptable in this application.

----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
URLs : http://www.sjbaker.org
       http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
       http://prettypoly.sf.net http://freeglut.sf.net
       http://toobular.sf.net   http://lodestone.sf.net