Re: Sleep() is not accurate on XP P4 2.8G

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Arkady Frenkel (arkadyf_at_hotmailxdotxcom)
Date: 10/19/04


Date: Wed, 20 Oct 2004 00:43:52 +0200

That not depend on machine but OS because RT Oses reprogramming TIC - Timer
interrupt controller
to receive timer interrupts quicker than 10 msec , BTW NT kernel Oses ( sure
XP is NT kernel Os , because only
2 kind exist Win9x or NT - now you can choose :) ) reprogramming TIC too ,
because default is 55 msec ( as maybe you remember that tick in DOS 18.2
ticks per second ).That calculated from clock frequency - 1,193,180 Hz and
counter( each time counter set to zero timer interrupt generated) .
Default start value in dos is 0xFFFF ( 65535 ) , so 1193180/65535 gives 18.2
.
 Arkady

"darrin Garrett" <dgarrett@airbiquity.com> wrote in message
news:41758FDE.8030402@airbiquity.com...
> Well, how many RTP 20ms audio sessions can one have up if their loop
> time for each session is > 15ms? Your answer sounds interesting, but
> why can I get 1ms messured incremenets on one identical machine and not
> of others. I also thought XP was not an NT based kernel. My problem is
> that I have done all of my VoIP development on the "Good" machine
> assuing they all worked the same, but it does not work so well on the
> other identical machines.
>
> Arkady Frenkel wrote:
> > Time tick in NT kernel Oses is 10 msec , and only in Windows CE is 1
msec.
> > So when you do Sleep less than 10 only next tick your thread will be
awaken
> > in the case of
> > no other thread with higher priority need to do something. That not
exactly
> > 10 because maybe you went to sleep close to tick , so your thread will
> > awaken not on next but next + 1 tick ( another 10 msec ) , so as average
you
> > have 15 msec
> > in NT kernel Oses , if you need 1 msec you need to use or multimedia
timers
> > with tick 1 msec or real time Oses or windows RT extensions ( Windows CE
,
> > VenturCom RTX , InTime( RMX ) ...) .
> >
> > For sure I can't in this MS Ng to propose non-windows RT Oses : QNX ,
> > vxWorks , RT Linux... :)
> >
> > BTW, why you ask that question on the network group :) ?
> >
> > Arkady
> >
> > "darrin Garrett" <dgarrett@airbiquity.com> wrote in message
> > news:41756B39.4050607@airbiquity.com...
> >
> >>QuerPerfrommanceCounter was one of the counters I used.
> >>
> >>qfel wrote:
> >>
> >>>That's because of system timer resolution. You can poll with
> >
> > high-resolution
> >
> >>>time functions like QueryPerformanceCounter to get better effects, but
> >
> > it
> >
> >>>will take CPU time.
> >>>
> >>>
> >>
> >
> >
>



Relevant Pages

  • Re: [PATCH] kexec: force x86_64 arches to boot kdump kernels on boot cpu
    ... and put LVT0 in ExtInt mode and IOAPIC is bypassed. ... I am looking at Intel Multiprocessor specification v1.4 and as per figure ... all the CPU should see the timer interrupts (which is coming ... It hung after the kernel ...
    (Linux-Kernel)
  • Re: Xeon hyperthreading problem
    ... model name: IntelXeonCPU 3.06GHz ... > counters, or a bug in the mobo, or a bug in the setting up of the APIC ... > by the kernel, or some mumo-jumbo is needed in lilo.conf. ... Notice it did not start up that way, as you have a few timer interrupts to ...
    (comp.os.linux.setup)
  • is it a timer bug?
    ... I notice the timer interrupts is quit high on the 2.6.28-rc8 kernel in my Nehalem machine. ... the timer interrupts reduce to 10-/second with tickless and highres enable. ... On 2.6.27 kernel, the timer interrupts can keep low with tickless kernel whenever the highres feature is enable or not. ...
    (Linux-Kernel)