recategorized by
65,055 views
63 votes
63 votes

Consider a disk drive with the following specifications:

$16$ surfaces, $512$ tracks/surface, $512$ sectors/track, $1$ KB/sector, rotation speed $3000$ rpm. The disk is operated in cycle stealing mode whereby whenever one $4$ byte word is ready it is sent to memory; similarly, for writing, the disk interface reads a $4$ byte word from the memory in each DMA cycle. Memory cycle time is $40$ nsec. The maximum percentage of time that the CPU gets blocked during DMA operation is:

  1. $10$
  2. $25$
  3. $40$
  4. $50$
recategorized by

12 Answers

3 votes
3 votes
Time takes for 1 rotation = 60/3000
It reads 512*1024 Bytes in one rotation.
Time taken to read 4 bytes = 153 ns
153 is approximately 4 cycles (160ns)
Percentage of time CPU gets blocked = 40*100/160 = 25
2 votes
2 votes
1 rotation take 60/3000 sec = 1/50 sec.

so (512*1KB) transfer in 1/50 sec. so transfer rate = (512*1KB*50) = 25600 KBSec.

Now we let 4x Bytes are transfer in whole process.

So Total Transfer time = 4x/(25600*10^3)sec = 156.25x nsec.

Now to calculate total cpu involvement time we need to consider total x time cpu involvement because there are total 4x byte we consider and each transferable data unit is 4 bytes.

So total CPU involvement time = x*40 nsec = 40x nsec.

% of cpu involvement  = {40x/(156.25*x)}*100 = 25.6%.
2 votes
2 votes

While DMA transferring 4B data from buffer to Memory which will take 4 memory cycle to transfer, in parallel disk will again generate 4B data in buffer, this will happen in pipeline fashion.

1 votes
1 votes

https://gateoverflow.in/1393/gate2005-70

B. 25


Does 3000 rotations in 60 seconds

⟹⟹ 1 rotation in 20 ms

In 1 rotation covers data in 1 track which is = 512 × 1 KB 
20 ms ⟷⟷ 512 KB 
1 sec ⟷⟷ 25600 KB 
⟹⟹ Transfer rate = 25600 KBps 
Transfer Rate means we can perform read or write operations(one at a time) with this speed. 
In one DMA cycle of 40 ns we are able to transfer 4 Bytes to disk.

CPU Idle Time = 40 ns 
Data Prepration Time = 4Bytes25600KB4Bytes25600KB = 156.25 ns

% Time CPU Blocked = 40ns40ns+156.25ns×10040ns40ns+156.25ns×100 = 20.382

Answer:

Related questions

23 votes
23 votes
5 answers
1
Kathleen asked Sep 22, 2014
19,850 views
What is the swap space in the disk used for?Saving temporary html pagesSaving process dataStoring the super-blockStoring device drivers
1 votes
1 votes
1 answer
3
0 votes
0 votes
0 answers
4
Shadan Karim asked Jan 7, 2019
212 views