Rtos

S

Thread Starter

SR.Palaniswamy

Hi,
I need any rtos simulator and their programing instructions. Am in one project and have to develop one automation process. Kindly give the details ASAP....

Regards,
SR.Palaniswamy
Sr.Engineer - PDE
 
Hello,

RTOS programming is not readily simulated per se, but you could write code using pthreads on linux, for instance, and then target it on a RTOS such as RTAI or Xenomai. Your timing will not be the same but you could do basic testing.

I would try to see if there is a live demo CD available for Xenomai and play around with their user space threading. Its main advantage is that you can make linux system calls if you are willing to give up the realtime scheduling temporarily. You can, for instance, write to the console with printf() or to a file when something fails. Or you can talk to sockets without needing a realtime driver for your ethernet card if you are willing to allow the extra latency just while you are reading and writing to the socket/file.

One difference between linux pthreads and Xenomai (if you use the pthreads skin) is that there is an extra function call you run from within your thread to make it periodic (assuming you use the FIFO scheduler). That is to say that your thread will wakeup every "n" nanoseconds that you define and either run until you yield the processor or another thread of a higher priority becomes available.

KEJR
 
Hi,

write your test process at first for standard Linux. The second step should be to use a Linux kernel with the PREEMPT_RT patch (real-time kernel)

The same process works in real-time with PREEMPT_RT Linux if the process works with RR or FIFO scheduling and a real-time priority >= 20 - 99.

Your "real-time" process should also use "mlock" against being pages out of memory.

Regards
Armin Steinhoff

PS: the CFS scheduler of kernels > 2.6.30 include a real-time scheduler.

http://www.steinhoff-automation.com
 
Top