Introduction
Every running program needs to live in main memory (RAM) to be executed by the CPU. But RAM is small, expensive and shared by many processes at once. Memory management is the part of the operating system (OS) that decides how to divide RAM among processes, how to keep them isolated from one another, and how to give each process the illusion of a large, private address space. Paging and Segmentation are the two classic techniques that make this possible.
For BCS, Bank IT, and IT-officer written and viva exams, this topic is a guaranteed scorer. Examiners love it because it mixes crisp definitions (page, frame, MMU, TLB), sharp comparisons (paging vs segmentation, internal vs external fragmentation) and small numeric problems (address translation, number of pages, page-table size). If you master the address-translation arithmetic, you can answer almost any MCQ on it in seconds.
Learning Objectives
After studying this lesson you will be able to:
- Explain the difference between logical (virtual) and physical addresses and why the distinction exists.
- Describe contiguous allocation and why it causes external fragmentation.
- Define paging, the roles of pages, frames, the page table and the MMU, and translate a logical address to a physical address by hand.
- Explain internal fragmentation and how page size affects it.
- Describe the TLB (Translation Lookaside Buffer) and compute effective memory access time (EMAT).
- Define segmentation, the segment table, base and limit, and translate a segmented address.
- Compare paging and segmentation and explain paged segmentation (segmentation with paging).
- Avoid the classic exam traps around fragmentation, bit-splitting and table sizing.