Real-time timers (Help...urgently needed)

Real-time timers (Help...urgently needed)

Post by Simon Bud » Sat, 31 Oct 1998 04:00:00



I have an application that has a thread which is using an interval timer to
generate simulated clock ticks
at approx 32Hz (e.g. 31-32 ms).

Originally the problem was that these ticks were getting rounded up to 40ms
because I didn't have the
hires_tick parameter set in /etc/system (Solaris 2.6).

Now I have and the ticks are mostly around 32-33ms...but some jump out
occasionally but alot,
e.g. 90, 100, 150 ms!

The thread is in a process within a Real-Time Scheduling class..so I'm not
sure what could be delaying the timer ticks as i'm not sure what else would
be higher priority.  I don't believe any page faulting is occuring as it
should all be memory resident...however..it's not statically linked...but I
have tried setting the LD_BIND_NOW environment variable (I've assumed this
environment variable will still work when running from 'root'?)

There is no serial device I/O going on, but it is on a 100baseT network.
The instrumentation
thats being used is generated by the thread itself ...and without
instrumentation the
logic analyser is showing the same problems.

Anything else I should know about timers?..or could the O/S be doing
something even though
I'm in the RT scheduling class.

Any suggestions at all...anyone...urgently?

Thanks
Simon

 
 
 

Real-time timers (Help...urgently needed)

Post by Hugo van der Kooi » Mon, 02 Nov 1998 04:00:00



> I have an application that has a thread which is using an interval timer to
> generate simulated clock ticks
> at approx 32Hz (e.g. 31-32 ms).

> Originally the problem was that these ticks were getting rounded up to 40ms
> because I didn't have the
> hires_tick parameter set in /etc/system (Solaris 2.6).

> Now I have and the ticks are mostly around 32-33ms...but some jump out
> occasionally but alot,
> e.g. 90, 100, 150 ms!

Well. Guess what. Solaris is no real-time OS. So I suggest you get your
hand on a real-time OS if you need to run things like these.

Hugo.

--
        +------------------------+------------------------------+

        | Oranje Nassaustraat 16 | http://www.caiw.nl/~hvdkooij |
        | 3155 VJ  Maasland      | (De man met de rode hoed)    |
        +------------------------+------------------------------+
    "Computers let you make more mistakes faster than any other
invention in
      human history, with the possible exception of handguns and
tequila."
                (Mitch Radcliffe)