A Memory Abstraction: Address Spaces

Overview
Memory Management Requirements
Memory Management Techniques

There is rarely enough memory to actively hold all code and data structures needed by running processes in memory at any given point of time. The idea is to swap in and out blocks of code as they are required from secondary memory.

Swapping

Fixed Partitioning
Main memory is divided into static partitions. Any process, given its requirements may be loaded into a partition of equal or greater size.
Note that here processes are not divided into modules, rather memory is divided and entire processes are placed inside a partition.

Partitions may be of two types :

  1. Equal Sized
    If program size is beyond that of the partition size, need overlays
    Gives rise to internal fragmentation
  2. Unequal Sized
    Fit into smallest possible partition


Dynamic Partitioning

Here, partitions are created dynamically as per the requirement/size of the process in question.

Paging
Simple Segmentation
Quiz
  1. The key difference between fixed and dynamic partitioning is
    1. fixed partition sizes are fixed while dynamic partition sizes are determined at runtime depending on size of process
    2. fixed paritioning is done once while dynamic partitioning is done multiple times
    3. fixed partitoning involves disk while dynamic partitioning involves memory
    4. None of the above
  2. An executing process perceives
    1. physical address
    2. logical memory address
    3. disk address
    4. None of the above
  3. Which of the following causes internal fragmentation
    1. swapping(dynamic partitioning)
    2. swapping(fixed partitioning)
    3. segmentation
    4. paging
Answers

1. a; 2. b; 3. b;