Resource Allocation Techniques for Processes (original) (raw)

Last Updated : 15 Apr, 2026

Multiple processes run simultaneously and compete for resources like CPU, memory, and I/O devices. The OS manages these resources efficiently, ensuring smooth execution and fair allocation among processes.

There are two major resource allocation techniques:

1. Resource Partitioning Approach

In the resource partitioning approach, the operating system divides all available resources into fixed partitions before program execution begins. Each resource partition is treated as a bundle of resources, such as:

**Note: The OS assigns one resource partition to each user program before execution. Once allocated, that program uses only the resources within its assigned partition.

Working

  1. The OS defines several resource partitions at system boot time.
  2. Each partition contains a set of resources.
  3. The Resource Table records all partitions, their components and their allocation status - Allocated or Free.
  4. When a program starts, it is assigned one entire partition.
  5. After the program terminates, its partition is marked Free for reuse.

Example Resource Table

Resource Type Total Allocated Free
Memory (MB) 8 5 3
Disk Blocks 100 75 25
Printers 2 1 1

**Note: Here, each partition (P1, P2, P3) groups multiple resources. At system boot, this Resource Table is initialized and maintained by the OS.

Advantages of Resource Partitioning

Disadvantages of Resource Partitioning

**Example: If a partition contains 2 MB memory but a program only uses 1 MB, the remaining 1 MB remains idle.

2. Pool-Based Approach

Unlike the rigid partitioning approach, the pool-based approach maintains a common pool of resources. Whenever a program requests a resource, the OS dynamically allocates it from the resource pool if available. When the program finishes or releases the resource, it is returned to the pool for reuse.

Working

  1. All resources are kept in a shared pool.
  2. Each resource’s status (free or allocated) is tracked in the Resource Table.
  3. When a process requests a resource: The OS checks its availability in the table. If available, it is allocated to the requesting process.
  4. Once released, the resource’s status is updated back to Free in the table.

Example Resource Table

Resource Type Total Allocated Free
Memory (MB) 8 5 3
Disk Blocks 100 75 25
Printers 2 1 1

**Note: Whenever a process requests memory or an I/O device, the OS dynamically checks this table to allocate available resources.

Advantages of Pool-Based Approach

Disadvantages of Pool-Based Approach

Comparison - Partitioning vs Pool-Based Approach

Criteria Resource Partitioning Pool-Based Approach
Allocation Time Before program execution During program execution
Flexibility Rigid and static Dynamic and adaptive
Resource Utilization May waste unused resources Efficient usage of all resources
Overhead Low High
Implementation Complexity Simple Complex
Scalability Limited Scalable
Use Case Embedded or static systems Modern multitasking OS