Question:medium

A system has a Translation Lookaside Buffer (TLB) that has a reach of \(1\) MB. TLB reach is defined as the total amount of physical memory that can be accessed through the TLB entries. The paging system uses pages of size \(4\) KB. The virtual address space is \(64\) GB and physical address space is \(1\) GB. If each TLB entry stores a \(4\)-bit process id, page number, frame number, and a \(2\)-bit control field, then the size of the TLB (in bytes) is ______. (answer in integer)

Note: \(1K=2^{10}\), \(1M=2^{20}\), \(1G=2^{30}\)

Show Hint

Find the number of TLB entries from reach divided by page size, and the entry size from adding the process id, page number, frame number, and control bits.
Updated On: Jul 22, 2026
Show Solution

Correct Answer: 1536

Solution and Explanation

Step 1: Work out the size of one TLB entry first.
An entry needs to identify a process, $4$ bits, a virtual page, a physical frame, and carry $2$ control bits. Let's find the two unknowns.

Step 2: Bits for the page number, from the virtual address space.
Virtual space is $64$ GB, pages are $4$ KB, so the number of distinct pages is
\[ \frac{64\times2^{30}}{4\times2^{10}} = \frac{2^{36}}{2^{12}} = 2^{24} \]
so $24$ bits are needed to number a page uniquely.

Step 3: Bits for the frame number, from the physical address space.
Physical space is $1$ GB, and frames match the $4$ KB page size, so the number of frames is
\[ \frac{1\times2^{30}}{4\times2^{10}} = \frac{2^{30}}{2^{12}} = 2^{18} \]
so $18$ bits are needed for the frame number.

Step 4: Add every field of one entry in bits, then convert to bytes.
\[ 4\ (\text{pid}) + 24\ (\text{page}) + 18\ (\text{frame}) + 2\ (\text{control}) = 48 \text{ bits} \]
Since $8$ bits make a byte, one entry takes
\[ \frac{48}{8} = 6 \text{ bytes} \]

Step 5: Now find how many entries the TLB holds, from its reach.
TLB reach tells us how much memory the TLB can cover if fully used, which equals the number of entries times the page size, so
\[ \text{entries} = \frac{\text{TLB reach}}{\text{page size}} = \frac{1\text{ MB}}{4\text{ KB}} = \frac{2^{20}}{2^{12}} = 2^{8} = 256 \]

Step 6: Multiply entry size by entry count for the total TLB size.
\[ \text{TLB size} = 256 \times 6 = 1536 \text{ bytes} \]
\[ \boxed{1536 \text{ bytes}} \]
Was this answer helpful?
0


Questions Asked in GATE CS exam