Answer: 1536
To find the total size of the Translation Lookaside Buffer (TLB) in bytes, we can break down the calculation into three steps:
Step 1: Calculate the number of TLB entries
The TLB reach is the total amount of physical memory that can be mapped by the TLB at any given time. It is defined as:
TLB Reach=Number of TLB entries×Page Size
Given:
- TLB Reach=1 MB=220 bytes
- Page Size=4 KB=212 bytes
Number of TLB entries=212 bytes220 bytes=28=256 entries
Step 2: Calculate the size of a single TLB entry
Each TLB entry stores the following components:
- Process ID (PID): Given as 4 bits.
- Page Number (Virtual Page Number - VPN):
Virtual Address Space=64 GB=236 bytes
Page Offset=log2(4 KB)=12 bits
Page Number bits=36−12=24 bits
- Frame Number (Physical Frame Number - PFN):
Physical Address Space=1 GB=230 bytes
Frame Number bits=30−12=18 bits
- Control Field: Given as 2 bits.
Summing these up to find the total bits per TLB entry:
Size of one TLB entry=4 (PID)+24 (Page Number)+18 (Frame Number)+2 (Control Field)=48 bits
Converting this to bytes:
Size of one TLB entry=848 bits=6 bytes
Step 3: Calculate the total size of the TLB
Total TLB Size=Number of TLB entries×Size of one TLB entry
Total TLB Size=256×6 bytes=1536 bytes