Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a 2-way set associative cache with 2... Start Learning for Free
Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks
(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)
is repeated 10 times. The number of conflict misses experienced by the cache is ___________. 
 
  • a)
    78
  • b)
    76
  • c)
    74
  • d)
    80
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Consider a 2-way set associative cache with 256 blocks and uses LRU re...
Ans.

Option (b)


View all questions of this test
Most Upvoted Answer
Consider a 2-way set associative cache with 256 blocks and uses LRU re...
To solve this problem, we need to analyze the given sequence of memory block accesses and determine the number of conflict misses experienced by the cache.

Given information:
- Cache is 2-way set associative with 256 blocks.
- Uses LRU (Least Recently Used) replacement policy.
- Initially, the cache is empty.

Step 1: Understanding the cache organization
In a 2-way set associative cache, each cache set consists of 2 blocks. The cache is divided into 128 sets (256 blocks / 2 blocks per set). Each memory block is mapped to a specific set using a hash function.

Step 2: Analyzing the memory block accesses

The given sequence of memory block accesses is as follows:
0, 128, 256, 128, 0, 128, 256, 128, 1, 129, 257, 129, 1, 129, 257, 129

Step 3: Determining the cache misses
We need to determine the number of conflict misses experienced by the cache. Conflict misses occur when multiple blocks contend for the same cache set.

Initially, the cache is empty, so the first access to each block will result in a compulsory miss.

Let's analyze the memory block accesses and track the cache contents for each access:

Access 1: Block 0 (Compulsory miss)
Cache: [0, -]

Access 2: Block 128 (Compulsory miss)
Cache: [0, 128]

Access 3: Block 256 (Compulsory miss)
Cache: [0, 128] -> [0, 128, 256]

Access 4: Block 128 (Conflict miss)
Cache: [0, 128, 256] -> [128, 256]

Access 5: Block 0 (Conflict miss)
Cache: [128, 256] -> [0, 256]

Access 6: Block 128 (Conflict miss)
Cache: [0, 256] -> [128, 256]

Access 7: Block 256 (Compulsory miss)
Cache: [128, 256] -> [128, 256, 256]

Access 8: Block 128 (Conflict miss)
Cache: [128, 256, 256] -> [128, 128, 256]

Access 9: Block 1 (Compulsory miss)
Cache: [128, 128, 256] -> [1, 128, 256]

Access 10: Block 129 (Compulsory miss)
Cache: [1, 128, 256] -> [1, 129, 256]

Access 11: Block 257 (Compulsory miss)
Cache: [1, 129, 256] -> [1, 129, 256, 257]

Access 12: Block 129 (Conflict miss)
Cache: [1, 129, 256, 257] -> [129, 256, 257]

Access 13: Block 1 (Conflict miss)
Cache: [129, 256, 257] -> [1, 256, 257]

Access 14: Block 129 (Conflict miss)
Cache: [1, 256, 257] -> [129, 256, 257]

Access 15: Block 257 (Conflict miss)
Cache: [
Explore Courses for Computer Science Engineering (CSE) exam

Similar Computer Science Engineering (CSE) Doubts

Top Courses for Computer Science Engineering (CSE)

Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer?
Question Description
Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer?.
Solutions for Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a 2-way set associative cache with 256 blocks and uses LRU replacement, Initially the cache is empty. Conflict misses are those misses which occur due the contention of multiple blocks for the same cache set. Compulsory misses occur due to first time access to the block. The following sequence of accesses to memory blocks(0,128,256,128,0,128,256,128,1,129,257,129,1,129,257,129)is repeated 10 times. The number of conflict misses experienced by the cache is ___________.a)78b)76c)74d)80Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev