home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / bsd / 4578 < prev    next >
Encoding:
Text File  |  1992-08-22  |  6.1 KB  |  117 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
  3. From: terry@cs.weber.edu (A Wizard of Earth C)
  4. Subject: Re: (386BSD) Modems and com ports
  5. Message-ID: <1992Aug22.202524.18714@fcom.cc.utah.edu>
  6. Keywords: internal or external?
  7. Sender: news@fcom.cc.utah.edu
  8. Organization: Weber State University  (Ogden, UT)
  9. References: <1992Aug20.171557.30071@watson.ibm.com> <1992Aug20.213721.4548@gateway.novell.com> <14226@auspex-gw.auspex.com>
  10. Date: Sat, 22 Aug 92 20:25:24 GMT
  11. Lines: 104
  12.  
  13. In article <14226@auspex-gw.auspex.com> guy@Auspex.COM (Guy Harris) writes:
  14. >>2)    A UNIX write, once started, must run to completion before it may be
  15. >>    XOFed.
  16. >
  17. >In what sense?
  18. >
  19. >If the serial port device doesn't have DMA, and the main CPU hands it
  20. >each character to be transmitted, one at a time, the driver can, if it
  21. >receives a ^S, just stop handing the device characters until it gets a
  22. >^Q.
  23. >
  24. >If the serial port device *does* have DMA, then, if a DMA operation can
  25. >be halt and restarted later, or can be aborted and restarted from
  26. >where it left off, the driver can, if it receives a ^S, just halt or
  27. >abort the transmission, and restart it when it gets a ^Q.
  28.  
  29. In the sense of an interrupt driven transmitter.  Luckily (or unluckily 8-),
  30. most standard PC comm boards don't suport DMA unless they are a multiport
  31. board.  If there are DMA boards with on-board RAM, then the problem is
  32. generally exacerbated by the fact that you download a block of characters
  33. for output and forget about it.  Unless part of the tty driver is downloaded
  34. to the card (DigiBoard is the only manufacturer currently doing this, to
  35. my knowledge), at least that many characters go out before an XOFF can be
  36. acknowledged.  If there is a lot of bidirectional traffic, both input and
  37. output buffer can be filled, causing a tendency to process 2 times the buffer
  38. size of characters before flow control is recognized.
  39.  
  40. Computone got around this problem (with technology from Arnet, their spin-off
  41. competitor that they bought out) by putting flow control on the board.  On
  42. later ROM revisions you could even turn it off 8-) 8-).  The problem with
  43. this is, at speeds grater than 2400-4800 baud depending on system speed and
  44. loading, you'd lose input characters (in-bound and out-bound flow control
  45. were not seperable).  This probem was alleviated, somewhat, on SCO systems,
  46. when SCO went for 32 to 24 characters for their clist struct size.  The
  47. problem with this was that they didn't tell anyone until two minor revisions
  48. later.  The lucky manufacturers only needed a new driver to not lock up at
  49. high character rates; the unluck ones needed new ROMs.  The very unlucky ones
  50. had soldered their ROMs and needed to replace boards.  This killed two board
  51. manufacturers outright and made things generally difficult, but tended to
  52. reduce the overall problem by about 60% (24 vs 32 into 128 byte buffers,
  53. with a potential for an extra clist full before flow control is effective).
  54.  
  55. >>The problem shared by any flow control whatsoever is lockup on line drop.
  56. >>If the computer is ^s'ed, or !RTS or !CTS'ed, then the driver will wait
  57. >>for the condition to be cleared.  In most cases, this takes precedence
  58. >>over a little thing like DCD dropping because of call waiting or a bad
  59. >>connection.
  60. >
  61. >If so, the driver is probably buggy.  It *should* manage - at least by
  62. >default - to flush pending output, and wake up anybody waiting for the
  63. >output queue to drain, if carrier drops.
  64.  
  65. This generally doesn't happen... the sleep-on address is not necessarily
  66. accessable from interrupt level, where this should happen.  In theory, yes,
  67. it's possible, especially with multi-address sleeps (quote-unquote) such
  68. as are used to implement poll() and select().  In practice, most serial
  69. drivers just lock up until the next call.
  70.  
  71. In *actual* proctice, flow control tends to not be used at all, since it's
  72. much better to have equipment that can have a throughput of 960 characters
  73. a second for 9600 baud settings, and people don't tend to try to fool
  74. themselves (look ma!  19.2!) when their actual throughput after flow control
  75. is only 480-600 characters a second (I know, people will argue that 6000 baud
  76. is better than 4800 baud.  If your equipment supports it is a setting, fine).
  77.  
  78. This behaviour could be described as "buggy", especially if you are a VMS
  79. user who tends to live or die by flow control, due primarily to DEC termials
  80. after the VT220 being ROM-interpretive and unable to keep up with 960
  81. characters a second, especially when doing screen manipulations like line
  82. deletion, etc.  The "good 'ol" Wyse 60 has this problem too, but people will
  83. keep using it for it's other features "Sure it only goes 45 MPH, but *look*
  84. at the tires!"
  85.  
  86. I've been working in async communications on UNIX systems (I was senior
  87. programmer at Century Software, manufacturers of TERM) for over 7 years,
  88. and networking for 4, and I can pretty much *guarantee* you that the vast
  89. majority of UNIX serial drivers, *especially* the DMA ones, will lock up
  90. under flow control eventually, even if everything is set up correctly (and
  91. most users *don't* set everything up correctly, especially modem switch
  92. settings).
  93.  
  94. When you are trying to come up with a general soloution to a problem, you
  95. have to take into account the least common denominator.  In this discussion,
  96. that's that in band flow control is useless because it prevents binary
  97. communications, and that out of band flow control (CTS/RTS) locks up many
  98. drivers (Sun, SCO, ISC, etc.).
  99.  
  100. >Some tty subsystems are buggy in that fashion, but it is a bug....
  101.  
  102. It may indeed be a "bug"; I view it as such.  That doesn't mean that it isn't
  103. everywhere or that it doesn't need to be worked around for the general case.
  104.  
  105.  
  106.                     Terry Lambert
  107.                     terry_lambert@gateway.novell.com
  108.                     terry@icarus.weber.edu
  109. ---
  110. Any opinions in this posting are my own and not those of my present
  111. or previous employers.
  112. -- 
  113. -------------------------------------------------------------------------------
  114.                                                        terry@icarus.weber.edu
  115.  "I have an 8 user poetic license" - me
  116. -------------------------------------------------------------------------------
  117.