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

如果允许一个进程挂起其所有后裔进程而不是子进程,会有什么问题?
搜索更多相关主题的帖子: 进程 
2010-07-04 21:38
hangeng
Rank: 2
等 级:论坛游民
帖 子:424
专家分:39
注 册:2007-7-23
收藏
得分:7 
首先考虑挂起后  会不会有调用冲突

  雨水冲不进窗来,在玻璃上痛哭。但它至少奋斗过。
2010-07-04 22:14
kingsroot
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
威 望:1
帖 子:284
专家分:1159
注 册:2010-3-28
收藏
得分:7 
首先你得把占用的系统资源释放掉(尤其是那些其他进程要用的),最严重的可能就是整个系统的进程都死锁了 ~~~~
2010-07-05 12:24
束缚袭霜
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.020342 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved