Contiguous Memory Allocation
- Process Management
- Memory Management
- Deadlocks
- OS Introduction & Fundamentals
- CPU Scheduling Algorithms
- Threads & Concurrency
- Inter-Process Communication (IPC)
- Process Synchronization
- Virtual Memory & Paging
- File Systems
- Disk Scheduling
- I/O Management
Giving Each Process One Single, Unbroken Block
Contiguous memory allocation gives each process one single, continuous block of physical memory - simple to address (just an offset from the block's starting point), but with meaningful limitations that later memory management techniques were built to solve.
Physical Memory:
+--------+------------+----------+--------+
| OS | Process A | Process B| (free) |
+--------+------------+----------+--------+
0 100k 300k 450k 512kBase and Limit Registers: Enforcing the Boundaries
The CPU uses a base register (where a process's block starts) and a limit register (how large that block is) to translate a process's own internal addresses into actual physical memory addresses, while also enforcing that a process can never access memory outside its own assigned block.
Process's own address: 50
Base register: 300k
Actual physical address: 300k + 50 = 300,050
If the process tried to access address beyond its limit register's range,
the hardware blocks it - preventing it from touching another process's memory.Why This Provides Real Memory Protection
Because every single memory access is checked against the limit register in hardware, a process simply cannot accidentally (or maliciously) read or write another process's memory - a fundamental protection guarantee that makes running multiple untrusted programs simultaneously actually safe.
The Core Limitation This Approach Has
Requiring one single unbroken block per process means memory can become fragmented over time as processes come and go, and a process's block size cannot easily grow if it needs more memory later - problems covered in depth in the fragmentation and partitioning notes that follow in this section.