From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,dd6489250ee6bc95 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 20 Jun 2004 00:28:19 -0500 Date: Sun, 20 Jun 2004 01:28:18 -0400 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Poor tasking performance References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: NNTP-Posting-Host: 24.147.90.114 X-Trace: sv3-b6oqoKjKZFkcfYgxQ0pxS/Gl6SP7bkw0hpZtewOwDeknGWgxfL+sz8tATGMNoZVCw2I125BShrya08U!SrzScOJXNjqJlopRyBSqyU5OUKAK1iKc2eDKLxvSxGambWL5TuSxRnoZrsLyMw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: g2news1.google.com comp.lang.ada:1709 Date: 2004-06-20T01:28:18-04:00 List-Id: 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