Running different applications in parallel

Hey,
Is there a way to run different applications in parallel on the jetson?
For example, to run one application on the GPU and other application on number of CPU’s, all in parallel.
If possible, how it can be done?
Thanks.

Several applications can and do run in parallel. Those are processes, and the scheduler determines which core it runs on. They sometimes don’t run on the core you want since the scheduler has an understanding of cache, but forcing a program/process onto a particular core (if the scheduler doesn’t already do that) is the topic of “cpu affinity” (standard for most of Linux).

An individual program which has multiple threads can have multiple threads running in parallel. Once gain, the scheduler generally decides which core to run on, and it tends to stick to one core to help with cache hits and avoid cache misses. Processes are automatic and just running multiple programs puts them out there such that they run in parallel, but threads are something individual programs must be custom built for.

Incidentally, the scheduler is triggered by “interrupts”. Some are software interrupts, e.g., from a 1000 Hz timer, and others are hardware interrupts, driven by an actual wire from a peripheral. Something like an ethernet card will have a hardware interrupt, and activity will trigger that. Other drivers, which are purely software, e.g., something to run an algorithm on memory, have fewer requirements since they don’t need an actual wire. The reason it is important is that if you run an application dependent upon a wire, and if that wire only has access to the first CPU core, then it cannot migrate to other cores.

Look up “cpu affinity” and “multithreading”.

1 Like

Hi,
You can execute taskset to schedule a process to specific CPU core(s), please check
taskset(1) - Linux manual page

Generally a process cannot be 100% on GPU since it still requires CPU for flow control.

Thank linuxdev for the clear explanation.

Thank you!!

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