http://wiki.debian.org.tw/index.php?page=top

這是台灣 DebianWiki 的專屬討論版,如果您對 Debian Wiki 目前的狀況有疑問或是任何建議,歡迎在此版提出討論。

http://wiki.debian.org.tw/index.php?page=top

文章訪客 » 週日 2月 15, 2004 5:08 am

暫時以這樣的討論為之?

http://wiki.debian.org.tw/index.php?page=top 中提到
代碼: 選擇全部
Zombie:指該子程序已當掉但是父程序卻無知無覺的 Process。


事實上不一定是子程序當掉,是父程序未收到子程序終止 "single",或是父程序無法或不願或無意收回終止子程序。也就是如果父程序直接停止卻未對子程序進行處理,那麼子程序即成為 zombie process aka orphan process.

因此「子程序」會持續存放在 process table 中,直到「子程序」終止。

大部份設計良好具家庭倫理概念之程式不會拋家棄子,因此絕大部份的 zombie process 均是由於檔案系統或是其他資源存取問題存在。

請問這樣的看法是否有誤?
訪客
 

re:http://wiki.debian.org.tw/index.php?page=top

文章palmpilote » 週日 2月 15, 2004 11:06 am

好像不是很正確
下面這段是從LatinoMixed來的
You cannot kill it because it already is dead. That is why it is called
a zombie. ;^)

To be technical, a zombie process is one that already has terminated via
an exit() system call or uncaught signal. In order for it to "go away"
(be removed from the process table, its parent must do a wait() system call
or one of its variants.

The ultrasecret reason for this is that the zombie contains some statistics
on the process such as the exit status (why it died) and CPU time used that
must be returned to the parent and this is stored in -- guese where --
the zombie's per-process structure. This is why it cannot be removed until
the parent does a wait() on it.

Sometimes a parent fails to do the wait(), usually due to a programming
bug. Any old C program can do a fork() and not do the wait() and cause this.
It used to be a problem with shell scripts doing "foo&" and never waiting back
in the dark days of older UNIX systems.

不過我不知道該怎樣把他用中文說的更簡單明瞭 :ooops:
圖檔
看啥?沒看過貓有五條腿的嗎?
http://palmpilote.twbbs.org
個人blog啟動
頭像
palmpilote
快樂的大學生
快樂的大學生
 
文章: 524
註冊時間: 週四 10月 17, 2002 4:01 pm
來自: 笨呆星球


回到 debian wiki

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客