WaitForMultipleObject
(1)
WaitableTimers
(1)
Variance
(1)
Windows
(1)
Lapin
(1)
Latency
(1)
Kernels
(1)
Timer
(1)

Variance Of "Error" In Delay For Wait Functions.

Asked By Le Chaud Lapin
05-Jan-10 12:34 AM
Hi All,

First, I realize that Windows is not an RTOS. :)

I would like to know the mean and variance, probabilistically-
speaking, of the "error" from the specified delay in
WaitForSingleObject, WaitForMultipleObject, WaitableTimers, etc.

For example, if I specify 600 seconds, there is a pretty good chance
that the break will occur right around 600 seconds. If it occurs at
599 seconds, 987 milliseconds, the error would be 13 milliseconds.

For 600 seconds, it will likely not occur after 5 seconds, nor after
17 hours, as the error would be 595 seconds, and 16 hours, 55 minutes;
respectively, to use two extreme examples.

What is the mean error under "typical" circumstances.  What is
variance of this error?

Also, does Windows still use ing the 18.2-millisecond quantum from the
wee-old days of original IBM PC?

-Le Chaud Lapin-

The quantum was not 18.2 ms. it was 1/18.2s ~ 55ms.

Alexander Grigoriev replied to Le Chaud Lapin
04-Jan-10 09:53 PM
The quantum was not 18.2 ms. it was 1/18.2s ~ 55ms.

In modern Windows kernels the time slice (and timer tick) is usually
10-15ms.

From a probabilistic point of view, the first thing to realize is that

m replied to Le Chaud Lapin
08-Jan-10 09:13 PM
From a probabilistic point of view, the first thing to realize is that the
error is all positive skew up to thread quantum + timer interrupt latency +
chi;  where chi is the hard part - the time required by higher priority
tasks discounted by the Windows scheduler guaranteed that it is fair to all
threads.  Usually this value is negligible.
Post Question To EggHeadCafe