Absolute code
If the final location is known, the compiler emits absolute addresses. Moving the program requires recompilation.
Least flexible
Code
Bhavya
Follow a program address from CPU to RAM, enforce protection with bounds, compare contiguous placement strategies and understand why paging removes external fragmentation.
Address binding maps program references to memory locations. The later binding occurs, the more freely the OS can move a process.
If the final location is known, the compiler emits absolute addresses. Moving the program requires recompilation.
Least flexibleThe compiler leaves relative addresses; the loader selects a physical region and completes relocation.
Move before executionHardware translates every reference while the program runs, allowing movement and virtual memory.
Most flexible; requires MMU supportSwitch between base/limit relocation, paging and segmentation. Each mode shows the formula and rejects an invalid reference rather than silently translating it.
The formula and protection decision will appear here.
—
Search from the beginning and stop immediately when a large enough hole appears.
Fast search; early memory may fragmentSearch all suitable holes and leave the smallest immediate remainder.
May create many tiny unusable holesPreserve medium-size holes by splitting the largest available region.
Large holes disappear quicklyTotal free memory may be sufficient, but it is divided into non-contiguous holes and no single hole fits the request.
Compaction can combine holes, but moving memory costs time.An allocated fixed-size unit is larger than the request, so unused space remains inside the assigned region.
Paging can create waste in the final page/frame.Choose a dataset, algorithm and process size. The lab highlights the selected hole and calculates the remaining holes.
Select an algorithm and process size.
p = floor(address / page size)
d = address mod page size
physical = f × frame size + d
A process’s frames need not be adjacent, so any free frame can hold any page.
The last allocated page may not be completely used.
Each process needs mappings and metadata; large address spaces require structured page tables.
A Translation Lookaside Buffer caches recent page-table entries to reduce translation cost.
The segment table stores a base and limit for each segment. If offset < limit, physical address = base + offset; otherwise the reference traps.
| Question | Paging | Segmentation |
|---|---|---|
| Unit size | Fixed-size pages and frames | Variable-size logical segments |
| Programmer view | Usually transparent | Matches code, data, stack and modules |
| Fragmentation | Internal possible; no external | External possible |
| Address parts | Page number + offset | Segment number + offset |
| Protection/sharing | Per page | Natural per logical segment |
| Modern use | Dominant basis of virtual memory | Ideas often combined with paging/protection regions |
Each option explains the exact address or fragmentation error.
Mark Level 8 after you can translate one paged address and distinguish internal from external fragmentation.
Saved only in this browser.