Reserve core and set priority

I have a real-time application that has multiple threads and processes. How do I reserve CPU cores and set priorities on Jetson AGX Orin development kit.

Hi,
Please try
Assigning specific CPU cores to system processes (using cpuset systemfile) - #4 by DaneLLL

I like to assign priorities and cores within the python3 code. Tried psutil, os.nice and these do not work on Jetson AGX Orin. I am new to this coding. Is there a tutorial that can show me how to do it? Thanks.