Tutorial 08
Tutorial 08
CSE321b_Final_W2014_Question 4
2. [4 points] A particular system is controlled remotely by an operator through commands
sent over a communication line. The average number of commands entered in an 8-hour
interval is 100. Suppose the processor scans the communication line once every 250 ms.
(a) How many times will the communication line be checked in an 8-hour period?
(b) What would be the percentage of reduction in the number of processor visits to the
communication line if interrupt-driven I/O were used?
(a) Number of checked times = (8* 60 * 60)/ (250 * 10-3) = 115200 times
CSE321b_Final_W2014_Question 4
3. [6 points] A computer has one selector channel and one multiplexor channel. The
selector channel connects two devices whose transfer rates are 50 Kbps and x Kbps,
respectively. The multiplexor channel connects two other devices whose transfer rates are
70 Kbps and x Kbps, respectively.
(a) Represent the maximum aggregate I/O transfer rate of this system as an expression in
terms of x.
(b) Calculate a value for x such that the maximum aggregate I/O transfer rate is 130 Kbps.
(c) Would it be possible to connect a fifth device to this system without changing the
maximum aggregate I/O transfer rate? Justify your answer.
If x = 50
I/O rate = 70 + 50 +50 = 170 > 130 “ rejected “ 50 kbps
If x > 50 x kbps 70 kbps x kbps
I/O rate = 70 + 2 x = 130 x = 30 “ rejected “
If x < 50
I/O rate = 70 + x +50 = 130 x = 10
(c) Yes, it’s possible to connect a fifth device to the selector channel without
changing the max. aggregate I/O transfer rate as long as the transfer rate of the
device is less than or equal to Max (50, x).
CSE401_Final_W2014_Question 4
2. [9 points] Five input devices are connected to a CPU in a daisy-chain. Suppose each
device produces no more than c characters/s. When a device has a character, it issues an
interrupt request to the CPU. The CPU responds immediately by sending an interrupt
acknowledge down the chain. Once a device receives an acknowledge, it takes 200 μs to
either put its vector (i.e., ID) on the bus or else pass the acknowledge along to the next
device. Once the device puts its vector on the bus, the CPU takes 100 μs to execute the
ISR of that device (i.e., collect the character, and be ready to serve the next device).
(a) Calculate the time taken by the CPU to collect the characters in the following cases:
i. There are only two characters available; one in the first device and one in the fifth
device.
ii. There is one character available in each device.
(b) What is the maximum value of c?
(c) If the total number of devices in the daisy-chain was n, what would be the maximum
value of c (expressed as function in n)?
a) i. Time to collect character from device #1 = 200 + 100 = 300 micro second
Time to collect character from device #5 = 200*4 + 200 + 100 = 1100 micro
second
So, total time = 300 + 1100 = 1400 micro second
ii. Time to collect character from device #i = 200 * i + 100 so, total time = 200
+ 100 (device #1) + 200 * 2 + 100 (device #2) + 200 * 3 + 100 (device #3) +
200 * 4 + 100 (device #4) + 200 * 5 + 100 (device #5) = 3500 micro seconds
b) A device should not produces a new character until CPU collect all character
available
This take 3500 micro second in worst case when all devices produced a
character so,
Maximum no of character per device c = 1/3500 micro = 285 character/sec
b) The heaviest demand happen when device with rate = 80 is selected by the
channel
Percentage of bus time consumed by the channel = (80/200) *100 = 40%