We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# Assignment No.4

 Assignment No. 04 Semester: Spring 2015 CS501 - Advance Computer Architecture Total Marks: 20   Due Date:  05/08/2015 Instructions: Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if:   The assignment is submitted after due date. The assignment is submitted by email. The submitted assignment does not open or file is corrupt. All types of plagiarism are strictly prohibited. It is in some format other than .doc (Microsoft Word).   Objectives: To learn and understand the basic concepts of CPU sharing between I/O devices. To learn about the dynamic properties of magnetic disk drive.    For any query about the assignment, contact at cs501@vu.edu.pk     Question                                                                                                          Marks 10    Consider a 64-bit, 50 MIPS CPU with which following I/O devices are attached.   A hard drive having a 32-bit bus and maximum transfer rate of 12 MB/sec. A DVD writer having a 32-bit bus with transfer rate of 1 MB/sec. A mouse having the polling frequency of 100 Hz.   Assume that one polling operation requires 12 instructions for each I/O device. You are required to calculate the percentage of CPU time required to poll each of the given devices.   Question 2                                                                                                       Marks 10       Suppose we have a magnetic disk with an average seek time of 3ms. The disk can transfer at a maximum rate of 30 MB/sec. If disk rotates at 18,000 rpm and the controller overhead is 0.5ms, then calculate the average time to read or write a data block of 1 MB.     Note: No assignment will be accepted after due date. BEST OF LUCK

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 7180

Attachments:

### Replies to This Discussion

Assume that three I/O devices are connected to a 32-bit, 10 MIPS CPU. The first device

is a hard drive with a maximum transfer rate of 1MB/sec. It has a 32-bit bus. The second
device is a floppy drive with a transfer rate of 25KB/sec over a 16-bit bus, and the third
device is a keyboard that must be polled thirty times per second. Assuming that the
polling operation requires 20 instructions for each I/O device, determine the percentage
of CPU time required to poll each device.

Solution:
The hard drive can transfer 1MB/sec or 250 K 32-bit words every second. Thus, this hard
drive should be polled using at least this rate.
Using 1K=210, the number of CPU instructions required would be
250 x 210 x 20 = 5120000 instructions per second.
Percentage of CPU time required for polling is
(5.12 x 106)/ (10 x106) = 51.2%
The floppy disk can transfer 25K/2= 12.5 x 210 half-words per second. It should be
polled with at least this rate. The number of CPU instructions required will be 12.5 x 210
x 20 = 256,000 instructions per second.
Therefore, the percentage of CPU time required for polling is
(0.256 x 106)/ (10 x 106) = 2.56%.
For the keyboard, the number of instructions required for polling is
30 x 20 = 600 instructions per second.
Therefore, the percentage of CPU time spent in polling is
600 / (10 x 106) = 0.006%
It is clear from this example that while it is acceptable to use polling for a keyboard or a
floppy drive, it is very risky to use polling for the hard drive. In general, for devices with
a high data rate, the use of polling is not adequate.

Solution:
The hard drive can transfer 1MB/sec or 250 K 32-bit words every second. Thus, this hard
drive should be polled using at least this rate.
Using 1K=210, the number of CPU instructions required would be
250 x 210 x 20 = 5120000 instructions per second.
Percentage of CPU time required for polling is
(5.12 x 106)/ (10 x106) = 51.2%
The floppy disk can transfer 25K/2= 12.5 x 210 half-words per second. It should be
polled with at least this rate. The number of CPU instructions required will be 12.5 x 210
x 20 = 256,000 instructions per second.
Therefore, the percentage of CPU time required for polling is
(0.256 x 106)/ (10 x 106) = 2.56%.
For the keyboard, the number of instructions required for polling is
30 x 20 = 600 instructions per second.
Therefore, the percentage of CPU time spent in polling is
600 / (10 x 106) = 0.006%
It is clear from this example that while it is acceptable to use polling for a keyboard or a
floppy drive, it is very risky to use polling for the hard drive. In general, for devices with
a high data rate, the use of polling is not adequate.

Solution file

Attachments:

Keya yeh donu questions ka solution hai?

ye solution to nhi hai. kya tum ne assignment question read nhi kiye ?

ye to handouts main se example hai jo assignment solve krne mein help krey gi.

No, I didn't read the assignment.... Anyways thanks for the Idea solution..

mere bhai main ne solution bana k ap k samne plte main rakh to pash nai kerna wo to ne khud banana hai

copy lar liya example me say

250k kaha say aya explain karo

veri good itne to page e nai hand out pe

For you information handout k total 440 pages hain.

See exaample in handouts on page no 309 for Q1

## Latest Activity

1 hour ago

### CS605 GDB Fall 2020 Solution / Discussion Due Date: 10-dec-2020

4 hours ago
shifa arshad joined +M.Tariq Malik's group

### CS605 Software Engineering-II

4 hours ago
иαвєєℓ αнмє∂ and Ali Fahad joined +M.Tariq Malik's group

### MGT503 Principles of Management

5 hours ago
6 hours ago
shifa arshad joined +M.Tariq Malik's group

### MGT502 Organizational Behavior

6 hours ago
7 hours ago
+ ᴄᴏғғᴇᴇ updated their profile
7 hours ago
Rizwan Mushtaq joined +M.Tariq Malik's group

### HRM626 Recruitment and selection

7 hours ago
Arooj Shahid liked 乇ﾒ-丂ｲひり3刀ｲ.'s discussion *** My Drawing ***
8 hours ago
Arooj Shahid liked 乇ﾒ-丂ｲひり3刀ｲ.'s discussion *** الوداع اردو ***
8 hours ago
Arooj Shahid liked Miss. Churhail's discussion LOVE YOUR LIFE!!!!!
8 hours ago
8 hours ago
Arooj Shahid liked Omar's discussion Dua
8 hours ago
+!!! ❤️ Shadow Girl❤️!!! liked 乇ﾒ-丂ｲひり3刀ｲ.'s discussion *** الوداع اردو ***
8 hours ago
8 hours ago
8 hours ago
8 hours ago
Saba Shahzadi, waqar, Hammad Syed and 12 more joined Virtual University of Pakistan
9 hours ago
9 hours ago