Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider a 2-way set associative cache memory... Start Learning for Free
Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from the
current job?
0 5 3 9 7 0 16 55
  • a)
    0 3 5 7 16 55
  • b)
    0 3 5 7 9 16 55
  • c)
    0 5 7 9 16 55
  • d)
    3 5 7 9 16 55
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider a 2-way set associative cache memory with 4 sets and total 8 ...
128 main memory blocks are mapped to 4 sets in cache. So, each set maps 32 blocks each. And in each set there is place for two blocks (2-way set).
Now, we have 4 sets meaning 2 index bits. Also, 32 blocks going to one set means 5 tag bits.
Now, these 7 bits identify a memory block and tag bits are placed before index bits. (otherwise adjacent memory references- spatial locality- will hamper cache performance)
So, based on the two index bits (lower 2 bits) blocks will be going to sets as follows:
Since, each set has only 2 places, 3 will be throw out as its the least recently used block. So, final content of cache will be
0 5 7 9 16 55
(C) choice.
View all questions of this test
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 memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. Can you explain this answer?
Question Description
Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. 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 memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. 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 memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. Can you explain this answer?.
Solutions for Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. 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 memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. Can you explain this answer?, a detailed solution for Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider a 2-way set associative cache memory with 4 sets and total 8 cache blocks (0-7) and a main memory with 128 blocks (0-127). What memory blocks will be present in the cache after the following sequence of memory block references if LRU policy is used for cache block replacement. Assuming that initially the cache did not have any memory block from thecurrent job?0 5 3 9 7 0 16 55a)0 3 5 7 16 55b)0 3 5 7 9 16 55c)0 5 7 9 16 55d)3 5 7 9 16 55Correct answer is option 'C'. 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