10

When a computer is not running at full load, in the context of Linux, what does it actually do? Between scheduled threads, if there is nothing to do, does it spin wait? Does it enter some sleep state?

When a computer reports it is at 20% load, does that actually mean (give or take) that it does nothing 80% of the time?

1
  • 1
    it does nothing a lot more than that, probably. but don't worry, those spare cycles are in the bank. Commented Aug 27, 2014 at 12:57

1 Answer 1

7

Yep, your processor does a NOP (No Op) or HLT

Linux uses an idle process. This task does nothing but sends HLT and makes the CPU use less power and heat while there is nothing to do. Then when there is work to be done the CPU "comes back on" and does work.

Now, keep in mind that the Linux scheduler will do "any work it can" before that point. This HLTing also happens very quickly.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.