On 22/11/2007, Raj Mathur <[EMAIL PROTECTED]> wrote:
[snip]

> So to sum up:
>
> Times when the CPU is executing user code is counted in %user.
> Times when the CPU is executing a system call (or running any other
> kernel code) is counted in %system.
> Times when the CPU is waiting for some I/O to complete is counted
> in %iowait.


I'm not sure I understand this. When a process requests I/O, it is blocked
(or removed from ready queue) and CPU moves on to execute next process
in the ready-to-run-queue. When the I/O completes, an event wakes up the
blocked process(es).
A process may be waiting for its I/O while CPU executing some user code.
Does this time counted in %user or %iowait?

Times when the CPU is doing nothing is counted in %idle.
>
> Since the CPU must be doing one of these things at any time, the sum of
> these percentages will always be 100.

 [snip]

If %user and %iowait overlap, then why is the sum 100?

Or, is %iowait the time when there are no processes in ready-queue
because all of them are waiting for I/O? I think that is idle time and not
iowait time.

- Kazim Zaidi
Blog: http://tuxplayground.blogspot.com
_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Next Event: http://freed.in - February 22/23, 2008
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to