OS 6 MemoryManagement
OS 6 MemoryManagement
ECEG-5202
MEMORY MANAGEMENT
Outline
▪Introduction
▪Memory partitioning
▪Paging
▪Segmentation
Multiprogramming system
◦ “User” part of memory must be further subdivided to accommodate
multiple processes
◦ The sub-division is carried out dynamically by OS
=> Memory management
◦ If only a few processes can be kept in main memory, then much of the time
all processes will be waiting for I/O and the CPU will be idle
◦ The holes , which are formed in main memory are called external
fragmentation
◦ Solution
◦ Compaction
◦ Shifts processes so they are contiguous and all free memory is in one block
◦ Note
◦ Compaction implies the need for a dynamic relocation capability
◦ Must be possible to move a program from one region to another in main
memory without invalidating the memory references in the program
◦ This process is repeated until the smallest block greater or equal to S is generated
◦ Two buddies are joined whenever both of them become unallocated
When a process enters the running state, the address of its segment table is
loaded into a special register used by the memory management hardware