I need help with the following questions: 1. Which of the following are argument
ID: 3863310 • Letter: I
Question
I need help with the following questions:
1. Which of the following are arguments for the locality principle as it pertains to caching? (select all correct answers)
a)If a piece of data has just been accessed it is likely to be accessed again soon.
b)The larger the cache, the longer the cache lookup times
c)An algorithm heavily utilizes branch instructions
d)It is just as expensive to read in 1 byte into cache as it is to read in 4 bytes
e)My loop accesses one more byte than the size of my cache
My answer is choice A: But I am not sure that his is the only answer
2. Which of the following are arguments for having a variable number of tracks per sector? (select all correct answers)
a)The disk would be able to hold more data
b)Data from the inner tracks could potentially be read more quickly
c)Data from the outer tracks could potentially be read more quickly
d)The algorithm for determining the cylinder, track and sector would be simplified
e)It reduces fragmentation
My answer is choice D, but I am not sure if their are more correct answers
Explanation / Answer
1.)
You are absolurely right, but we need to ad some more to that,
b)The larger the cache, the longer the cache lookup times, This is also correct because if we increase size of our cache our Hit rate will increase but along with searching time in the cache also increases.
c)An algorithm heavily utilizes branch instructions, In terms of cache it does, but it is not mentioned in the statement that they are still talking about cache, But yes in branch instruction like loops same statement will be executed again and again and whatever variable is inside that loop definitely will be accessed again and again. So yes, cache heavily utilizes branch instructions.
2.)
e)It reduces fragmentation, is correct
a is also correct