Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 25: Introduction to Memory Management

Similar presentations


Presentation on theme: "Lecture 25: Introduction to Memory Management"— Presentation transcript:

1 Lecture 25: Introduction to Memory Management

2 Overview of this course
OS is a resource manager Process/threads Deadlocks Memory Disk, i.e., file system

3 Memory Management Ideal World (for the programmer): Real World
I’m the only process in the world I have a huge amount of memory at my disposal Real World Many processes in the system Probably not enough memory for them all

4 Goal of Memory Management
Present the ideal world view to the programmer, yet implement it on a real system

5 Virtual address vs. physical address
Your program is compiled and linked Virtual address (also called absolute address)

6 Virtual address vs. physical address
Address to access memory of the machine

7 More detailed goals of memory management
Memory allocation A new process comes into memory Memory de-allocation A process leaves memory Address translation Virtual address to physical address Process isolation One process cannot access the memory of other processes

8 Memory management for different systems
Processes are known in advance and can fit in memory Embedded systems, e.g., radios, washing machines, and microwaves Processes are unknown in advance, memory might not be large enough Swapping Virtual memory

9 Processes are known in advance
Memory allocation Allocate a specific area to each process Memory de-allocation Do not really need to do anything

10 Why we need address translation
A 16 KB program, (b) another 16KB program (c) They are loaded consecutively in memory

11 Address translation Static address translation
Map virtual address to physical address when loading a process into memory Used when “processes are known in advance” Dynamic address translation Map virtual address to physical address at runtime

12 Process isolation Divide the memory into blocks
Each block has a protection key A process cannot access the memory whose protection key does not match


Download ppt "Lecture 25: Introduction to Memory Management"

Similar presentations


Ads by Google