Re: Multiple CPU and Load Average
- From: dj3vande@xxxxxxxxxxxxxxxxxxx (Dave Vandervies)
- Date: Sat, 20 May 2006 06:01:41 +0000 (UTC)
In article <Smwbg.65639$PH3.32603@xxxxxxxxxxxxxxxxxxxxx>,
Ignoramus23298 <ignoramus23298@xxxxxxxxxxxxxxxxxxxx> wrote:
Suppose, hypothetically, that I have a two CPU machine (or a dual
core machine).
Suppose further that there are two processes running, each an infinite
calculation loop (no swapping, I/O or network), each working 100% hard.
Suppose that everything else is idle.
What would be the load average, 1 or 2?
2. The load average is the average over the last N seconds of the
number of ready-to-run processes[1]; if you have two CPUs with one
process running on each and nothing else competing for cycles, that's
two processes.
(So if loadavg < #CPUs, you have CPU cycles that aren't getting used,
and if loadavg > #CPUs, you have idle processes that are ready to run
but waiting for a CPU to run on.)
dave
[1] It's usually reported as three different numbers calculated the same
way with three different values of N; the first one is the shortest
time, but I don't know off the top of my head exactly what the
intervals are.
--
Dave Vandervies dj3vande@xxxxxxxxxxxxxxxxxxx
DONT use gets at all. It really is a bug waiting to happen.Yes. (Except on one DOS box belonging to Dan Pop. <G>)
--Mark McIntyre and David Thompson in comp.lang.c
.
- Follow-Ups:
- Re: Multiple CPU and Load Average
- From: Aragorn
- Re: Multiple CPU and Load Average
- References:
- Multiple CPU and Load Average
- From: Ignoramus23298
- Multiple CPU and Load Average
- Prev by Date: Re: Multiple CPU and Load Average
- Next by Date: Re: Multiple CPU and Load Average
- Previous by thread: Re: Multiple CPU and Load Average
- Next by thread: Re: Multiple CPU and Load Average
- Index(es):
Relevant Pages
|
|