comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Poor tasking performance
Date: Sun, 20 Jun 2004 01:28:18 -0400
Date: 2004-06-20T01:28:18-04:00	[thread overview]
Message-ID: <E8ednbZKC8fuvUjdRVn-gw@comcast.com> (raw)
In-Reply-To: <Xq4Bc.96407$dP1.315792@newsc.telia.net>

Bj�rn Persson wrote:

> What kind of hardware doesn't use interrupts for keyboard input?

It is amazing the way hardware goes around in circles. ;-) Once upon a 
time, computers used polling for some input devices because the overhead 
of interrupts was too high, and there were only a few interrupts available.

Then as the hardware got smarter, and interrupt overhead was reduced, 
interrupt-driven IO was popular.

Then came DMA (direct memory access) with interrupts only used for 
signalling.

And finally we are back to polling for some devices because the overhead 
is lower than using interrupts...

For keyboard input most systems, most of the time, use a protocol where 
_some_ keys cause interrupts, and others just place the data in a 
buffer.  When the carriage return or whatever occurs, the entire buffer 
is read.

However, sometimes you want to read every keystroke immediately.  On 
some systems this is done by polling rather than changing hardware 
settings.  That is why I asked if he was using Get_Line, or 
Get_Immediate.  On some hardware and OS combinations, Get_Line has very 
low overhead, but Get_Immediate does polling.


-- 

                                           Robert I. Eachus

"Reason and experience both forbid us to expect that national morality 
can prevail in exclusion of religious principles." -- George Washington




  reply	other threads:[~2004-06-20  5:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-19  7:38 Poor tasking performance Adrian Knoth
2004-06-19 20:19 ` Robert I. Eachus
2004-06-19 23:51   ` Adrian Knoth
2004-06-19 23:58   ` Björn Persson
2004-06-20  5:28     ` Robert I. Eachus [this message]
2004-06-20  7:58       ` Adrian Knoth
2004-06-20  9:18       ` Björn Persson
2004-06-26 17:30         ` Robert I. Eachus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox