home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20122 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.0 KB  |  47 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!enterpoop.mit.edu!bloom-picayune.mit.edu!daemon
  3. From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  4. Subject: Re: Serial communications problems
  5. Message-ID: <1992Dec13.021248.3074@athena.mit.edu>
  6. Sender: daemon@athena.mit.edu (Mr Background)
  7. Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
  8. Organization: The Internet
  9. Date: Sun, 13 Dec 1992 02:12:48 GMT
  10. Lines: 35
  11.  
  12.    From: rich@falcon.engr.utk.edu (Steve Rich)
  13.    Date: 12 Dec 92 21:59:13 GMT
  14.  
  15.    I have a simple (and probably stupid) question: How do you designate that
  16.    the com port has interrupts disabled? My com3 isn't attached to an
  17.    interrupt. (I know where to designate the interrupt number in serial.c,
  18.    but I don't know how to tell it not to use one at all.)
  19.    Thanks.
  20.  
  21. Because of Linux serial driver works, a serial port must have an IRQ
  22. associated with it, or it won't work.  In DOS, you can get away with not
  23. having an interrupt (at least for some applications) because you're
  24. working in a signle-threaded environment.  This allows you to monopolize
  25. the CPU while you wait for characters to come into the serial port.  In
  26. multi-processing system such as Linux (and any Unix-like system), you
  27. can't afford to tie up the CPU waiting for the serial port.  Instead,
  28. the process which is waiting for serial input allows some other process
  29. to run, and when the serial port is ready, it sends an interrupt to the
  30. CPU.
  31.  
  32. It would be possible to write a serial driver that did not use
  33. interrupts --- by hooking something to the timer interrupt and having it
  34. check 100 times a second to see if there's anything on the serial port;
  35. but it would ruin your system performance, and it wouldn't really work
  36. unless you had a 16550A UART, or if you aren't doing anything faster
  37. than 600 bps.  (And even if you had a 16550A, you wouldn't be able to do
  38. anything faster than 9600.)
  39.  
  40. Because of these limitations, I haven't attempted to include such
  41. functionality in the Linux serial driver; it is theoretically possible,
  42. however. 
  43.  
  44.                         - Ted
  45.  
  46.  
  47.