[Interest] Packet arrival-time resolution? QUdpSocket

Konrad Rosenbaum konrad at silmor.de
Fri Dec 1 11:26:29 CET 2017


Hi,

On Thu, November 30, 2017 16:49, Jason H wrote:
> I don't think you can say that Qt is not real-time. That's more of a
> kernel issue than a software library issue.

On Thu, November 30, 2017 17:43, Konstantin Tokarev wrote:
> Actually, Qt is ported to real-time operating systems, such as QNX and
> Integrity

This is a common misconception. Realtime is not some magic forest that
will make everything realtime as soon as you enter it. All layers of hard-
and software have to be realtime in order for the result to be considered
realtime too. A simple use of new or malloc can destroy your realtime
guarantees because memory allocation is not fully deterministic.

Luckily we are talking about "soft" realtime with multimedia applications
where the occasional deviation is not catastrophic and will likely not
even be noticed by the users. Just make sure:

a) all threads handling time and media are scheduled as realtime threads
b) if at all possible make it ONE thread with all the critical stuff
c) keep the code in that critical thread as short and fast as possible
d) reduce dynamic object allocations during runtime to the absolute
minimum - if possible allocate everything you need before you start
e) try to work lock free (otherwise you'll have regular priority
inversions; those are real fun!)


  Konrad




More information about the Interest mailing list