realtime problem

Harti Brandt brandt at fokus.fraunhofer.de
Wed Apr 9 05:45:20 PDT 2003


On Wed, 9 Apr 2003, Bernd Walter wrote:

BW>I need a realtime behavour in the (-current) kernel with 1ms
BW>resolution and a presision of 500us.
BW>I thought about these two ways:
BW>- use timeout(9), but it seems that on i386 we only have a
BW>  resolution of 10ms.
BW>  And I don't know of what presision quality I can expect.
BW>  Can the resolution changed to 1ms as we have on alpha?
BW>- attach to the clock service routine.
BW>  I asume the presision will be good enough.
BW>  But how can I find out the resolution on a given hardware?
BW>
BW>What is the best way to solve the problem?

You must change HZ by putting

options	HZ=2000

or whatever you want in your config file.

You should also ensure, that you have no miibus ethernet cards in your
system, or comment out the relevant sections in dev/mii that periodically
call the status update stuff.

I fact I have used a HZ=10000 machine to simulate a 120000 packets/sec
satellite link with good success (jitters are in the order of 300usecs).

If you really mean 'real-time' with bounded times for interrupts and so
on, that will be much harder :-) See Terry's mail.

harti
-- 
harti brandt,
http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private
brandt at fokus.fraunhofer.de, harti at freebsd.org


More information about the freebsd-hackers mailing list