Chapter 9 - Real Memory Organization and Management: 2004 Deitel & Associates, Inc. All Rights Reserved
Chapter 9 - Real Memory Organization and Management: 2004 Deitel & Associates, Inc. All Rights Reserved
Management
Outline
9.1 Introduction
9.2 Memory Organization
9.3 Memory Management
9.4 Memory Hierarchy
9.5 Memory Management Strategies
9.6 Contiguous vs. Noncontiguous Memory Allocation
9.7 Single-User Contiguous Memory Allocation
9.7.1 Overlays
9.7.2 Protection in a Single-User System
9.7.3 Single-Stream Batch Processing
9.8 Fixed-Partition Multiprogramming
9.9 Variable-Partition Multiprogramming
9.9.1 Variable-Partition Characteristics
9.9.2 Memory Placement Strategies
9.10 Multiprogramming with Memory Swapping
Objectives
1
9.1 Introduction
2
9.2 Memory Organization
Figure 9.1 Microsoft Windows operating system memory requirements.
3
9.4 Memory Hierarchy
• Main memory
– Should store currently needed program instructions and data
only
• Secondary storage
– Stores data and programs that are not actively needed
• Cache memory
– Extremely high speed
– Usually located on processor itself
– Most-commonly-used data copied to cache for faster access
– Small amount of cache still effective for boosting performance
• Due to temporal locality
4
9.5 Memory Management Strategies
5
9.7 Single-User Contiguous Memory Allocation
6
9.7.1 Overlays
9.7.1 Overlays
Figure 9.4 Overlay structure.
7
9.7.2 Protection in a Single-User Environment
8
9.7.3 Single-Stream Batch Processing
9
9.8 Fixed-Partition Multiprogramming
Figure 9.6 Processor utilization on a single-user system. [Note: In many single-user
jobs, I/O waits are much longer relative to processor utilization periods indicated
in this diagram.]
• Fixed-partition multiprogramming
– Each active process receives a fixed-size block of memory
– Processor rapidly switches between each process
– Multiple boundary registers protect against damage
10
9.8 Fixed-Partition Multiprogramming
Figure 9.7 Fixed-partition multiprogramming with absolute translation and loading.
11
9.8 Fixed-Partition Multiprogramming
Figure 9.8 Memory waste under fixed-partition multiprogramming with absolute
translation and loading.
12
9.8 Fixed-Partition Multiprogramming
• Protection
– Can be implemented by boundary registers, called base and limit
(also called low and high)
13
9.8 Fixed-Partition Multiprogramming
14
9.9 Variable-Partition Multiprogramming
15
9.9.1 Variable-Partition Characteristics
16
9.9.1 Variable-Partition Characteristics
17
9.9.1 Variable-Partition Characteristics
Figure 9.15 Memory compaction in variable-partition multiprogramming.
18
9.9.2 Memory Placement Strategies
Figure 9.16 First-fit, best-fit and worst-fit memory placement strategies (Part 1 of 3).
19
9.9.2 Memory Placement Strategies
Figure 9.16 First-fit, best-fit and worst-fit memory placement strategies (Part 3 of 3).
20
9.10 Multiprogramming with Memory Swapping
Figure 9.17 Multiprogramming in a swapping system in which only a single process at
a time is in main memory.
21