Can I reserve CPU cores for my own processes?

Hi,
Is it possible to make the whole operating system on the Jetson to run on only one CPU core, so that I have the remaining cores available for my special real time processing?

And can I define for interrupts (like GPIO interrupts) on which core it should run?

Hi,
You can refer to this topic to add isolcpus in extlinux.conf:
How to re-enable CPU Cores after isolcpus

And call taskset(1) - Linux manual page to schedule processes to specific CPU cores.

When I isolated a few cores (using isolcpus), how can I start a thread on one of the isolated cores using C++?

Hi,
This would need other users to share experience. We know how to run a process on a specific CPU core. Not have much experience about assigning a thread to a specific core.

You may use taskset. See Allow only one proccess to run on specific core - #6 by Honey_Patouceul.

I manged to switch off one core using the isolcpus like described.

Can I now start a thread using a C++ program that has been started by some kernel thread and make this thread run on the isolated core?

Or is it only possible using taskset to create a process that runs on the isolated core?

I have a OpenCV program and I would like to run the loop that processes the images on this isolated thread.

Hi,
We have searched online and found this information:
multithreading - How do I specify which core a pthread is spawned on - Unix & Linux Stack Exchange

Please take a look and see if you can apply it for a try.

The sched_setaffinity() works perfectly!
Thx.

1 Like

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