Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does linux kill D status process during reboot?

Tags:

linux

reboot

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?

like image 858
user3064136 Avatar asked Dec 04 '13 03:12

user3064136


People also ask

What is D status in process on Linux?

State "D" (uninterruptible sleep) means that the process is in kernel space (in a system call), attempting to perform IO. These processes will not respond to signals (or SIGKILL) and cannot be debugged with gdb or pstack.

What signal will kill a process Linux?

The most common way to kill a process in Linux is by using 'CONTROL-C', when we press 'CONTROL-C' SIGINT signal is sent to the program and by default, the program terminates. The signal SIGINT is also called a Interrupt signal or key.

How kill all ongoing process in Linux?

There are two commands used to kill a process: kill – Kill a process by ID. killall – Kill a process by name.


1 Answers

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!

like image 122
jim mcnamara Avatar answered Oct 10 '22 15:10

jim mcnamara