How does a CPU idle (or run below 100%)?

前端 未结 4 1738
猫巷女王i
猫巷女王i 2021-01-02 09:46

I first learned about how computers work in terms of a primitive single stored program machine.

Now I\'m learning about multitasking operating systems, scheduling, c

4条回答
  •  温柔的废话
    2021-01-02 10:42

    If speaking about x86 architecture when an operating system has nothing to do it can use HLT instruction. HLT instruction stops the CPU till next interrupt. See http://en.m.wikipedia.org/wiki/HLT for details.

    Other architectures have similar instruction to give CPU a rest.

提交回复
热议问题