/dev/zero
and /dev/null
are pseudo-devices. So there's no physical device behind them.
If I do
dd if=/dev/zero of=/tmp/zeroes
then top
does show me dd
in the D status. However it does spend a lot of it's time in R (in CPU time). top
will simply sample the process table and consequently you may need to watch it for some time in order to see transient states.
I suspect for your tar example above that the amount of time outputting to stdout is negligible compared to the disk time. Note also that outputting to stdout will also involve the windowing system writing and whilst it's doing that the process will be sleeping. e.g. I'm running yes
right now, and the majority of the work is being performed by my X server. The yes
process is sleeping for most of the time I'm watching it (via top
)