In modern operating systems theres a feature called processor affinity or CPU pinning.
This feature allows to bind a process to a particular CPU core(s).
In Linux you can pin a process to a particular CPU core(s) using taskset a command line tool to retrive or set processor affinity.
‘man taskset’ to get all the details.
While taskset bonds the specific process to a particular core or set of cores that does not warranties that the CPU not be used by other processes.
If you want to reserve a particular CPU to a particular process you have to add a kernel parameter to isolate the core(s) so the kernel will not use that core(s) to shcedulle any regular process.
The kernel parameter is “isolcpus=<CPU_ID>”