Can a zombie process get scheduled?

Since zombie processes are processes having all resources freed but still existing in process table because their parent might ask for their return status, is it a separate state in Linux like ready, waiting etc. or is it just like normal waiting process in the table and can be scheduled also?


Once the Linux (or UNIX) process enters the ‘Z’ state as indicated by the command:

ps aux | grep Z

That process is essentially dead and will not receive any further CPU clock allocation from the kernel scheduler, EXCEPT to pass a last-gasp dying breath of an exit code value back to the parent (if that parent is still around).

It is suspended because it has an exit code that is awaiting for a parent process to pick up. Often times, the parent process also went away as well, so such zombie process can only then be killed to free up additional resources.

It happens because child process dies and parent does not react on this event properly. Conventionally, parent must call waitpid or wait function to obtain child’s exit status. At this moment zombie disappears. However, some programs either forget to call waitpid, either do it some time later.

Such process can only be killed.

(Source: )

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *