public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* Realtime capable userspace?
@ 2013-04-14  9:01 Stanislav Meduna
  2013-04-14 10:08 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 5+ messages in thread
From: Stanislav Meduna @ 2013-04-14  9:01 UTC (permalink / raw)
  To: linux-rt-users@vger.kernel.org

Hi,

I know this is not a kernel-related question, but I think the amount of
people doing realtime here is probably the largest.

As learned the hard-way the glibc is not (yet) realtime capable and
first changes are now starting to trickle in. Even if I try to fix known
places, who knows what, where and for how long is locked.

What userspace (libc / threads / malloc) are you using for realtime
applications? From my quick research:

- glibc:
  - priority-inheritance mutex implemented, but never used inside
    the glibc
  - not easy to replace malloc used internally (so that e.g.
    strdup() uses another one), at least when using shared
    libraries

- ucLibc:
  - threads from glibc, malloc uses non-PI-aware locks

- newlib:
  - no PI support, no futexes, mutexes done via kill(treadid, signal)

- tcmalloc (gperftools)
  - no PI locks used, although it is probably easily added. Not sure
    about the state of the software generally - it probably got much
    less real-world testing than the implementation in glibc


I ended with own low-level implementation of synchronization primitives
I needed via futexes (fortunately no full condvars or semaphores
needed) and serializing all malloc/free/... cals via a PI-aware mutex
(I don't care for performance when contented here, but I do care for
priority inversion).

What do you use for non-trivial applications?

Thanks
-- 
                                   Stano

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

end of thread, other threads:[~2013-04-14 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14  9:01 Realtime capable userspace? Stanislav Meduna
2013-04-14 10:08 ` Gilles Chanteperdrix
2013-04-14 11:46   ` Stanislav Meduna
2013-04-14 11:55     ` Gilles Chanteperdrix
2013-04-14 12:20       ` Stanislav Meduna

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox