9 votes 9 votes A certain device dumps data into its interface register every 200 ns. The main memory access time is 50 ns. If the CPU were interfaced to his device in cycle stealing mode, what percentage of time does the CPU be in hold state? A. 20 B. 25 C. 50 D. None of these CO and Architecture co-and-architecture dma + – khushtak asked Oct 8, 2015 retagged Nov 13, 2017 by Arjun khushtak 3.9k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 15 votes 15 votes Answer is option B Data Preparation time = 200 ns Main memory access time = 50 ns = cpu is idle ( i.e in hold state ) Memory access time = Date Transfer time = 50 ns so the percentage of time that cpu is in hold state = ( 50/200 ) * 100 = 25 % amarVashishth answered Oct 23, 2015 edited May 27, 2017 by Bikram amarVashishth comment Share Follow See all 14 Comments See all 14 14 Comments reply Show 11 previous comments rahul sharma 5 commented Nov 3, 2017 reply Follow Share Yes you are right. In burst mode example i added 2+2 in numerator,it is time to get the control of bus and release. In denominator 2+2+5, here 2+2 is same as numerator and denominator has 5 extra,which is assumed time taken to transfer data at I/O speed. This is just a calculation for CPU blocked. Things can change based upon what is asked in question. 2 votes 2 votes Rajesh R commented Nov 3, 2017 reply Follow Share So in burst mode no pipelining right ? Also can you tell me the formula for interrupt driven IO please ? In many places for interrupt driven IO they consider pipelining and formula as (x/y) and in some places no pipelining and formula as (x/x+y). Which is correct? Also in programmed IO CPU is blocked for entire duration. So percentage of CPU blocked in programmed IO is 100% right? 1 votes 1 votes rahul sharma 5 commented Nov 3, 2017 reply Follow Share 1. Yes,there is no pipeline concept in burst mode. 2.For interrupt drive,if it is continues transfer,then it will be x/y(same as cycle stealing example i told above).In case they did not say it is continues transfer,then it will be x/(x+y) (similar to burst mode concept). 3.Yes,programmed I/o mode CPU will be in waiting/blocked state until the entireI/o operation.(1005) 4 votes 4 votes Please log in or register to add a comment.