edited by
9,983 views
44 votes
44 votes

Consider a disk with the following specifications: 20 surfaces, 1000 tracks/surface, 16 sectors/track, data density 1 KB/sector, rotation speed 3000 rpm. The operating system initiates the transfer between the disk and the memory sector-wise. Once the head has been placed on the right track, the disk reads a sector in a single scan. It reads bits from the sector while the head is passing over the sector. The read bits are formed into bytes in a serial-in-parallel-out buffer and each byte is then transferred to memory. The disk writing is exactly a complementary process.

For parts (C) and (D) below, assume memory read-write time = 0.1 microseconds/byte, interrupt driven transfer has an interrupt overhead = 0.4 microseconds, the DMA initialization, and termination overhead is negligible compared to the total sector transfer time. DMA requests are always granted.

  1. What is the total capacity of the desk?
  2. What is the data transfer rate?
  3. What is the percentage of time the CPU is required for this disk I/O for byte-wise interrupts driven transfer?
  4. What is the maximum percentage of time the CPU is held up for this disk I/O for cycle-stealing DMA transfer?
edited by

3 Answers

Best answer
33 votes
33 votes
$(a)$ $20 \times 1000 \times 16 \times 1 KB = 3,20,000 KB$

$(b)$
$\begin{align*} 3000 \text{ rotations} &= 60 \text{ seconds}\\ 1 \text{ rotation} &= \frac{60}{3000} \text{ seconds}\\ 1 \text{ rotation} = 1 \text{ track} &= \frac{1}{50} \text{ seconds}\\ 1 \text{ track} = 16\times 1 KB &= \frac{1}{50} \text{ seconds}\\ 800 KB &= 1 \text{ second}\\ \end{align*}$

Hence, transfer rate $= 800 KB/s$

$(c)$ Data is transferred byte-wise; given in the question.
CPU read/write time for a byte $= 0.1 \mu s$
Interrupt overhead (counted in CPU utilization time only) $= 0.4 \mu s$
Transfer time for 1 byte data which took place at the rate of $800\; KB/s = 1.25 \mu s$
Percentage of CPU time required for this job $=\dfrac{0.1+0.4}{0.4 + 0.1 + 1.25} \times 100 = 28.57\%$

$(d)$ Percentage of CPU time held up for disk I/O for cycle stealing DMA transfer $= \dfrac{0.1+0}{1.25} \times 100 = 8.00 \%$
edited by
13 votes
13 votes

a) 20*1000*16*1=32000 KB

b) in 60 sec 3000 rounds

in 1 sec 50 rounds

therefore 50 tracks can be read in 1 sec

therefore 50*16*1 KB of data read in 1 sec

data rate =800 KB/sec

c) 800 KB of data is read in 1 sec

1 Byte of data can be read in 1/(800*1024) secs= 1.22 micro Sec

overhead =.1+.4=.5 micro Sec

total time = .5 + 1.22 = 1.72 micro sec

% of cpu time required =(.5/1.72)*100 =29%

d)  Since there is no overhead(assumed in question) for DMA transfer. Therefore :

Byte transfer takes 1.22 microsecond (same logic as in part (c)).

writing this to memory takes 0.1 microsecond

%age of CPU involvement= (0.1)/(0.1+1.22)= 7.5%

 

 

edited by
0 votes
0 votes

A) 20× 1000 × 16 × 1KB=3,20,000 × 1KB=3,20,000KB

B)

Step1:- find the rotational latency:-

                 Rotational speed=3000 rpm

 3000 rpm=60 sec

 1 rpm= 60/3000 sec= rotational delay=20 msec

Rotational latency (Ravg) = 1/2 x 1 rpm= 1/2  x 20 =10 msec

Step2:- To find transfer rate

Transfer rate = bytes on track/rotational delay= (16 x 1 KB)/20 ms=800 KB/sec

C) Data is transferred Byte wise; given in the question.

CPU read/write time for a Byte = 0.1 μs

Interrupt overhead (counted in CPU utilization time only) = 0.4 μs

Transfer time for 1 Byte data which took place at the rate of 800 KB/sec = 1/800KB=1.25 μs

Percentage of CPU time required for this job =

Total overhead =0.1+0.4=0.5 μs

Total time = 0.5 + 1.22 = 1.72 μs

Percentage of CPU time required for this job = 0.5/1.72 x 100 =29%

D) Percentage of CPU time held up for disk I/O for cycle stealing DMA transfer =0.1/1.25  x100 =8 %

edited by
Answer:

Related questions

25 votes
25 votes
2 answers
2
Kathleen asked Sep 14, 2014
10,419 views
Which of the following requires a device driver?RegisterCacheMain memoryDisk
35 votes
35 votes
3 answers
3