1
$\begingroup$

Asume 512 Bytes direct-mapped cache with 64 Byte cache blocks (cache line size), is empty at the beginning and below given set of physical addresses are referred by CPU in the given order. At each physical address request, state whether it will be a cache hit or miss in the given cages. Note that all the addresses are given in decimal numbering format. The answer for the first address reference is given as an example.

enter image description here

So I have done like it like this.Since cache have 512 bytes I have divided it by the size of the cache block.Then I will got 8 as the answer.So when CPU asked 1015 address it loaded 1015 and 1015+8 address into the cache and so on.So when cpu request address 1023 in the order of 3 since it was already loaded into cache in the previous step it is a cache hit.Is this the correct way of doing this? Point me if I am wrong.thank you

$\endgroup$
  • 1
    $\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. Jul 6 '18 at 17:15
  • $\begingroup$ Sorry it was my bad.I have correct the question.Thank you $\endgroup$ – Kalana Mihiranga Jul 6 '18 at 17:36

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.