linux - 如何使用 Linux 调度程序将 CPU 核心限制为仅 2 个应用程序?

标签 linux linux-kernel scheduler scheduling

我想研究一个 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/

相关文章:

linux-kernel - 可以使用 MSI-X 设备设置 IRQ 关联(Linux)吗?

Cron 作业每 x 周和特定日期运行一次

java - 按优先级调度周期性线程

c# - Fluent Scheduler 未在特定时间运行

c - 在 C 中刷新 linux 串行缓冲区

linux - 如何在 MacOS/Ubuntu 中重新绑定(bind)套接字?第二次

python - 如何在 Linux 中截取屏幕截图(高 fps)(编程)

c++ - malloc 在 Linux 中挂起

linux-kernel - 覆盆子 3 : booting a Kernel by using U-Boot

c - 使用 insmod 时 undefined symbol