Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2000M.B. Ibáñez Lecture 14 Memory Management II Contiguous Allocation.

Similar presentations


Presentation on theme: "Fall 2000M.B. Ibáñez Lecture 14 Memory Management II Contiguous Allocation."— Presentation transcript:

1 Fall 2000M.B. Ibáñez Lecture 14 Memory Management II Contiguous Allocation

2 Fall 2000M.B. Ibáñez Single-Partition Allocation

3 Fall 2000M.B. Ibáñez Single-Partition Allocation Hardware Support I

4 Fall 2000M.B. Ibáñez Single-Partition Allocation Hardware Support II < + CPU Memory Limit register Relocation register Trap Addressing error

5 Fall 2000M.B. Ibáñez Multiple-partition Allocation Fixed Partitioning I Main memory is divided into a number of static partitions at system generation time. A process may be loaded into a partition of equal or smaller size. Simple to implement Little operating system overhead

6 Fall 2000M.B. Ibáñez Multiple-partition Allocation Fixed Partitioning II 8 M Operating System 8 M 12 M 8 M 6 M

7 Fall 2000M.B. Ibáñez Placement Algorithm with Partitions Equal size partitions Because all partitions are of equal size, it does not matter which partition is used If all partitions are occupied with processes that are not ready to run, then one of these processes must be swapped out to make room for a new process.

8 Fall 2000M.B. Ibáñez Difficulties of equal-size partitions A program may be too big to fit into a partition. In this case, the programmer must use the overlay technique. Internal fragmentation –Wasted space internal to a partition. Any program, no matter how small, occupies an entire partition.

9 Fall 2000M.B. Ibáñez Placement Algorithm with Partitions Unequal-size partitions Best-fit –can assign each process to the smallest partition within which it will fit –queue for each partition –processes are assigned in such a way as to minimize wasted memory within a partition

10 Fall 2000M.B. Ibáñez Placement Algorithm with Partitions Unequal-size partitions First-fit –Allocate the first hole that is big enough. Neither first-fit nor best-fit is clearly better in terms of storage utilization, but first-fit is generally faster

11 Fall 2000M.B. Ibáñez Difficulties with Unequal-size partitions The number of partitions specified at system generation time limits the number of active (not suspended) processes in the system Small jobs will not utilize partition space efficiently

12 Fall 2000M.B. Ibáñez One Process Queue per Partition New Processes Operating System

13 Fall 2000M.B. Ibáñez One Process Queue per Partition Operating System New Processes


Download ppt "Fall 2000M.B. Ibáñez Lecture 14 Memory Management II Contiguous Allocation."

Similar presentations


Ads by Google