11.7.25

Contiguous and non Contiguous Memory Allocation

Contiguous and Non-Contiguous Memory Allocation

Contiguous Memory Allocation

  • Definition: Allocating a single block of memory that is contiguous in physical address space.
  • Advantages:
    • Efficient use of cache memory.
    • Faster memory access times.
  • Disadvantages:
    • Limited flexibility.
    • May lead to fragmentation.

Non-Contiguous Memory Allocation

  • Definition: Allocating multiple blocks of memory that are not contiguous in physical address space.
  • Advantages:
    • More flexible memory allocation.
    • Reduced fragmentation.
  • Disadvantages:
    • More complex memory management.
    • May lead to slower memory access times.

Comparison

  • Contiguous allocation is suitable for applications that require fast memory access and have predictable memory requirements.
  • Non-contiguous allocation is suitable for applications that require flexible memory allocation and have varying memory requirements.

Techniques

  • Paging: A technique used for non-contiguous memory allocation, where memory is divided into fixed-size blocks called pages.
  • Segmentation: A technique used for non-contiguous memory allocation, where memory is divided into variable-size blocks called segments.

No comments:

Post a Comment

Difference between File and Folder

10 Differences Between Files and Folders Definition: File: A collection of data or information stored on a computer. ...