Is it possible set to thread priority in c++ on jetson tx2 jetpack 4.4?

Is it possible set to thread priority in c++ on jetson tx2 jetpack 4.4?
I have a c++ project. My project to consist of multiple deep learning model. I set a thread for each deep learning model. I want to set priority every thread.
When I tried to assign a thread, I saw that I couldn’t.
Does Jetson TX2 (Jetpack 4.4 - linux-tegra-r32.4.3)) support to set thread priority in c++?

Moving this topic to the Jetson TX2 category for better visibility.

Hi,
In Linux, there is function for setting priority of each process:
setpriority(3): get/set nice value - Linux man page

For multiple threads in single process, you probably need to handle the priority by adding delay/sleep.

when I set schedular type FIFO or RR for each thread it seems okey. But when check the schedular type (in c code or terminal) , it seems did not change. So , as my undestanding, changing the schedular type to one of these is not support by l4t kernel , to do that do i need to real-time patch which begin to supported from 32.5 or newer version of l4t kernel.

Also i want to ask, l4t kernel built on linux generic kernel?

Hi,
r32 releases are based on kernel 4.9 and you can check the version by executing:

nvidia@tegra-ubuntu:~$ uname -r
4.9.253-tegra

If you would like to customize and build kernel, please refer to
Kernel Customization

Do i need to install real-time patch to set priority of thread in my code. I don’t want to use nice value. I want to change scheduler type and set priority.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.