Re: time C function and multi-threadedness
From: David Schwartz (davids@webmaster.com)
Date: 04/01/03
- Next message: Alex Pavloff: "Re: gdb discrepancy in c++ iterators"
- Previous message: David Schwartz: "Re: SSL Sockets"
- Next in thread: Joseph Seigh: "Re: time C function and multi-threadedness"
- Reply: Joseph Seigh: "Re: time C function and multi-threadedness"
- Reply: Joseph Seigh: "Re: time C function and multi-threadedness"
- Maybe reply: Valentin Nechayev: "Re: time C function and multi-threadedness"
- Maybe reply: Valentin Nechayev: "Re: time C function and multi-threadedness"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: David Schwartz <davids@webmaster.com> Date: Mon, 31 Mar 2003 16:01:33 -0800
Joseph Seigh wrote:
> Since getting the time on an Intel system is expensive, unless you have HPET,
> linux probably just dumbs down gettimeofday() resolution to the current timeslice
> dispatch time. If you want higher resolution, you are out of luck unless you
> know how to write your own high resolution timer that gets around the TSC
> skew problem without any performance penalties. It can be done.
Actually, Linux synchronizes the TSCs and special cases clock changers,
so in most cases, 'gettimeofday' will take the timeslice dispatch time
and add a fudge factor from the current TSC reading to get you fairly
decent accuracy. Ulrich Windl's 'nanokernel' patches will increase this
accuracy dramatically in conjunction with NTP.
DS
- Next message: Alex Pavloff: "Re: gdb discrepancy in c++ iterators"
- Previous message: David Schwartz: "Re: SSL Sockets"
- Next in thread: Joseph Seigh: "Re: time C function and multi-threadedness"
- Reply: Joseph Seigh: "Re: time C function and multi-threadedness"
- Reply: Joseph Seigh: "Re: time C function and multi-threadedness"
- Maybe reply: Valentin Nechayev: "Re: time C function and multi-threadedness"
- Maybe reply: Valentin Nechayev: "Re: time C function and multi-threadedness"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|