KERNELSCOPE X / OS LABORATORY / MODULE 05

MEMORY
INTELLIGENCE.

See how an address moves from a logical page into a physical frame. Then make First Fit, Best Fit and Worst Fit compete for the same memory. Explore the CPU's translation cache and visualize fragmentation, one step at a time.

EDUCATIONAL SIMULATOR — NOT LIVE WINDOWS RAM DATA. The separate C++ desktop app monitors actual Windows resource metrics.

ADDRESS TRANSLATION / SAMPLE TRACESIMULATED
LOGICAL1500
PHYSICAL9692
PAGE 1OFFSET 476FRAME 9
LOGICAL
0
1
2
3
FRAMES
5
9
1
12

Page size 1024 bytes · Page 1 → Frame 9

PAGE → FRAME ✳ LOGICAL ≠ PHYSICAL ✳ TLB CACHE ✳ EXTERNAL FRAGMENTATION ✳ MEMORY MANAGEMENT

01 / TRANSLATION ENGINE

PAGING IN MOTION.

Four valid page-table entries from your lecture. Try any logical address and watch the page, offset and physical frame resolve—or fail safely.

VIRTUAL MEMORY CONFIGPAGE SIZE = 1024 B
TRY AN ADDRESS
PAGE TABLE / PRESENT ENTRIES
LOGICAL PAGEPHYSICAL FRAME
ADDRESS FORMULA physical = frame × 1024 + offsetpage = floor(logical / 1024); offset = logical mod 1024
ADDRESS PATH VISUALIZERREADY
01 / LOGICAL ADDRESS1500
02 / PAGE NUMBER1
03 / OFFSET476
04 / FRAME NUMBER9
LOGICAL SPACE PHYSICAL FRAME MAP
PHYSICAL ADDRESS9692Page 1 maps to frame 9. The offset 476 remains unchanged.
TRANSLATION LOOKASIDE BUFFERLRU · 3 ENTRIES

A tiny cache for page translations.

The TLB stores recently used page-to-frame mappings. A hit avoids a page-table lookup. A miss consults the page table and inserts the entry, evicting the least recently used mapping if full. This is a simplified TLB model.

HITS0
MISSES0
HIT RATE0%
TRANSLATION LOGLOCAL SESSION

Try addresses 0, 1024, 2048, 1024 and 0 to observe cache hits and LRU replacement. Invalid pages cannot be translated.

02 / MEMORY ALLOCATOR

THREE STRATEGIES.
ONE WORKLOAD.

Modify the available holes and request sizes, then step through allocations. Each colored block shows an actual computed placement and the free space left behind.

Comma-separated positive integers
In order: P1, P2, P3, P4 ...
Ready. The first request is P1 = 212 KB.
COMPARISON / SAME WORKLOADSEQUENTIAL ALLOCATION
PROCESSSIZEFIRST FITBEST FITWORST FIT

A process must fit within a single contiguous free segment. Total free memory alone does not guarantee placement; small scattered holes cause external fragmentation. This model does not compact or coalesce holes because no deallocations occur.

03 / SHOW YOUR PROFESSOR

DON'T JUST
MEMORIZE IT.

Make a prediction, test it, and explain the result. The exercises use your lecture's numbers so they're easy to verify.

CHALLENGE / 01

THE MISSING PAGE

Why does logical address 5000 fail, although the numeric address looks valid?

CHALLENGE / 02

THE 959 KB PARADOX

First Fit leaves 959 KB free after P1–P3. Why can't it place a 426 KB process?

CHALLENGE / 03

WHY CACHE TRANSLATIONS?

How can address translation stay fast without consulting the page table on every memory reference?

BUILT FOR DEMONSTRATION

REAL OS THEORY.
VISUAL PROOF.

RUN IT AGAIN ↑ BACK TO KERNELSCOPE X ↗