Step 1: Understand the problem.
Given:
- The CPU generates 32-bit virtual addresses.
- The page size is 4 KB (which is \( 2^{12} \) bytes).
- The TLB holds 128 entries and is 4-way set associative.
Step 2: Calculate the number of bits required for the page offset.
Since the page size is 4 KB, the number of bits needed for the page offset is:
\[
\text{Page offset bits} = \log_2(4 \, \text{KB}) = 12 \, \text{bits}.
\]
Step 3: Calculate the number of sets in the TLB.
The TLB is 4-way set associative and can hold 128 entries, so the number of sets in the TLB is:
\[
\text{Number of sets} = \frac{128}{4} = 32 \, \text{sets}.
\]
The number of bits required to index the sets is:
\[
\text{Set index bits} = \log_2(32) = 5 \, \text{bits}.
\]
Step 4: Calculate the number of bits for the tag.
The total address length is 32 bits, and we have already used 12 bits for the page offset and 5 bits for the set index. Thus, the remaining bits are for the tag:
\[
\text{Tag bits} = 32 - 12 - 5 = 15 \, \text{bits}.
\]
Step 5: Conclusion.
Thus, the minimum size of the TLB tag is 15 bits, and the correct answer is (d).
In the design of a control unit of a processor, two common approaches are used: hardware control and microprogrammed control. Consider the following statements:
I. Hardware control units are generally faster but more difficult to modify than microprogrammed control units.
II. In a horizontal microprogrammed control unit, each control signal has a separate bit in the control word.
III. Vertical microprogramming leads to longer control words but provides greater parallelism.
IV. Microprogrammed control units are typically easier to implement and modify than hardware control units.
How many triangles are there in the figure given below? 