Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the semantics of Ada task priorities on Linux?

Background: I'm working on porting an Ada project from Vxworks to a Linux platform. The project heavily relies on usage of Ada's dynamic task priorities.

I've done a couple experiments which have left me confused. Ada task priorities seem to have no effect on the underlying Linux priority/niceness. Two identical tasks with different priorities take equally long to complete, even when pinned to one CPU core.

Question: What are the semantics of Ada tasks on Linux? Why am I seeing no effect from setting task priorities?

like image 468
mortelsson Avatar asked Sep 07 '25 17:09

mortelsson


1 Answers

I’m not up-to-date with Linux, but I remember that you could only change task priorities from the default if you ran the program as root. There may have been other conditions; getting dynamic priorities on Sparc Solaris was complicated.

The GNAT Reference Manual’s Specialized Needs Annexes section may claim that Annex D is fully implemented, and it’s certainly true that the code is present. However, 6 of the ACATS tests for Annex D fail on macOS, and the ACATS maintainer has said that the Annex D tests may not pass on non-specialised operating systems (sorry, can’t find the reference).

like image 138
Simon Wright Avatar answered Sep 10 '25 07:09

Simon Wright