All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Communication between RT and non-RT thread
@ 2011-07-06  9:25 Andrey Nechypurenko
  2011-07-06 11:22 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Andrey Nechypurenko @ 2011-07-06  9:25 UTC (permalink / raw)
  To: Xenomai help

Hi Folks,

In my application I have Xenomai thread which collects and process
sensor data. In addition, I have non-RT thread which sends sensor data
over the network for visualization (with much lower time resolution,
picking let's say every 100th sample). Xenomai thread is the only one
which access sensors so there is a need to pass some samples to the
non-RT communication thread. Basically, It is a typical
producer/consumer situation which could be solved with thread-safe
queue. Obviously, introducing such queue with standard synchronization
mechanisms such as mutexes, etc. is not an option since it will
influence the RT thread which will be forced to wait for non-RT
thread.

While searching for the solution, I came to conclusion that lock-free
[1] queue implementation is the way to go. Searching for such
implementation which is also mature enough for real-life applications
and works on ARM, the only one I found was boost_lockfree [2] . It is
a great library, but it depends on boost, which in turns by default
pulls Python and a lot of other things which are not necessary
required on the embedded system (I am using BeagleBoard with Anstrom
Linux distribution).

I think, the situation I have (RT supplier/non-RT consumer) is quite
typical and I hope there should be a typical good solution for it. So
the question I would like to ask is whether someone already solved
such a problem and would appreciate any hints for good implementation
strategy.

[1] http://en.wikipedia.org/wiki/Non-blocking_algorithm
[2] http://tim.klingt.org/boost_lockfree

Thank you,
Andrey.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-07  8:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06  9:25 [Xenomai-help] Communication between RT and non-RT thread Andrey Nechypurenko
2011-07-06 11:22 ` Gilles Chanteperdrix
2011-07-06 11:42   ` Andrey Nechypurenko
2011-07-06 12:19     ` Gilles Chanteperdrix
2011-07-07  7:31       ` Richard Cochran
2011-07-07  7:57         ` Anders Blomdell
2011-07-07  8:44           ` Andrey Nechypurenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.