• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
June 30, 2022 |4.2K Views
Worst Fit algorithm in Memory Management
  Share   Like
Description
Discussion

Worst Fit allocates a process to the partition which is largest sufficient among the freely available partitions available in the main memory. If a large process comes at a later stage, then memory will not have space to accommodate it.

Example:

Input : blockSize[]   = {100, 500, 200, 300, 600};
       processSize[] = {212, 417, 112, 426};
Output:
Process No.    Process Size    Block no.
  1        212        5
  2        417        2
  3        112        5
  4        426        Not Allocated


Program for Worst Fit algorithm in Memory Management : https://www.geeksforgeeks.org/program-worst-fit-algorithm-memory-management/

Read More