How to change thread priority?

3 posts / 0 new
Last post
Joined: 10/18/2017
Posts: 13
How to change thread priority?

Hello everyone,

I am having some troubles with thread priorities.

I am running a pub/sub application on VxWorks and I notice that for each pub/sub that I run, 4 threads with priority 71 are created (named RTIOsapi).

I looked for it on the platform notes and I noticed that "71" is the THREAD_PRIORITY_ABOVE_NORMAL value for VxWorks.

I would like to change this value somewhere in the XML QoS file. I found out that there is a tag:




and I want to use it but I do not know where to put it in the XML file. It is a DataWriter/DataReader policy or what?

Thanks for your help,

- Luigi

Joined: 02/11/2016
Posts: 107



Two resources I recommend looking into are:

The QoS cheat-sheet (for a full guide you can look at the user's manual) 

And the threading model


In short:

RTI creates a few threads for its internal work.

The creation of some threads is dependent on the usage of some qos options (such as asynchronous publisher).

RTI uses a few other qos options to determine which threads are created, how many of them are created and what the priority of the different rti threads will be.


There are use-cases where one would want to give some (or all) of the rti threads higher priority than normal (those, I believe, are described both in the qos cheat-sheet as well as in the threading model link).


Good luck,



Joined: 10/18/2017
Posts: 13

Hi Roy,

thanks for your reply, I solved my doubts.

- Luigi