Operating System Memory Management: Principles and Techniques
Classified in Computers
Written on in
English with a size of 2.2 KB
Memory Management Objectives
- Compare operating system types based on memory management.
- Analyze machine performance based on demand paging and memory allocation.
Fundamentals of Memory Management
Main memory is a linear array of storage locations, each one byte in size.
- Access Time: The duration between the start and end of a read or write operation.
- Memory Cycle Time: The hardware-imposed delay between the end of one operation and the start of the next.
- Address: Physical memory is a sequence of bytes or words, each with a unique address for direct access.
Types of Operating Systems
- Naked Machine: A computer lacking an operating system.
- Dedicated Memory: A system where the programmer directly accesses and manages hardware memory.
- Resident Monitor: Early operating systems divided memory into two areas: one for the user and one for the resident OS portion, known as the monitor.
Memory Protection and Address Mapping
Memory protection ensures the monitor and user programs share memory safely.
- Address Remapping: Once the OS is initialized, a register indicates the boundary for loading user programs.
- Static Reallocation: Performed during compilation or program loading.
- Dynamic Reallocation: Occurs during program execution.
- Physical Address Space (MR): The OS establishes correspondence between relative and actual addresses.
Memory Partitioning Strategies
Fixed Partitions
Memory is divided into fixed-size partitions. This leads to fragmentation (wasted memory):
- Internal Fragmentation: Caused by the size difference between the partition and the resident object.
- External Fragmentation: Caused by wasted memory between partitions.
Variable Partitioning
To address the drawbacks of fixed partitions, variable partitioning allows jobs to occupy only as much space as needed.