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: \(1\mathrm{K}=2^{10}\), \(1\mathrm{M}=2^{20}\), \(1\mathrm{G}=2^{30}\)

Show Hint

First use TLB reach and page size to get the number of TLB entries. Then use virtual address space and physical address space (divided by page/frame size) to get the widths of the page number and frame number fields. Add process id + page number + frame number + control bits to get one entry's size in bytes, then multiply by the number of entries.
Updated On: Aug 3, 2026
Show Solution

Correct Answer: 1536

Solution and Explanation

This question can be solved by breaking the TLB into 'how many entries' and 'how big is each entry,' then multiplying the two.

Finding the entry count: The TLB reach tells us how much physical memory the TLB can cover in one shot. Since reach = entries \(\times\) page size, we get:

\[entries = \frac{1\,MB}{4\,KB} = \frac{2^{20}}{2^{12}} = 2^8 = 256 \text{ entries}\]

Finding the width of each field in an entry:

  • Process id field: given directly as 4 bits.
  • Page number field: must be wide enough to represent every possible virtual page. With a 64 GB virtual space and 4 KB pages, there are \(2^{36}/2^{12} = 2^{24}\) distinct pages, so this field needs 24 bits.
  • Frame number field: must be wide enough to represent every possible physical frame. With a 1 GB physical space and 4 KB frames, there are \(2^{30}/2^{12} = 2^{18}\) distinct frames, so this field needs 18 bits.
  • Control field: given directly as 2 bits.

Adding up one entry's width:

\[4 + 24 + 18 + 2 = 48 \text{ bits} = 6 \text{ bytes per entry}\]

Scaling up to the whole TLB: multiply the per-entry size by the number of entries computed from the reach:

\[256 \times 6 \text{ bytes} = 1536 \text{ bytes}\]

So the TLB occupies a total of \(1536\) bytes.

Was this answer helpful?
0


Questions Asked in GATE CS exam