0

I am emulating qemu for linux x86-64. In qemu virtual machine, I am using

taskset -c 0 prc1 & taskset -c 1 prc2 & taskset -c 2 prc3 &  taskset -c 3 prc4;

to simultaneously issue 4 processes and bind them to four cores (prc is short for process). However, I find that once they start running; then afterwards, in-between, some cores (say 1 and 2) do not execute those processes but either idle or do something else. Can you suggest, what could be the reason for this or a way of improvement so that, I can make sure processes don't migrate from one core to another.

4

1 回答 1

1

这些过程不会从一个核心迁移到另一个核心。每当他们需要 CPU 时,他们只会获得您绑定到的核心。这不会阻止 CPU 做其他工作,也不会以某种方式强制进程使用内核,即使它无法运行,比如因为它正在等待 I/O。

于 2012-01-10T01:18:24.600 回答