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

前端 未结 4 1752
猫巷女王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:38

    The answer is that is depends on the hardware, the operating system and the way that the operating system has been configured.

    And it could involve either or both of the strategies you proposed.

    Another possibility for machines based on the x86 architecture, is that x86 has an HLT instruction that causes the core to stop until it receives an external interrupt. So the "Idle" task could simply execute HLT in a tight loop.

提交回复
热议问题