1. Introduction

In CPU scheduling, achieving high performance is important, but ensuring fairness among processes is equally critical. Some scheduling algorithms are designed to optimize metrics such as waiting time, turnaround time, or throughput. However, these optimizations can sometimes lead to situations where certain processes receive little or no CPU time.

This fairness issue introduces two important concepts:

  • Starvation — the problem

  • Aging — the solution

Starvation occurs when a process waits indefinitely because other processes continuously receive preference. Aging is a scheduling technique designed to prevent this by gradually increasing the priority of waiting processes.

These concepts are particularly important when studying:

  • Priority Scheduling

  • Shortest Job First (SJF)

  • Shortest Remaining Time First (SRTF)

  • Multilevel Queue Scheduling

A proper understanding of starvation and aging helps explain how operating systems balance efficiency with fairness.

2. Starvation

2.1 Definition

Starvation is a condition in which a process waits indefinitely for CPU allocation because other processes continuously receive preference.

Formally:

Starvation occurs when a process remains in the ready queue for an unbounded period of time without ever being scheduled for execution.

The process is neither blocked nor terminated.

It is ready to execute but never receives CPU time.

Key Observation

Ready To Run
      ↓
Never Selected
      ↓
Waits Forever

This distinguishes starvation from other delays.

A starved process is capable of running but is repeatedly overlooked by the scheduler.

Why Starvation Matters

A scheduling algorithm may appear efficient because:

  • CPU utilization is high

  • Throughput is high

  • Average waiting time is low

Yet some processes may never complete.

Therefore:

Starvation is fundamentally a fairness problem rather than a performance problem.

2.2 Why Starvation Occurs

Starvation generally occurs when a scheduling algorithm consistently favors certain processes over others.

This usually happens when selection is based on:

  • Priority

  • Burst time

  • Queue level

rather than fairness.

2.2.1 Starvation in Priority Scheduling

Priority Scheduling always selects:

The highest-priority process.

Suppose:

ProcessPriority
P11
P22
P310

Assume:

Lower Number
       ↓
Higher Priority

The scheduler repeatedly chooses:

P1
P2

while P3 continues waiting.

Now suppose new high-priority processes keep arriving:

P4 Priority 1

P5 Priority 2

P6 Priority 1

Then:

P3 Never Executes

This is starvation.

Visualization

Ready Queue

P1 (High)
P2 (High)
P3 (Low)

New High Priority Process Arrives

P4 (High)

P3 Still Waiting

Over time:

Waiting Time → Infinite

2.2.2 Starvation in SJF and SRTF

Shortest Job First and Shortest Remaining Time First always favor shorter processes.

Suppose a long process arrives:

Long Process = 50 units

Before it executes, shorter jobs continue arriving:

2 units
1 unit
3 units
1 unit
2 units

The scheduler repeatedly chooses the shorter jobs.

Result:

Long Process Never Executes

This creates starvation for long-running processes.

Example

Ready Queue

Long Job

Short Job

Scheduler chooses:

Short Job

New short job arrives:

Another Short Job

Again selected.

The long process remains waiting indefinitely.

2.2.3 Starvation in Multilevel Queue Scheduling

In Multilevel Queue Scheduling:

System Queue
      ↑

Interactive Queue
      ↑

Batch Queue

If fixed-priority scheduling is used between queues:

System > Interactive > Batch

and the higher-priority queues are always busy,

then:

Batch Queue Never Executes

Processes in lower-priority queues become starved.

2.3 Illustration of Starvation

Consider the following conceptual scenario.

Initial Queue

Long Job

Before it executes:

Short Job Arrives

Scheduler selects:

Short Job

Again:

Another Short Job Arrives

Scheduler selects:

Short Job

This repeats indefinitely.

Conceptual Timeline

Time →

Short Job
     ↓

Short Job
     ↓

Short Job
     ↓

Short Job
     ↓

...

Meanwhile:

Long Job Waiting

forever.

This is the essence of starvation.

2.4 Effects of Starvation

