For this use case, I prefer a single-writer (RT) multiple-reader (non-RT) circular buffer of plain-old data (POD) in shared memory. The pages containing the buffer are mapped read/write for RT and read-only for non-RT. The page containing the write index is also read-only for non-RTs. Each non-RT maintains its own read index. This approach has several benefits: non-blocking for RT side, no system calls, non-RT can't corrupt RT, optional flow control and hysteresis, optional task wake ups, and more. The chief downsides are that it is for POD only and is not suitable for large amounts of data due to the memory copying. For further information on this please see "Will it go round in circles?" at https://www.youtube.com/watch?v=_Q1AGPyiAMY The video goes into more detail on the representation of the indices and how to implement the optional features if desired. On Thu, Nov 15, 2018 at 2:46 AM, Mohsen Alizadeh Noghani <m.alizad3h@xxxxxxxxx> wrote: > Hello everyone. > This is a general question. > I would like to pass data from my real-time process, the only process > that runs on an isolated core (at 1 KHz+) to another, non-real-time > process. Basically, I'm receiving the position of motors of a robot in > the real-time process and must pass that data to another process for > plotting a graph. > Obviously, any IPC mechanism that would cause unbounded latency in the > real-time loop is off-limits. > What are some available solutions that don't break the real-time loop? > I've read a lot about POSIX "mqueue". Does anyone have any experience with that? > Best, > Mohsen -- Glenn Kasten Android Media