Redirected
retagged by
10,905 views
11 votes
11 votes

A DMA controller transfers $16$-bit word to memory using cycle stealing. The words are assembled from a device that transmits characters at a rate of $2400$ characters per second. The CPU is fetching and executing instructions at an average rate of $1$ million instructions per second. 

  1. By how much will the CPU be slow down because of DMA transfer when the characters are represented with $8$ bit ASCII?
     
  2. How much more percent the CPU slows down when $32$ –bits words are transferred to memory using cycle stealing?
retagged by

4 Answers

Best answer
0 votes
0 votes

1 character is 8 bits which makes speed of device 2400 Bytes/sec.

Word size is 2B tranferring it will take 1/1200=833.33 microseconds.

Memory executes 106 instructions which means it fetches 10instructions or words in 1 second. Therfore 1 word is acessed in 1 microsecond or it cycle time.

Therfore slow down =(1/(833.33+1))×100%= 0.119 or 0.12%

selected by
17 votes
17 votes

A DMA controller transfers 16 - bit word to memory using cycle stealing.

Hence, a word size = 16 bits and assume RISC processor, we have 1 Instruction size = 1 word = 16 bits.

The CPU is fetching and executing instructions at an average rate of 1 million instructions per second

CPU executes $1$ Million Instructions per second or we can say $1$ Million Words per second.

A DMA controller transfers 16 - bit word to memory using cycle stealing.

Hence, In $1$ cycle stolen from the CPU, DMA controller sends a word to memory. Device transmits $2400$ characters per sec where $1$ character = $8$ bit ASCII.



A). DMA controller is a special processor only used for DMA which acts as a intermediate between memory and I/O device.

As Device transmits $2400$ characters per sec, or $1200$ words per sec.

Now, $1$ word can be sent through Cycle Stealing in $1$ us or, $1$ cycle = $1$ us

Total cycles stolen to transfer $1200$ words = $1200$ cycles and a sec = $10^{6}$ cycles.

Hence, %age of cycles stolen = $\frac{1200}{10^{6}}$ = $0.12 %$

By how much will the CPU be slow down because of DMA transfer when the 
characters are represented with 8 bit ASCII?  --> 0.12 %



B). 

when 32 –bit words are transferred to memory using cycle stealing

Now, Assume a word size = $32$ bits and so, DMA controller in $1$ cycle can send $4$ Bytes or $4$ characters.

Hence, $600$ words can be sent in $600$ cycles stolen by DMA. 

Total cycles stolen to transfer $600$ words = $600$ cycles and a sec = $10^{6}$ cycles.

Hence, %age of cycles stolen = $\frac{600}{10^{6}}$ = $0.06 %$

By how much will the CPU be slow down because of DMA transfer when the 
characters are represented with 8 bit ASCII?  --> 0.06 %

5 votes
5 votes

all options are wrong. what i think they have missed the number of instruction required to transfer the word . so considering one instruction will be required.

time due to dma wasted = time taken when cpu address bus was taken / total time *100

total time = preparation time + transfer time .

time wasted when cpu address bus was taken = transfer time. ( dma concept)

preparation time =

2400 charcater in 1 sec.

1 charcter in 1/2400 sec . and 1 charcter =8 bit. 

8 bit = 1/2400  so one bit = 1/(2400*8) /sec

 so one bit will be taken from the device to dma in 1/(2400*8) sec.

so 16 bit = 1/(2400*8)*16= 1/1200seconds.

now transffer time.

cpu execute 1 million instructions . = 1*10^6 . in one second.

s 1 instruction in 1/10^6 seconds.

suppose one instruction is required to transfer 16 bit . ( which i think is missed in question).

so transfer time = 10^-6 sconds .

now applying above formula. 

(10^-6 /(1/1200) + (10^-6)) *100 = 0.119 . = 0.12

second option . i am transfering 32 bit word which means preparation time is going to double . and now cpu will also take 2 instruction to transfer as i assumed 16 bit in one instruction . actually solving this u will see there is no effect on the time of wastage . because wastage is time is due to the cpu was blocked. during preparation cpu never get blocked. so no effect.

 

1 votes
1 votes

Q 52) i think options are incorrect

CPU refers to memory on the average once(or more) every 1 microseond(1/10^6).
Character arrive one every 1/2400=416.6microsecond.
Two character of 8 bits each are packed into a 16 bit word every 2*416.6=833.3microsecond.
The cpu is slowed down by (1/833.3)*100=0.12%

Related questions

2 votes
2 votes
4 answers
1
worst_engineer asked Jan 14, 2016
2,885 views
A hard disk with transfer rate of 20 kbps is constantly transferring data to memory using DMA cycle stealing mode. The size of data transfer is 32 bytes. The processor ru...
3 votes
3 votes
0 answers
2
vishal chugh asked Jan 24, 2018
1,306 views
In the last step shouldn't it be (Y/X) and not (Y/X+Y) since its Cycle Stealing mode?
7 votes
7 votes
0 answers
3
dd asked Jul 13, 2016
1,993 views
Solution : Some one please explain with correct sequence of steps in each mode and a rough timing diagram.