Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider two cache organizations. First one i... Start Learning for Free
Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency of
k/10 ns The hit latency of the set associative organization is hwhile that of direct mapped is h2
.
The value of h1 is:
  • a)
    2.4 ns
  • b)
    2.3 ns
  • c)
    1.8 ns
  • d)
    1.7 ns
Correct answer is option 'A'. Can you explain this answer?
Verified Answer
Consider two cache organizations. First one is 32 kb 2-way set associa...
Cache size is 32 KB and cache block size is 32 B. So,

So, number of index bits needed = 9 ( since 29 = 512). Number of offset bits = 5 (since 25 = 32 B is the block size and assuming byte addressing). So, number of tag bits = 32 - 9 - 5 = 18 (as memory address is of 32 bits).
So, time for comparing the data = Time to compare the data + Time to select the block in set = 0.6 + 18/10 ns = 2.4 ns.
(Two comparisons of tag bits need to be done for each block in a set, but they can be carried out in parallel and the succeeding one multiplexed as the output).
View all questions of this test
Most Upvoted Answer
Consider two cache organizations. First one is 32 kb 2-way set associa...
Cache Organizations


First Cache Organization:


  • Size: 32 kb

  • Associativity: 2-way set associative

  • Block size: 32 bytes



Second Cache Organization:


  • Size: 32 kb

  • Associativity: Direct mapped

  • Block size: 32 bytes



Latency of Components


Latency of 2-to-1 Multiplexer:


  • Value: 0.6 ns



Latency of k-bit Comparator:


  • Value: k/10 ns



Hit Latency


Hit Latency of First Cache Organization:


  • Value: h1



Hit Latency of Second Cache Organization:


  • Value: h2



Solution


The formula for calculating hit latency of a cache is:

hit latency = access time of cache + (hit rate * (access time of memory - access time of cache))

As both cache organizations have the same size and block size, the only difference is in their associativity, we can compare their hit latencies using the above formula.

For the first cache organization, as it is 2-way set associative, we need to compare the two sets for a hit, which requires a 2-to-1 multiplexer. Therefore, the access time of cache for this organization is 0.6 ns.

For the second cache organization, as it is direct mapped, we only need to compare one block for a hit, which requires a k-bit comparator. Therefore, the access time of cache for this organization is k/10 ns.

Assuming the same hit rate for both cache organizations, we can set the hit latencies equal to each other and solve for h1:

h1 = h2 + (hit rate * (k/10 - 0.6))

As h2 is not given in the question, we cannot solve for h1 directly. However, we can make some assumptions and estimate h1.

Assuming a hit rate of 90%, and k = 32 (as the address size is 32 bits), we can estimate h2 as follows:

h2 = access time of cache = k/10 = 3.2 ns

Substituting the values in the hit latency formula, we get:

h1 = 3.2 + (0.9 * (0.32 - 0.6))
= 2.4 ns

Therefore, the value of h1 is 2.4 ns, which is option A.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. Can you explain this answer?
Question Description
Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. 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 two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. 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 two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. 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 two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider two cache organizations. First one is 32 kb 2-way set associative with 32 byte block size, the second is of same size but direct mapped. The size of an address is 32 bits in both cases . A 2-to-1 multiplexer has latency of 0.6 ns while a k - bit comparator has latency ofk/10nsThe hit latency of the set associative organization is h1while that of direct mapped is h2.The value of h1 is:a)2.4 nsb)2.3 nsc)1.8 nsd)1.7 nsCorrect answer is option 'A'. 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