Soft real-time – additional considerations

A few additional points to think about: we have the power to associate threads with a (soft) real-time policy and priority (with the caveat that we have root access; or the CAP_SYS_NICE capability). For most human interactive application domains this is not only unnecessary, but it will cause disconcerting feedback and side effects to the typical desktop or server system end user. As a general rule, you should avoid using these real-time policies on interactive applications. Only when it is essential to highly prioritize a thread—typically for a real-time application (perhaps running on an embedded Linux box), or some kinds of benchmarking or profiling software (perf(1) being a good example; one ...

Get Hands-On System Programming with Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.