我想研究一个 CPU 核心上两个应用程序之间的交互,一个是持久应用程序(NVM 驻留),另一个是常规应用程序(DRAM 驻留)。为此,我只想将这 2 个应用程序安排在一个核心上,而不是其他任何东西。我正在寻找 Linux 调度程序来完成此任务。有人可以帮助我实现这一目标吗?我可以使用 sched 实现此目的吗?还是我需要修改内核的调度程序代码,以便调度程序不会将应用程序调度到我感兴趣的核心。
最佳答案
您可以使用 isolcpus
内核命令行参数:
This option can be used to specify one or more CPUs to isolate from the general SMP balancing and scheduling algorithms. You can move a process onto or off an "isolated" CPU via the CPU affinity syscalls or cpuset.
关于linux - 如何使用 Linux 调度程序将 CPU 核心限制为仅 2 个应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66978381/