Chinaunix首页 | 论坛 | 博客
  • 博客访问: 362634
  • 博文数量: 157
  • 博客积分: 3001
  • 博客等级: 中校
  • 技术积分: 1330
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-06 13:47
文章分类

全部博文(157)

文章存档

2011年(1)

2010年(28)

2009年(124)

2008年(4)

我的朋友

分类: WINDOWS

2009-10-20 13:00:46

In , starvation is a -related problem, where a is perpetually denied necessary . Without those resources, the program can never finish its task .

Starvation is similar in effect to . Two or more programs become deadlocked together, when each of them wait for a resource occupied by another program in the same set. On the other hand, one or more programs are in starvation, when each of them is waiting for resources that are occupied by programs, that may or may not be in the same set that are starving. Moreover, in a deadlock, no program in the set changes its state. There may be a similar situation called , where the processes changes their states continually, but cannot progress. Livelock is a special-case of starvation. In that sense, deadlock can also be said a special-case of starvation. Usually the problems in which programs are perpetually deprived of resources are referred as deadlock problems when none of them are changing their states and each of them is waiting for resources only occupied by programs in the same set. All other such problems are referred to as starvation.

Starvation is illustrated by 's .

The fault lies in the . The scheduling algorithm, which is part of the , is supposed to allocate resources equitably; that is, the algorithm should allocate resources so that no process perpetually lacks necessary resources.

Many operating system schedulers have the concept of process priority. A high priority process A will run before a low priority process B. If the high priority process (process A) never blocks, the low priority process (B) will (in some systems) never be scheduled - it will experience starvation. If there is an even higher priority process X, which is dependent on a result from process B, then process X might never finish, even though it is the most important process in the system. This condition is called a . Modern scheduling algorithms normally contain code to guarantee that all processes will receive a minimum amount of each important resource (most often time) in order to prevent any process from being subjected to starvation.

In computer networks, especially wireless networks, may suffer from scheduling starvation. An example is .

阅读(1210) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~