On Fri, 16 Sep 2005, Amos Shapira wrote:

> On 9/16/05, Ez-Aton <[EMAIL PROTECTED]> wrote:
> >
> >
> > Usually I/O bound proccesses would have the flag D when viewed using either
> > `ps` or `top`. The D is for "Delayed", which means the proccess waites for
>
> "D" is for "Device", i.e. the process is waiting on some device.

not realy. the 'D' state means that the processes is in an
UN-interruptible sleep state. this usually means that it's in part of the
code where the kernel's data structures were put in a transient state, and
if the process was simply put to sleep ('S' state), it oculd be awoken
pre-maturely, and cause the kernel's internal structures to be messed up.

in some situations, programmers use the 'D' state because they are too
lazy to handle the pre-mature awakening and roll-back the transaction. in
other cases, it's done to avoid probable bugs.

there's no need to wait for I/O to get into 'D' state - all a process
needs to do is try to take a semaphore using a non-interruptible kernel
API ('down' instead of 'down_interruptible').

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to