I'm using posix_spawn function in 1 parent process to call other executable files child processes. I want to dedicate some of those child processes exclusively to a cpu for each (I know I cannot dedicate 4 of them as the kernel and other processes are critical and they should run, but let's assume now for at least 1 or 2 processes).
I ran htop command and I saw that all the 4 cores are being used, but I want to be able to have more control in case I got hundreds of processes so I decide which can run fully.