Question Details

Consider a system with the following cache configuration:
Block size = 128 bytes
Physical memory size = 223 bytes
Cache size = 213 bytes.
Two cache organizations are used:
1. A direct-mapped cache with tag size = m bits.
2. Ak-way set associative cache with tag size = n bits where k = 2L, L ∈ {1,2,3,....}.
Which of the following relations between n and m is / are correct?

Options

A

n = m- L

B

n = m + L

C

n = mL

D

n = m + k

Show Answer
Correct Answer
B n = m + L

Solution :

The correct option is n = m + L.

Step-by-step Explanation:

1. Determine the address bits from the physical memory and block size:
The physical memory size is given as 223 bytes. Therefore, the total number of physical address bits is 23 bits.
The cache block size is 128 bytes, which can be written as:

Block size = 128 bytes = 2 7 bytes

This means the block offset requires 7 bits.

2. Direct-Mapped Cache Configuration (Tag size = m bits):
The cache size is given as 213 bytes. The number of blocks in the cache is calculated as:

Number of blocks = Cache size Block size = 2 13 2 7 = 2 6

In a direct-mapped cache, the number of index bits is log2(Number of blocks) = 6 bits.
The physical address structure for a direct-mapped cache is partitioned as:
Physical Address (23 bits) = Tag (m bits) + Index (6 bits) + Block Offset (7 bits)

m = 23 - ( 6 + 7 ) = 10 bits

3. k-way Set Associative Cache Configuration (Tag size = n bits):
Here, the associativity is k = 2L. The number of sets in the cache is:

Number of sets = Number of blocks k = 2 6 2 L = 2 6 - L

Thus, the set index requires 6 - L bits.
The physical address structure for a set-associative cache is partitioned as:
Physical Address (23 bits) = Tag (n bits) + Set Index (6 - L bits) + Block Offset (7 bits)

n = 23 - ( 6 - L + 7 )

n = 23 - 13 + L

n = 10 + L

4. Relating n and m:
Since m = 10, we can substitute it into the expression for n:

n = m + L

This matches the correct relation.

Transparent Access on Mindyard

Built for Learners & Educators Alike

Completely free for students. Educators & coaching institutes get 2 months free Pro trial to create tests.

FREE FOR STUDENTS

Practice & Learn Free for Students

Access unlimited practice questions, detailed step-by-step solutions, and exam study materials — completely free for students.

  • Unlimited mock tests & question bank practice
  • Full access to curated study library & formula notes
  • 100% free for students • No credit card required
2 MONTHS FREE TRIAL

Educators & Coaching Institutes

Create and conduct professional online assessments with AI question generation, tab proctoring, and comprehensive batch management.

  • AI question uploader & rapid test generator
  • Anti-cheating tab proctoring & performance reports
  • Full Pro access free for 60 days • No upfront commitment
Discover more resources

You may also like

Mock Tests

View All
  • GATE
  • beginner
  • 3 hours
  • civil engineering

Prepare for GATE 2026 Civil Engineering with the latest question papers, previous year papers, detailed solutions, syllabus, exam pattern, preparation tips, mock tests, and subject-wise study material. Download GATE 2026 CE question papers with solutions in PDF format and boost your preparation for top engineering institutes and PSU recruitment.

  • GATE
  • beginner
  • 3 hours
  • electronics and communication engineering

Prepare effectively for GATE 2026 Electronics & Communication Engineering (EC) with this comprehensive Question Paper with Solutions. This resource includes detailed explanations, concept-wise solutions, previous year paper analysis, and exam-oriented practice to help aspirants strengthen core subjects like Electronic Devices, Analog Circuits, Digital Circuits, Signals & Systems, Network Theory, Control Systems, Electromagnetics, Communications, and more. Perfect for revision, self-assessment, and boosting your GATE 2026 EC preparation strategy.

Ask AI Tutor
5 left
Q1 View Question & Options
AI Tutor is solving this question...
Reading question context & options...
Ask your own doubt or choose a quick prompt: