How does linux kill D status process during reboot?
Asked Answered
P

2

9
I know ths D status processes is uninterruptable sleep processes. 

Many people say to kill D status processes is to reboot the system. But how does reboot operation can kill the D status processes?

I find "init 0" will "kill -9 " all of the processes at last. But "kill -9 " can not kill D status process.

Someone tell me how?

Pantisocracy answered 4/12, 2013 at 3:29 Comment(0)
U
9

It does not kill them at all. Those processes in D state will not respond to any signal. kill generates signals -- they cannot be delivered to these processes. So, no kill.

The loss of process context when the kernel stops running allows nothing to persist, processes are kernel objects. The state D processes become history at that point.

If you see this often it usually means some kind of hardware problem, like a cdrom/DVD device. The D state means the process is blocking on some uninterruptable operation on a device.

This is a good question!

Unipolar answered 4/12, 2013 at 3:43 Comment(2)
Thanks for you answer! When the kernel stops running, all of the resource is released, include the processes!Pantisocracy
+1 , for the answer. I had the same question, and I thought that the answer might be something like "When we send SIGKILL to D state Process, Kernel blocks it , so that process will not get the signal. While rebooting, Kernel sends SIGKILL to all processes and D state process also terminates." Now you have given an alternate answer. Any reference for this will be very useful.Ripping
A
-1

I use the yum update command to kill the D state process.

Apollonius answered 4/1, 2019 at 10:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.