From: Stanislav Meduna <stano@meduna.org>
To: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Realtime capable userspace?
Date: Sun, 14 Apr 2013 11:01:55 +0200 [thread overview]
Message-ID: <516A7083.8080705@meduna.org> (raw)
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
next reply other threads:[~2013-04-14 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 9:01 Stanislav Meduna [this message]
2013-04-14 10:08 ` Realtime capable userspace? Gilles Chanteperdrix
2013-04-14 11:46 ` Stanislav Meduna
2013-04-14 11:55 ` Gilles Chanteperdrix
2013-04-14 12:20 ` Stanislav Meduna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=516A7083.8080705@meduna.org \
--to=stano@meduna.org \
--cc=linux-rt-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox