home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.dcom.modems
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!ames!data.nas.nasa.gov!taligent!kip-9.taligent.com!user
- From: creed@blowfish.taligent.com (Creed Erickson)
- Subject: Modem/Comm port abstractions
- Message-ID: <creed-151192120136@kip-9.taligent.com>
- Followup-To: comp.dcom.modems
- Sender: usenet@taligent.com (More Bytes Than You Can Read)
- Organization: Taligent, Inc.
- Date: Sun, 15 Nov 1992 21:09:28 GMT
- Lines: 56
-
- The recent discussion of 16550 UARTS and Windows comm port abstraction
- prompts me to ask this newsgroup for some opinions on the subject of comm
- port abstractions.
-
- For those familiar with the 16550 and why a FIFO is A Good Thing, skip the
- next two paragraphs.
-
- If you have a modem delivering bytes to the port at the full bandwidth of a
- 14.4Kbaud channel then you have a little less than 700 microseconds to
- service a received buffer full interrupt. For arguments sake, let's add
- 2:1 modem compression on top of that and you reduce that time to about 350
- microseconds. In a premptive multi-tasking situation (OS/2, UNIX, or what
- have you) which is loaded with a bunch of other interrupt stuff happening,
- this is not an abundance of time. Allowing time for other interrupts and
- task scheduling latencies, you could ocassionaly have the machine
- effectively locked into interrupt service loops and not get enough time for
- the comm program task to process the character before the next one needs to
- be read.
-
- If a 16550 (16 byte FIFO) is used, this maximum bearable latency goes up
- potentially by a factor of 16 to somewhere around 5.5 milliseconds. This
- is a more comfortable timeframe in which to snag characters from the chip,
- pass them off to the comm program, and expect the comm program to actually
- have enough time scheduled to do something with the data. This is one
- reason there are so many proponents of the 16550 for multi-tasking
- environments. The FIFO is a highly desirable feature because it gives
- breathing room.
-
- It has been said here that Windows abstracts the hardware and presents a
- 8250 interface to the software. This seems like a least common denominator
- approach.
-
- My questions are (assume FIFOs can be efficiently emulated in software):
-
- 1) Why is the Windows LCD approach the right one? (Or is it?)
-
- 2) Why not abstract the hardware as a 16550? I.E., programs would see
- the comm port as a 16550, regardless of what is actually there (8250,
- 16450, etc.)?
-
- 3) Using the theory that if something is worth doing then it's worth
- over-doing, why not make the base abstraction a 16550 with a 1Kb FIFO?
-
- 4) Let's go one step further and make the abstraction handle a user
- specified FIFO size, what's wrong with that?
-
- 5) What does this higher level hardware abstraction break? How does it
- break it?
-
- Thoughts? Opinions? Inquiring minds want to know.
-
- Creed Erickson,
- Software Dweeb and Spurious Interrupt
-
- Opinions expressed here are not neccessarily those of my employer, but I'm
- working on it.
-