| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 604 人关注过本帖
标题:关于挂进程的问题
取消只看楼主 加入收藏
束缚袭霜
Rank: 2
等 级:论坛游民
帖 子:21
专家分:30
注 册:2010-7-4
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:1 
关于挂进程的问题
请问,如果要挂起一个子进程及其子孙进程,要考虑哪些方面;

如果允许一个进程挂起其所有后裔进程而不是子进程,会有什么问题?
搜索更多相关主题的帖子: 进程 
2010-07-04 21:38
束缚袭霜
Rank: 2
等 级:论坛游民
帖 子:21
专家分:30
注 册:2010-7-4
收藏
得分:0 
感谢楼上的哥们了,不过抱歉不能给分了,我自己找了一篇文献。
--------------------------------------------------------------------------
process tree :
    root:S
    level 1 :A B C
    level 2: D E (belongs to A) F (belongs to B)
    level 3: G H (belongs to F)
--------------------------------------------------------------------------
   Let us say that process b wants to stop its child f. The purpose of doing this is to ensure that all program execution and input/output within the storage area of process f is stopped. Since a part of the storage area has been allocated to children of f, it is obviously necessary to stop not only the child  f but also all descendants of f. This is complicated by the fact that some of these descendants may already have been stopped by their own parents.
In the present example process g may still be running, while process h may have been stopped by its parent f. Consequently the monitor should only stop processes f and g.
Consider now the reverse situation, in which process b starts its child f again. Now the purpose is to reestablish the situation exactly as it was before process f was stopped. Thus the monitor must be very careful only to start those descendants of f that were stopped along with f. In our example the monitor must start processes f and g but not h. Otherwise we confuse f,which still relies on its child h being stopped.
Obviously,then,the monitor must distinguish between processes that are stopped by their parents and by their ancestors.

我是自学的,所以……
2010-07-05 13:28
快速回复:关于挂进程的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015357 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved