Starvation

From COMP15212 Wiki
Revision as of 13:43, 4 August 2019 by pc>Yuron
Depends on ProcessesResources

(Resource) starvation is often linked with deadlocks in that it can (potentially) cause progress to stop. However this is really more of a scheduling issue.

A process is ‘starved’ if it can’t get some resource(s) which it needs to proceed. This can be caused by other processes competing for (and winning) the resource.

Example: A printer spooler picks the next job by queuing users alphabetically: Aaron is happy with the service but Zachary has a long wait at busy times.   This example is clearly fixable with a fairer scheduling algorithm, such as one based on a FIFO queue.

One of the possible resources is processor time. In an interactive system it is important that the process scheduler is able to give some time even to low-priority tasks. (They may get a smaller share than the higher priority processes.) Effective priority may therefore be raised as a process ‘ages’.

On the other hand, a real-time system should ‘finish’ all its pending jobs and go idle periodically, in which case this should guarantee starvation cannot occur. (As long as the assumptions are really true.)


Also refer to: Operating System Concepts, 10th Edition: Chapter 5.3.4, pages 213


Articles on IO
Cacheability • Device Drivers • Direct Memory Access (DMA) • IO • Interprocess Communication • Interrupt Controller • Interrupt Service Routines (ISRs) • Interrupts • Libraries • Peripheral devices • Pipes • Queues • Queues Extra • Resources • Shell • Sockets • Spooling and Buffering • Starvation • Streams • System Calls • Thrashing • Timers • Using Peripherals • Virtualisation • Write Buffer
Articles on Deadlock
Atomicity • Deadlock • File Locking • Locks • Multi Threading • Multiprocessors • Mutual exclusion • Operation Ordering • Race Conditions • Reentrancy • Semaphores • Starvation • Threads
Articles on Processes
About this resource • Atomicity • Containers • Context • Context Switching • Daemons • Fork Unix • Hypervisor • Idle • Interprocess Communication • Multi Threading • Mutual exclusion • Pipes • Pointer Arithmetic • Process Control Block (PCB) • Process Priority • Process Scheduling • Process States • Processes • Queues • Queues Extra • Race Conditions • Real Time • Resources • Scheduler • Signal and Wait • Sleep • Starvation • Synchronisation • Thrashing • Threads • Unix Signals