2017-12-26 23 views
10

ゾンビとプロセスの間に違いはありますか?私はこの2つが同じであると書かれているウィキペディアの記事を見つけました。その場合、同じプロセスのための2つの異なる条件を持つことが必要な理由:Linuxの場合ゾンビ対プロセスがありませんか?

https://en.wikipedia.org/wiki/Zombie_process

+0

何かの2つの言葉しか持たないのは、コンピュータビジネスの残りの部分に比べてかなり良いことです。データベース内のすべてに5つ以上の名前が付いていて、異なる単語に同じ単語を再利用することがよくあります。 https://askubuntu.com/questions/201303/what-is-a-defunct-process-and-why-doesnt-it-get-killed – chicks

答えて

7

「亡き」と「ゾンビ」プロセスは同じです。 man psから

<defunct>をマーク

プロセスは彼らの親がそれらを適切に破壊されていないため、残って死んだプロセス(いわゆる「ゾンビ」)です。これらのプロセスは、親プロセスが終了するとinit(8)によって破棄されます。

PROCESS STATE CODES 
    Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process: 
    D uninterruptible sleep (usually IO) 
    R running or runnable (on run queue) 
    S interruptible sleep (waiting for an event to complete) 
    T stopped by job control signal 
    t stopped by debugger during the tracing 
    W paging (not valid since the 2.6.xx kernel) 
    X dead (should never be seen) 
    Z defunct ("zombie") process, terminated but not reaped by its parent 
0

Zombiedefunctどちらも同じです。 ZOMBIEstate of the processのうちの1つで、defunctの状態がない場合、カーネルのソースコードから確認できます。それが終了しているが、まだをクリーンアップされていないところ

enum proc_state { 
    UNUSED, /*** processes in initial state **/ 
    EMBRYO, 
    SLEEPING, 
    RUNNABLE, 
    RUNNING, 
    ZOMBIE /** processes in final state **/ 
}; 

ゾンビ状態が意味しています。

マニュアルページを開くことができますproc(1)とこれを参照してください/proc/[pid]/statプロセスのステータス情報。これはps(1)によって使用されます。

関連する問題