759 Views

Consider a small two-way set-associative cache memory, consisting of four blocks. For choosing the block to be replaced, use the least recently used (LRU) scheme. The number of cache misses for the following sequence of block addresses is: 8,12,0,12,8


Suparshv Jain 14th Feb, 2020
Answer (1)
S. Saha Student Expert 19th Mar, 2020

We have 4 blocks and 2 blocks in a set. There are 2 sets. So blocks will go to sets as follows:

Set Number 0  then 1 Block Number 0,8,12 (for first one)

Since the lowest bit of block address is used for indexing into the set, so 8,12 and 0 first miss in cache with 0 replacing 8 (there are two slots in each set due to 2−way set) and then 12 hits in cache and 8 again misses. So, totally 4 misses.

Related Questions

Amity University-Noida B.Tech...
Apply
Among top 100 Universities Globally in the Times Higher Education (THE) Interdisciplinary Science Rankings 2026
Narayana Business School MBA/...
Apply
Top 30 Private B-Schools Nationally and Top 3 in Gujarat | Highest CTC- 20 LPA | Average CTC- 8.4 LPA | 40% Pre-Placement Offers | 670+ Recruiters 
JAGSoM PGDM Admissions 2026
Apply
Highest CTC 51.38 LPA | Median CTC 10.32 LPA | Top 25% Average CTC 14.32 LPA
IFMR Graduate School of Busin...
Apply
UGC Approved Programs | Near 100% Placement Record | Up to 100% Scholarships | Highest CTC 21.32 LPA
Amity University-Noida Law Ad...
Apply
Among top 100 Universities Globally in the Times Higher Education (THE) Interdisciplinary Science Rankings 2026
Great Lakes Institute of Mana...
Apply
Globally Recognized by AACSB (US) & AMBA (UK) | 17.8 LPA Avg. CTC for PGPM 2025
View All Application Forms

Download the Careers360 App on your Android phone

Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile

150M+ Students
30,000+ Colleges
500+ Exams
1500+ E-books