# www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# Assignment # 03 Advance Computer Architecture (CS 501) Fall 2020 Deadline Date Feb 8, 2021

Assignment # 03

Fall 2020

Total marks = 20

Question No 01                                                                                     12 marks

Let us assume a 32-bit processor having an 800 MHz frequency to which the following I/O devices are connected:

• A DVD writer that has a transfer rate of 24 MB/s.
• A keyboard that can be polled 500 times per second.
• A SATA hard drive which can transfer at 40 MB/s.

If CPU polling is used for selecting a device where each polling operation requires 10 instructions, what will be the CPU time required to poll each device?

Question No 02                                                                                    08 marks

Consider a hard drive that has a transfer rate of 20 MB/s. The hard disk is connected to a CPU having a frequency of 1 GHz through a 32-bit data bus. The CPU uses DMA interface for I/O transfers which has the following specifications:

• CPU spends around 300 clock cycles to set up a DMA controller for every DMA request.
• At the end of each DMA transfer, an interrupt is generated which takes additional 100 clock cycles.

If the data is transferred in a block and each block size is 16 KB, then calculate the percentage of time consumed for DMA transfers using the hard drive.

Note: Provide each step of calculation in both questions otherwise marks will be deducted.

Views: 894

Attachments:

### Replies to This Discussion

Share the Assignment Questions & Discuss Here....

Stay touched with this discussion, Solution idea will be uploaded as soon as possible in replies here before the due date.

CS501-Assignment-3-Solution-Fall-2020

CS501-Assignment-3-Solution-Fall-2020.doc

CS501-Assignment-3-Solution-Fall-2020-Idea-no-02

CS501-Assignment-3-Solution-Fall-2020-Idea-no-02.docx

CS501 Assignment 3 Solution Fall 2020 - 2021

#cs501 #cs501asignmentsolution #cs501assignment
CS501 Assignment 3 Solution Fall 2020 - 2021 || Advance Computer Architecture||

#CS601_Assignment_3_solution
CS501 Assignment No 3 2021 Solution File| Advanced Computer Architecture

CS501 Assignment 3 Solution Fall 2020-2021

Question NO 1 Solution

The DVD writer can transfer 24 MB/s or 6000 K 32-bit words every second so this DVD should be polled using this rate.

Using 1K = 210

No of CPU instruction required = 6000 * 210 * 10

= 61440000 = 6.14 * 10' instructions per second CPU time required for polling is = (6.14 * 10)/(800 * 106)

= 0.07675

In Percentage = 7.675 %

• For keyboard, No. of instructions required for pollingis

= 500 * 10

= 5000 instructions per second

CPU time required for polling is = 5000 / (800 * 106)

= 6.25 * 10−6

• The Hard drive can transfer 40 MB/s or 10000 K 32-bit words everysecond

Using 1K = 210

No of CPU instruction required = 10000 * 210* 10

= 102400000

= 1.02 * 10^8 instructions per second CPU time required for polling is = (1.02 * 108/(8 * 108) = 0.1275 Percentage : 12.75 %

Question NO 2 Solution

Solution: Hard drive transfer rate 20MB/s = 20 * 1000 KB = 20000 KB Each block size = 16 KB

So,

20000 / 16 = 1250 Block transfer per second

Every DMA transfer uses = 300 + 100 = 400 CPU Cycle This gives us: = 400 * 1250

F=500000 Cycles/s = 5 * 105

For 1 G CPU

= (5 * 105) / (1 * 10^9)

= 5 * 10−4

= 0.05 %

Cycles/s