Starvation has several negative consequences.

Unfair CPU Allocation

Certain processes receive CPU repeatedly while others receive none.

This violates scheduling fairness.

Process Never Completes

A starved process may remain in memory indefinitely.

Example:

Arrival Time = 0

Completion Time = Never

Resource Waste

The starved process may continue holding:

  • Memory

  • Open files

  • System resources

without making progress.

Reduced System Reliability

Users expect processes to eventually complete.

Starvation breaks this expectation.

Poor User Experience

Example:

User Starts Program
      ↓
Program Never Runs

The system appears unresponsive or broken.

2.5 Key Insight

The most important observation is:

Starvation is a fairness problem, not a performance problem.

A system may show:

High CPU Utilization

High Throughput

Low Average Waiting Time

and still suffer from starvation.

Therefore:

Efficient ≠ Fair

Operating systems must consider both.

3. Aging

3.1 Definition

Aging is a scheduling technique used to prevent starvation by gradually increasing the priority of processes that have waited for a long time.

The central idea is:

The longer a process waits, the more important it becomes.

Eventually its priority becomes high enough that the scheduler must select it.

Thus:

Waiting Time ↑
      ↓
Priority ↑

This ensures that no process waits forever.

3.2 Working Mechanism

Aging continuously adjusts process priorities based on waiting time.

Suppose a process initially has:

Priority = Low

After waiting:

Priority = Medium

After more waiting:

Priority = High

Eventually:

Process Scheduled

Conceptual Flow

Time →

Low Priority
      ↓

Medium Priority
      ↓

High Priority
      ↓

Executed

The process becomes increasingly difficult for the scheduler to ignore.

Example

Suppose:

Initial Priority = 10

Every 5 seconds:

Priority = Priority − 1

Thus:

10 → 9 → 8 → 7 → 6 ...

Eventually:

Priority = 1

and the process executes.

3.3 Implementation Techniques

Operating systems can implement aging in several ways.

Priority Increment at Fixed Intervals

Example:

Every 10 ms

Increase Priority

This is the most common approach.

Priority Boosting

After waiting beyond a threshold:

Priority Boost

is applied.

This accelerates execution.

Dynamic Priority Adjustment

Many schedulers continuously recalculate priorities using:

  • Waiting time

  • CPU usage

  • Process behavior

This provides more adaptive scheduling.

Priority Reset After Execution

Once a process receives CPU time:

Priority Restored

to prevent unfair domination.

3.4 Key Property of Aging

The most important property of aging is:

Every process eventually receives CPU time.

Because priority continually improves:

Waiting Time Cannot Grow Forever

Therefore:

Starvation Eliminated

This makes aging one of the most important fairness mechanisms in operating systems.

4. Starvation vs Aging

FeatureStarvationAging
TypeProblemSolution
PurposeNonePrevent starvation
EffectProcess never executesProcess eventually executes
Occurs InPriority, SJF, SRTF, MLQUsed to improve fairness
FocusFairness issueFairness enhancement
ResultInfinite waitingBounded waiting

Relationship

Starvation
      ↓
Problem
      ↓
Aging
      ↓
Solution

Aging was specifically developed to address starvation.

5. Real-World Perspective

Modern operating systems rarely use purely static priorities.

Instead, they use:

Dynamic Priorities

which automatically adjust over time.

This prevents starvation while maintaining responsiveness.

Aging in Priority Schedulers

Most priority schedulers periodically increase the priority of waiting processes.

Benefits:

  • Fairness

  • Predictable execution

  • Reduced starvation

Aging in Multilevel Feedback Queue (MLFQ)

MLFQ uses aging extensively.

Processes waiting too long in lower queues are promoted upward.

Example:

Queue 3
   ↓
Queue 2
   ↓
Queue 1

Eventually the process reaches a queue where it receives CPU time.

Modern Operating Systems

Modern schedulers generally incorporate:

  • Dynamic priorities

  • Priority boosting

  • Aging-like mechanisms

to ensure long-waiting processes are not ignored indefinitely.