3 3 votes Consider a computer with the following features: 90% of all memory accesses are found in the cache (hit ratio = 0.9); The block size is 2 words and the whole block is read on any miss; The CPU sends references to the cache at the rate of 107 words per second; 25% of the above references are writes (writes = 25%, reads = 75%); The bus can support 107 words per second, read or writes (total bus bandwidth = 107); The bus reads or writes a single word at a time; Assume at any one time, 30% of the block frames in the cache have been modified; The cache uses write allocate on a write miss. Calculate the percentage of the bus bandwidth used on the average if cache is WRITE BACK: CO & Architecture cache-memory co-and-architecture + – sh!va 3.1k views answer comment Share Follow Print See 1 comment 1 1 comment reply Rahul Jain25 commented Mar 2, 2017 reply Follow flag Is it 25%??? 0 0 replyShare Please log in or register to add a comment.
1 1 vote WRITE BACK = When cached data is modified, it is just marked using dirty bit. The original data is updated when the cached data is deallocated. and Write Allocate – If a write miss occur, load the block into cache and then update. Write back policy generally uses this. Consider the scenarios for using bandwidth Read hit: While Read hit, block is present in cache, so no usage of bandwidth Read miss: We must write back the block is dirty, then load new block. Probability of read miss= (1-0.9)*0.75; Replacing the dirty block =0.3* one block =0.3*2 words Write hit= As block is not updated in main memory immediately, no bandwidth use Write miss= 107 * 0.1 * 0.25 * [2 * 0.3 + 2] Percentage of the bus bandwidth used = sum of these/total =0.26 * 10 7 /10 7 =0.26 sh!va answered Mar 2, 2017 sh!va comment Share Follow See all 14 Comments 14 14 Comments reply Rahul Jain25 commented Mar 2, 2017 reply Follow flag When cache miss has occured during read why are we multiplying with 0.3??? If read miss is there we have to read 2 blocks hence bnadwidth used irrespective of modified or not. So why 0.3*2??? 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag it is given that on a miss,whole block is read..so during read miss,time for 2 words to be brought into main memory should be taaken into account. time for 2 words is 0.2 us so for read miss,time should be 0.75*( 0.1*(0.2 us + 0.3 * 0.1) as in case of modified frames,one word is updated to main memory. 0 0 replyShare Rahul Jain25 commented Mar 2, 2017 reply Follow flag Akriti we do not need to calculate time here, we just have to calculate average number of memory access in one second. 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag ooh okay..alright..but is my approach right??as in case of miss,2 words will be updated and for 30% modified data words,1 word will be updated in main memory. and same goes for write references...pls tell me why for Write ,we are multiplying with 10^7...?? 0 0 replyShare Rahul Jain25 commented Mar 2, 2017 reply Follow flag @shiva I think when read miss occurs 0.3*2(for modified block) + 2( for bringing block in cache) and when write miss is there 2( for write allocate) + 2( for actual write) 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag in case of modifies block,one word is updated or whole block is updated?? and in case of Write also,we need to take 30% modification into account 0 0 replyShare Rahul Jain25 commented Mar 2, 2017 reply Follow flag @akriti I think it is given that cache block frame is dirty 30% of time so we should be updating 2 words(cache block size). Most probably should be 2 words to be updated.(not sure) 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag see this -https://gateoverflow.in/35154/write-back-and-write-through yes,whole block is to be updated in main memory when 30% are updated. but can u pls tell me why are we multiplying with 107 in only write..not read 1 1 replyShare Rahul Jain25 commented Mar 2, 2017 reply Follow flag Find average memory access and multiply by 10^7 bcoz it is number of memory refrences sent by CPU. Now you will get x*10^7 memory access per second. x will be in decimal(0.something) and it is given bandwidth is 10^7(divide 10^7*x by 10^7) so x*100% is the answer 0 0 replyShare Rahul Jain25 commented Mar 2, 2017 reply Follow flag @shiva @akriti plz verify this, 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag @rahul,for Write also,u need to consider 30% modification. and i am not understanding how to calculate the bandwidth here 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag well..you can check this link http://www.inf.ed.ac.uk/teaching/courses/car/Notes/2015-16/solution04.pdf 1 1 replyShare Rahul Jain25 commented Mar 2, 2017 reply Follow flag @Akriti thanks for the link☺ 0 0 replyShare Akriti sood commented Mar 2, 2017 reply Follow flag welcome..:) 0 0 replyShare Please log in or register to add a comment.