Paging Addressing: Logical vs Physical Bits and Page Table Size
In a paging memory-management scheme, a logical (virtual) address is split into a keywordpage number and a keywordpage offset. The keywordframe number in the physical address is used to access the corresponding keywordframe containing that offset.
Given:
- Physical memory size: bytes
- Page size: bytes
- Logical address space: pages
We compute: (i) logical address bits, (ii) frame size, (iii) physical address frame bits, and (iv) number of page table entries.
Key idea:
- Offset bits are determined solely by page/frame size: bytes offset is bits.
- Logical address bits = bits for page number + bits for offset.
- Physical address bits = bits for frame number + bits for offset.
Virtual Memory Paging: Address Translation Basics
Computing the components
We will use the standard relation:
- Number of pages (logical) =
- Page offset bits =
Then:
- Virtual address page-number bits =
- Virtual address total bits =
- Physical frame bits depend on number of frames:
- Total frames = physical memory / frame size =
- Frame-number bits =
Also:
- Page table entries = number of logical pages = .
Step-by-step address bit calculation
- 1Step 1
Page size is bytes, so the offset within a page requires bits.
- 2Step 2
Logical address space has pages, so the page number requires bits.
- 3Step 3
Logical address bits = page-number bits + offset bits = .
- 4Step 4
In paging, each frame holds exactly one page, so frame size equals page size = bytes.
- 5Step 5
Number of frames = , so frame-number bits = .
- 6Step 6
A page table has one entry per logical page, so entries = .
Bit breakdown (virtual vs physical)
Offset is fixed by page size; page/frame number bits depend on page/frame counts.
Answers (i)–(iv) in one place
Pro Tip: Offset bits never change
Once the page size is fixed, the page offset always uses exactly bits. That’s why both virtual and physical addresses share the same offset-width.
Watch out for confusing address-space size vs number of pages
Here the prompt gives logical address space as pages (not bytes). Always convert page counts into bits using \log_2(\text{#pages}), then add the offset bits.
Address translation lifecycle in paging
Split virtual address
1Use page number and page offset (offset width = 10 bits)."
Page table lookup
2Index the page table with the page number to retrieve the frame number."
Form physical address
3Combine frame number with the same offset to create the physical address."
Paging essentials: quick checks
Knowledge Check
Given page size bytes, how many bits are in the page offset?
Explore Related Topics
Contiguous Memory Allocation: Understanding the Correct Statement
Inverted Page Table
An inverted page table (IPT) is a global paging structure that keeps one entry per physical frame, recording the virtual page, process ID, and status bits, thus reducing page‑table memory.
- Fields: frame index, VPN, PID/ASID, control bits, hash/link.
- Entries = Physical memory ÷ page size (e.g., ).
- Lookup uses PID + VPN key; hashing and TLB hide most cost.
- Benefit: memory usage depends on frames, not on all virtual pages.
- Cost: slower translation than direct indexing; relies on hashing/TLB.
Integrated Diagram: TLB and Cache Operations for a Logical/Virtual Address