4 ms·
Umm, no. While the memory stalled information could be valuable in optimizing a program, it is correct to count it as part of the CPU busy. Busy means the CPU
by kazinator 3y ago
Umm, no.
While the memory stalled information could be valuable in optimizing a program, it is correct to count it as part of the CPU busy.
Busy means the CPU was occupied with a task (other than the operating system's idle task), and thus not available for another task, regardless of how well or poorly it is making any sort of useful progress.
Just like you're busy at work even when you're wiping your monitor instead of coding.
Since "waiting for memory" isn't something handled by the scheduler (is not a scheduling wait), it just looks like any other non-scheduler-related busy.
A program can keep a CPU busy in multiple of ways such that there is no "utility" even in the absence of memory stalls. It might have a bug which causes it to loop infinitely. Or it could be a service application which is wrongly blowing through what should be a wait at the top of its loop.
In the days of multi-user systems at universities, administrations looked upon the running of game programs as a no-utility activity.
- blueflow 3y agoMemory stall means re-fetching an evicted or not-yet-faulted-in page from disk, so its disk I/O, which is done asynchronously and leaves the CPU available for another task.
- anonymoushn 3y agoThis is not what it means. Maybe you're thinking of page faults, which happen for this reason among other reasons.
- gpderetta 3y agoI would say that the article is really talking about cache misses, not page faults.
- kazinator 3y agoA page fault stall is visible to tools like top. A task waiting for a page to be faulted in so that it can continue is descheduled, and so 0% CPU. So I don't think that's what the article is talking about.
- scrubs 3y agoYes, true by definition. But the article is trying to look past the definition to see what's really going on. Nobody says top says I'm 99% busy so that's as good as it gets
- dralley 3y agoPlenty of people say that, unfortunately.