Apna Kahuta

Assignment No.4 of CS-501 .The due date is Feb 12, 2013

VU Students Corner
Assignment No. 04

Due Date:
Your assignment must be uploaded/submitted before or on 12th Feb, 2013
Uploading instructions:

Please view the Assignment Submission Process document provided to you by the Virtual University for uploading assignments.

  • Assignment should be in .doc format.
  • Save your assignment with your ID (e.g. bx020200786.doc).
  • Assignment submission through email is highly discouraged.
                                                                                                                                  
Rules for Marking:

It should be clear that your assignment will not get any credit if:
·         The assignment is submitted after due date.
·         The submitted assignment file is corrupted.
·         The assignment is copied.
Note:
Your answer must follow the below given specifications. You will be assigned zero marks if you do not follow these instructions.
·          Font style: “Times New Roman”
·          Font color: “Black”
·          Font size: “12”
·          Bold for heading only.
·          Font in Italic is not allowed at all.
·          No formatting or bullets are allowed to use.

                                                                                                   Total Marks = 15

Question

Assume that three I/O devices are connected to a 32-bit, 20 MIPS CPU. The first device is a hard drive with a maximum transfer rate of 2MB/sec. It has a 32-bit bus. The second device is a floppy drive with a transfer rate of 50KB/sec over a 16-bit bus, and the third device is a keyboard that must be polled forty times per second. Assuming that the polling operation requires 30 instructions for each I/O device, determine the percentage of CPU time required to poll each device.

Note: 1K = 1024

4 comments :

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))
  1. PLZZZZZZZZZZZ DISCUS HERE

    ReplyDelete
  2. CS-501 4th Assignment solution due date Feb 12, 2013
    CS-501 4th Assignment solution due date Feb 12, 2013

    Question

    Assume that three I/O devices are connected to a 32-bit, 20 MIPS CPU. The first device is a hard drive with a maximum transfer rate of 2MB/sec. It has a 32-bit bus. The second device is a floppy drive with a transfer rate of 50KB/sec over a 16-bit bus, and the third device is a keyboard that must be polled forty times per second. Assuming that the polling operation requires 30 instructions for each I/O device, determine the percentage of CPU time required to poll each device.

    Note: 1K = 1024

    For our purposes, I define CPU utilization, U, as the amount of time not in the idle task, as shown in Equation 1.

    The idle task is the task with the absolute lowest priority in a multitasking system. This task is also sometimes called the background task or background loop, shown in Listing 1. This logic traditionally has a while(1) type of loop. In other words, an infinite loop spins the CPU waiting for an indication that critical work needs to be done.

    The processor usage percent is calculated with "the amount of time that the processor is not on idle". I mean, this calc is made from a counter that register the usage of the "idle" running process. While another preocesses "rob" the processor power from the idle process, the idle processor consumer register is decreased by a factor; as the time line is fixed and constant, the (1-"%time in the idle taks") is the amount of processor load used for all processes running on a processor

    ReplyDelete
  3. just change the values :)
    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.

    23
    Adopted from [H&P org] Advanced Computer Architecture-CS501
    ________________________________________________________
    Last Modified: 01-Nov-06 Page 310

    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.


    ReplyDelete

Add you Comment


Get Adminship and Make Posts For News/Info/Fun on Our Blog,