GATE Exam  >  GATE Questions  >  In a k-way set associative cache, the cache i... Start Learning for Free
In a k-way set associative cache, the cache is divided into v sets, each of which consists of k
lines. The lines of a set are placed in sequence one after another. The lines in set s are
sequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.
The main memory block numbered j must be mapped to any one of the cache lines from
  • a)
    ( j mod v)*k to ( j mod v)*k + (k −1)
  • b)
    ( j mod v) to ( j mod v) + (k −1)
  • c)
    ( j mod k) to ( j mod k) + (v −1)
  • d)
    ( j mod k)* v to ( j mod k)* v + (v −1)
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
In a k-way set associative cache, the cache is divided into v sets, ea...
Position of main memory block in the cache (set) = (main memory block number) MOD
(number of sets in the cache).
As the lines in the set are placed in sequence, we can have the lines from 0 to (K – 1) in each
set.
Number of sets = v, main memory block number = j
First line of cache = (j mod v)*k; last line of cache = (j mod v)*k + (k – 1)
View all questions of this test
Explore Courses for GATE exam

Similar GATE Doubts

In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer?
Question Description
In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? for GATE 2025 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? covers all topics & solutions for GATE 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer?.
Solutions for In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer?, a detailed solution for In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? has been provided alongside types of In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice In a k-way set associative cache, the cache is divided into v sets, each of which consists of klines. The lines of a set are placed in sequence one after another. The lines in set s aresequenced before the lines in set (s+1). The main memory blocks are numbered 0 onwards.The main memory block numbered j must be mapped to any one of the cache lines froma)( j mod v)*k to ( j mod v)*k + (k −1)b)( j mod v) to ( j mod v) + (k −1)c)( j mod k) to ( j mod k) + (v −1)d)( j mod k)* v to ( j mod k)* v + (v −1)Correct answer is option 'A'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
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