Question:

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
collegedunia
Verified By Collegedunia

Correct Answer: 1536

Solution and Explanation

Step 1: Find the number of entries in the TLB from its reach.
TLB reach means the amount of memory reachable if every TLB entry is used, so
\[ \text{TLB reach} = (\text{number of TLB entries})\times(\text{page size}) \]
\[ \text{number of entries} = \frac{1\text{ MB}}{4\text{ KB}} = \frac{2^{20}}{2^{12}} = 2^{8} = 256 \]

Step 2: Find how many bits are needed for the page number.
The page number must be able to identify any page in the entire virtual address space. The virtual address space is \(64\) GB and each page is \(4\) KB, so the number of virtual pages is
\[ \frac{64\text{ GB}}{4\text{ KB}} = \frac{2^{36}}{2^{12}} = 2^{24} \]
so the page number field needs \(24\) bits.

Step 3: Find how many bits are needed for the frame number.
The frame number must identify any physical frame, and since frames are also \(4\) KB, matching the page size, the number of physical frames is
\[ \frac{1\text{ GB}}{4\text{ KB}} = \frac{2^{30}}{2^{12}} = 2^{18} \]
so the frame number field needs \(18\) bits.

Step 4: Add up the size of one TLB entry.
One entry stores a \(4\) bit process id, a \(24\) bit page number, an \(18\) bit frame number, and a \(2\) bit control field:
\[ 4+24+18+2=48 \text{ bits} = \frac{48}{8}=6 \text{ bytes} \]

Step 5: Multiply by the number of entries.
\[ \text{TLB size} = 256\times6=1536 \text{ bytes} \]

Step 6: Final answer.
\[ \boxed{1536} \]
Was this answer helpful?
0
0

Top GATE CS Operating System Questions

View More Questions