Do you have a question? Post it now! No Registration Necessary
March 9, 2008, 2:14 am

For my Arm9 board, my application will have 2 or 3 processes or maybe
threads and one of ( pipe, socket, fifo, msg queue or shared memory,
or?) to pass data between them. The data is about 100bytes every 50ms.
Assuming I just have vanilla Linux or uCLinux without any real-time
enhancements, which of the above methods will have the least processor
overhead, so as to be a bit closer to meeting real-time deadlines?
My guess is that pthreads with shared memory might be best, but maybe not.
threads and one of ( pipe, socket, fifo, msg queue or shared memory,
or?) to pass data between them. The data is about 100bytes every 50ms.
Assuming I just have vanilla Linux or uCLinux without any real-time
enhancements, which of the above methods will have the least processor
overhead, so as to be a bit closer to meeting real-time deadlines?
My guess is that pthreads with shared memory might be best, but maybe not.

Re: Inter-process communication for real-time

On ARM you should use one process with more than one thread for this job.
Changing between processes hurts the ARM CPU as it needs to throw away its
cache content for *each* change (cache works on virtual address lines
instead physical ones)!
For example on an Xscale running at ~500MHz you can wake up one process in
your system every 100us (with HRT and RT Preempt). But with only one
additional process in the system it does not work anymore. The time
increases to 300us ... 500us (changing priority in this case does not help,
as this is a hardware restriction).
JB

Re: Inter-process communication for real-time

So what about sharing data between the threads? In the past I have used
message queues, but I suspect they use more processor time than say, a
shared memory or pipe. I'd like to start off with the right architecture
since I don't have time to test all the possible configurations.

Re: Inter-process communication for real-time

Sharing data between threads is always the most efficiency way. The POSIX
message queues are also part of the POSIX realtime library. But: Don't use
the IPC implementations of sharing memory and message queues!
Note: To benefit from the new kernel features you need a very recent EABI
toolchain for ARM. OABI toolchains do not help.
JB
Site Timeline
- » Cheap mobile computing...
- — Next thread in » Embedded Linux
-
- » accurate time resolution in ucLinux
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Samstag ist Antennentag - 2 parallele Dipole mit Phasenverschiebung der Speisung
- — The site's Newest Thread. Posted in » Electronics (German)
-