I remember back in '99 when Richard Kilgore wrote:
> On Fri, Sep 24, 1999 at 11:09:22AM -0500, David Smith wrote:
> > how does the cpu keep busy?  i thought that memory
> > reads out at half the speed of the cpu and of course
> > the hdd is much worse.  what about those big programs
> > that can't fit in the cache?  am i missing something?
> 
> You won't get a load of 1.0 from a single process when it's data
> doesn't fit well in the cache.  Well, if you do anyway, I would
> tend to think of that implementation as broken.

In a sense, you are right about the implementation being broken.
Since the cache issues are more-or-less transparent to the OS,
the kernel is not aware of the timing differences.  To the 
kernel, a process is using the CPU when it's not waiting on
another process, waiting on I/O, or swapped out.  It may
not be executing instructions the whole time (stalled pipeline
on cache misses) or executing instructions as fast as
it possibly could (not all execution units busy), but
the CPU is "in use."

To address questions liek Richard's, you usually have to use
things like CPU-internal counters (cache misses, pipeline stalls,
...).  There are quite a few neat tools out there for doing
this sort of thing under linux, but you'd have to look
back over the Linux kernel list to find where they are.
The linux-mm (memory management subsystem discussion) mailing
list is supposed to be very interesting for this sort of
discussion as well.

Anyway, hope someone finds this interesting.  :-)

                Matt

-- 
/* Matt Sayler -- [EMAIL PROTECTED] -- atwork?astronomy:cs
   http://www.cs.utexas.edu/users/mpsayler   -- (512)471-7450
   Have you ever imagined a world with no hypothetical situations? */
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to