0
$\begingroup$

My question is fairly simple, however I am not entirely sure if my solution is correct. In this case we are using direct mapping. I know the value of byte-addressable memory and I know the block size and the number of cache lines. I need to find the cache size. I've calculated the length of the memory address. Cache has 64 lines. I've got a formula stating-> line_numbers=2^a, so a is 6. I also know that block size = line size=2^b; where b is least significant bits. If for example the block size is 32 bits, that make b=5. Then I've the formula that states the size of the cache equals 2^(a+b). Does that mean that the cache is equals to 2^11? Thank you

$\endgroup$
  • $\begingroup$ "block size is 32 bits" : Maybe 32 bytes instead... $\endgroup$ – TEMLIB Nov 16 '16 at 23:01
  • $\begingroup$ We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. $\endgroup$ – D.W. Nov 17 '16 at 0:15
  • $\begingroup$ The purpose of these kinds of exercises is usually to encourage you to read your textbook and understand the material ... not to create busywork where you plug into some formula without understanding anything about the underlying material. So, have you done that? Was there any particular concept or idea that you're having trouble understanding? $\endgroup$ – D.W. Nov 17 '16 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.