accuracy of pthread_make_periodic_np and clock_nanosleep

[email protected]
Newsgroups gmane.linux.real-time.rtlinux.general
Message-ID <[email protected]>
I recently installed rtlinux-3.2-pre2.tar.bz2 on my RedHat 9.0 system using 
kernel 2.4.20 from kernel.org. Installation was strait forward.
I am specially interested in accurately (~10 us) execute some operations in 
exact intervalls.
The hello.c test in the examples is doing something like this. I executed 
it, but got quite bad results on my HP Proliant server with Pentium4 2.8 GHz.
In 99% of the cases it is very accurate, 11 to 12 us behing the given 
target. But sometimes I get up to 400 us delays/inaccuracies.

Changing the pthread_make_periodic_np to clock_nanosleep which is what I 
want to use actually gives me the same results.

As I read that the thread I start in the kernel module should have higher 
priority than all the other things how can this happen?

This is the output of hello.c, with a reduced wait time of 50ms instead of 
500ms. I marked the times with big delays. (To make shure that the prints 
are not affecting this in an other not documented test I removed the prints 
and only printed something when the accuracy was worse than any previous, 
which showed me up to 400 us inaccuracy).

elapsed_time = 4850012256
elapsed_time = 4900011968
elapsed_time = 4950158976     <--------------
elapsed_time = 5000012096
elapsed_time = 5050011232
elapsed_time = 5100012128
elapsed_time = 5150012128
:
:
elapsed_time = 16200012032
elapsed_time = 16250012000
elapsed_time = 16300273056       <-------------
elapsed_time = 16350012064 

_______________________________________________
Rtl mailing list
[email protected]
http://www2.fsmlabs.com/mailman/listinfo/rtl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.