Information Sites

R. B. Riddick arne_woerner at yahoo.com
Sun Jul 30 21:11:41 UTC 2006


--- David Godsey <freebsd at godseyfamily.com> wrote:
> So I have been combing the internet for information on realtime FreeBSD,
> but the information is limited.  So there must be some more information
> out there, but I do not know where to look.  Can someone direct me please?
> 
Hmm... I do not have practical experience in real time operations (just my
mostly theoretical studies of task scheduling and control engineering), so I
can only hope my contribution is not too useless/stupid... :-)

I say, have u read the man page rtprio(2) and polling(4)?

I would guess, that u might want to set kern.clockrate to something high
(1000..2000) (e. g. via /boot/loader.conf's kern.hz).

Furthermore I would recommend, that u do some tests/research/experiments in ur
specific environment (remember: real time constraints can be very different (e.
g. a simple electronic calculator is ok, when u just want to compute the taxes
in a shop or in a restaurant, but when u want to compute the course of Cpt.
Picard's Enterprise (StarTrek) u would need something faster (or it might get
struck by some kind of lightning or get stuck in a sun))). In this case here it
is the question, if u can tolerate fluctuations in scheduling accuracy
(response time) due to voluntary/unpredictable/dynamically-scheduled kernel
activity (I think polling(4) could just help (a little) with network devices,
so that hard disc activity can still hinder real time tasks).

>From the point of view of digital control engineering operating systems like
*BSD are no real real-time operating systems... Real real-time operating
systems are obviously able to guarantee a very high scheduling accuracy...

I just did this litte experiment with (avg. about 1.3Mbit/sec, peak about
16Mbit/sec) disc traffic at the same time and a clock rate of 1000Hz:

> rtprio
rtprio: normal priority
> repeat 10 time sleep .2
0.007u 0.015s 0:00.22 4.5%      12+396k 0+0io 0pf+0w
0.000u 0.030s 0:00.23 13.0%     182+1332k 0+0io 0pf+0w
0.000u 0.032s 0:00.23 13.0%     181+1288k 0+0io 0pf+0w
0.010u 0.021s 0:00.23 13.0%     276+2064k 0+0io 0pf+0w
0.006u 0.026s 0:00.24 8.3%      144+1230k 0+0io 0pf+0w
0.000u 0.029s 0:00.23 8.6%      136+966k 0+0io 0pf+0w
0.000u 0.032s 0:00.24 12.5%     185+1420k 0+0io 0pf+0w
0.021u 0.010s 0:00.24 12.5%     182+1332k 0+0io 0pf+0w
0.006u 0.025s 0:00.28 7.1%      278+2130k 0+0io 0pf+0w
0.008u 0.026s 0:00.24 8.3%      276+2064k 0+0io 0pf+0w
neo# rtprio 30 -$$
neo# rtprio
rtprio: realtime priority 30
neo# repeat 10 time sleep .3
0.000u 0.025s 0:00.33 6.0%      138+1018k 0+0io 0pf+0w
0.000u 0.028s 0:00.33 6.0%      276+2036k 0+0io 0pf+0w
0.000u 0.027s 0:00.33 6.0%      140+1084k 0+0io 0pf+0w
0.000u 0.028s 0:00.33 6.0%      138+1018k 0+0io 0pf+0w
0.006u 0.024s 0:00.32 6.2%      412+2988k 0+0io 0pf+0w
0.000u 0.026s 0:00.32 6.2%      138+1018k 0+0io 0pf+0w
0.006u 0.020s 0:00.47 4.2%      274+1970k 0+0io 0pf+0w
0.006u 0.019s 0:00.32 3.1%      552+4072k 0+0io 0pf+0w
0.000u 0.013s 0:00.31 3.2%      276+2036k 0+0io 0pf+0w
0.000u 0.014s 0:00.31 3.2%      276+2036k 0+0io 0pf+0w

-Arne



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-realtime mailing list