The Gateway to Computer Science Excellence
0 votes
A computer is required to accept characters from 20 video terminals. The main memory

area to be used for storing data for each terminal is pointed to by a pointer PNTR

n, where n=1 through 20. Input data must be collected from the terminals while another

program PROG is being executed. This may be accomplished in one of two ways:


(a) Every T seconds, program PROG calls a polling subroutine POLL. This subroutine

checks the status of each of the 20 terminals in sequence and transfers any input

characters to the memory. Then it returns to PROG.


(b) Whenever a character is ready in any of the interface buffers of the terminals, an

interrupt request is generated. This causes the interrupt routine INTERRUPT to

be executed. After polling the status registers, INTERRUPT transfers the input

character and then returns to PROG.

Write the routines POLL and INTERRUPT using either pseudo code or the assembler

language of the processor of your choice. Let the maximum character rate for any

terminal be c characters per second, with an average rate equal to rc, where r ≤

1. In method (a), what is the maximum value of T for which it is still possible to guarantee that no input characters will be lost? What is the equivalent value for method (b)? Estimate, on the average, the percentage of time spent in servicing the terminals for

methods (a) and (b), for c=100 characters per second and r =0.01, 0.1, 0.5, and 1.

Assume that POLL takes 800 ns to poll all 20 devices and that an interrupt from a

device requires 200 ns to process.

In instructor manual Value for T is given as 100 times persecond for solution a but i am not able to figure it out why.!! Can anyone explain me the solution.Thanks in advance.
in CO and Architecture by Active (1.7k points)
edited by | 67 views

1 Answer

0 votes

Here is the solution can anyone explain me why 100 times persecond

by Active (1.7k points)
Ok I got the answer after giving it some thought. POLL should be executed 100 times per second because c=100 i.e character rate. If POLL is not executed 100 times we are going to loose characters.

Correct me if my interpretation is wrong.!! Sorry to bother u all.!!

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,833 questions
57,730 answers
107,868 users