并发进程的饥饿问题
2014-10-22 14:35
127 查看
本文转载至:/article/1418490.html
什么是进程的饥饿和饿死?
在一个动态系统中,资源请求与释放是经常性发生的进程行为.对于每类系统资源,操作系统需要确定一个分配策略,当多个进程同时申请某类资源时,由分配策略确定资源分配给进程的次序。 资源分配策略可能是公平的(fair),能保证请求者在有限的时间内获得所需资源;资源分配策略也可能是不公平的(unfair),即不能保证等待时间上界的存在。 在后一种情况下,即使系统没有发生死锁,某些进程也可能会长时间等待.当等待时间给进程推进和响应带来明显影响时,称发生了进程饥饿(starvation),当饥饿到一定程度的进程所赋予的任务即使完成也不再具有实际意义时称该进程被饿死(starve
to death)。
考虑一台打印机分配的例子,当有多个进程需要打印文件时,系统按照短文件优先的策略排序,该策略具有平均等待时间短的优点,似乎非常合理,但当短文件打印任务源源不断时,长文件的打印任务将被无限期地推迟,导致饥饿以至饿死。
当等待时间给进程的推进和相应带来明显的影响时,就称发生了进程饥饿。当饥饿到一定程度的进程所赋予的任务即使完成也不再具有实际意义时,称该进程被饿死。
当一组进程到达时,CPU根据算法进行进程调度。有的进程因此而需要等待,而不能及时得到资源,这就叫饥饿。进程得到资源时,再完成已经不再具有意义,这就叫做饿死。
Starvation is simply when a process or service is not being serve, even when there is no deadlock on the system.
This is an example I just made up just for clarification purposes.
Imagine an algorithm that control computers access to a WAN or something like that. This algorithm could have a policy that says "Provide priority access to those computers that will use less bandwidth.", that will seem like a proper policy, but then what happens
when a single computer wants to access the network for an ftp upload that will send several GB somewhere. With this policy alone, that computer will starve since the algorithm will never select that computer, since there will be always other computers requesting
smaller bandwidth usage.
That is called starvation.
参考:http://stackoverflow.com/questions/1162587/what-is-starvation
什么是进程的饥饿和饿死?
在一个动态系统中,资源请求与释放是经常性发生的进程行为.对于每类系统资源,操作系统需要确定一个分配策略,当多个进程同时申请某类资源时,由分配策略确定资源分配给进程的次序。 资源分配策略可能是公平的(fair),能保证请求者在有限的时间内获得所需资源;资源分配策略也可能是不公平的(unfair),即不能保证等待时间上界的存在。 在后一种情况下,即使系统没有发生死锁,某些进程也可能会长时间等待.当等待时间给进程推进和响应带来明显影响时,称发生了进程饥饿(starvation),当饥饿到一定程度的进程所赋予的任务即使完成也不再具有实际意义时称该进程被饿死(starve
to death)。
考虑一台打印机分配的例子,当有多个进程需要打印文件时,系统按照短文件优先的策略排序,该策略具有平均等待时间短的优点,似乎非常合理,但当短文件打印任务源源不断时,长文件的打印任务将被无限期地推迟,导致饥饿以至饿死。
当等待时间给进程的推进和相应带来明显的影响时,就称发生了进程饥饿。当饥饿到一定程度的进程所赋予的任务即使完成也不再具有实际意义时,称该进程被饿死。
当一组进程到达时,CPU根据算法进行进程调度。有的进程因此而需要等待,而不能及时得到资源,这就叫饥饿。进程得到资源时,再完成已经不再具有意义,这就叫做饿死。
Starvation is simply when a process or service is not being serve, even when there is no deadlock on the system.
This is an example I just made up just for clarification purposes.
Imagine an algorithm that control computers access to a WAN or something like that. This algorithm could have a policy that says "Provide priority access to those computers that will use less bandwidth.", that will seem like a proper policy, but then what happens
when a single computer wants to access the network for an ftp upload that will send several GB somewhere. With this policy alone, that computer will starve since the algorithm will never select that computer, since there will be always other computers requesting
smaller bandwidth usage.
That is called starvation.
参考:http://stackoverflow.com/questions/1162587/what-is-starvation
相关文章推荐
- 并发进程的饥饿问题
- 多进程同时访问文件并发问题解决方法
- 利用epoll和多进程解决高并发问题
- 一种并发服务器关于进程的问题
- 多进程之读写并发问题
- 进程、线程知识点总结和同步(消费者生产者,读者写者三类问题)、互斥、异步、并发、并行、死锁、活锁的总结
- php文件锁(进程锁)解决少量并发问题
- 进程并发执行问题
- 网络编程三---多线程/进程解决并发问题
- python多进程并发中,解决数据共享问题Value+Array
- 进程并发与互斥性问题小结
- 进程、线程知识点总结和同步(消费者生产者,读者写者三类问题)、互斥、异步、并发、并行、死锁、活锁的总结
- 高并发编程-05-活跃性问题-死锁,活锁,饥饿
- (原创)使用TimeStamp控制并发问题[示例]-.cs脚本
- 写多进程程序碰到的一个问题
- 求助 .net 进程问题
- (原创)使用TimeStamp控制并发问题[示例]-创建后台数据库脚本
- 关于释放ASPNET进程的内存占用问题.
- 请求帮助:如何解决烦人的VS.NET2003编译时“无法将程序集复制到文件,另一个程序正在使用,进程无法访问”的问题?
- (原创)使用TimeStamp控制并发问题[示例]-页面HTML脚本