* Question about cpu time accuracy.
@ 2002-05-12 22:37 Jennifer Huang
2002-05-12 22:57 ` Kurt Wall
0 siblings, 1 reply; 4+ messages in thread
From: Jennifer Huang @ 2002-05-12 22:37 UTC (permalink / raw)
To: linux-kernel
Hi all,
I have a question about cpu time accuracy.
I am using kernel 2.4.18. But, when I tried "utime"
and "nanosleep" to get a process suspended, it only
worked in 10ms granularity, and it's no way to sleep
for 1 microsecond.
Anyone can help me out of this?
Thanks in advance,
-Jenny
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about cpu time accuracy.
2002-05-12 22:37 Question about cpu time accuracy Jennifer Huang
@ 2002-05-12 22:57 ` Kurt Wall
2002-05-13 2:49 ` Jennifer Huang
0 siblings, 1 reply; 4+ messages in thread
From: Kurt Wall @ 2002-05-12 22:57 UTC (permalink / raw)
To: Jennifer Huang; +Cc: linux-kernel
Scribbling feverishly on May 12, Jennifer Huang managed to emit:
> Hi all,
>
> I have a question about cpu time accuracy.
>
> I am using kernel 2.4.18. But, when I tried "utime"
> and "nanosleep" to get a process suspended, it only
> worked in 10ms granularity, and it's no way to sleep
> for 1 microsecond.
The standard kernel timer has a resolution of 1/HZ, which is 10ms on
an x86. You could try a scheduling policy of SCHED_FIFO or SCHED_RR,
but this only gets you 2ms resolution.
> Anyone can help me out of this?
There are patches available for high resolution timers:
http://sourceforge.net/projects/high-res-timers/
http://www.cs.wisc.edu/paradyn/libhrtime/
Kurt
--
Anarchy may not be the best form of government, but it's better than no
government at all.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Question about cpu time accuracy.
2002-05-12 22:57 ` Kurt Wall
@ 2002-05-13 2:49 ` Jennifer Huang
2002-05-13 3:22 ` Question about cpu time accuracy. Er resolution! george anzinger
0 siblings, 1 reply; 4+ messages in thread
From: Jennifer Huang @ 2002-05-13 2:49 UTC (permalink / raw)
To: Kurt Wall; +Cc: linux-kernel
Thanks very much for your information.
Just one more question, does it work for 2.4.18?
Thanks.
--- Kurt Wall <kwall@kurtwerks.com> wrote:
> Scribbling feverishly on May 12, Jennifer Huang
> managed to emit:
> > Hi all,
> >
> > I have a question about cpu time accuracy.
> >
> > I am using kernel 2.4.18. But, when I tried
> "utime"
> > and "nanosleep" to get a process suspended, it
> only
> > worked in 10ms granularity, and it's no way to
> sleep
> > for 1 microsecond.
>
> The standard kernel timer has a resolution of 1/HZ,
> which is 10ms on
> an x86. You could try a scheduling policy of
> SCHED_FIFO or SCHED_RR,
> but this only gets you 2ms resolution.
>
> > Anyone can help me out of this?
>
> There are patches available for high resolution
> timers:
>
> http://sourceforge.net/projects/high-res-timers/
> http://www.cs.wisc.edu/paradyn/libhrtime/
>
> Kurt
> --
> Anarchy may not be the best form of government, but
> it's better than no
> government at all.
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-13 3:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-12 22:37 Question about cpu time accuracy Jennifer Huang
2002-05-12 22:57 ` Kurt Wall
2002-05-13 2:49 ` Jennifer Huang
2002-05-13 3:22 ` Question about cpu time accuracy. Er resolution! george anzinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.