home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / sysv386 / 14206 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.1 KB

  1. Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!apple!starnet!jpp
  2. From: jpp@StarConn.com (John Pettitt)
  3. Newsgroups: comp.unix.sysv386
  4. Subject: Re: Loosing incoming serial characters [summary]
  5. Message-ID: <1992Sep9.060117.14953@StarConn.com>
  6. Date: 9 Sep 92 06:01:17 GMT
  7. References: <JOCHEN.92Sep5145619@busybit.mrz.sub.org> <Bu5qJq.HJo@gator.rn.com> <CFT637P@geminix.in-berlin.de>
  8. Organization: Starnet-Public Access UNIX--Los Altos, CA  415-949-3133
  9. Lines: 39
  10.  
  11. [ stuff about bus master etc deleted ] 
  12.  
  13. First to answer somebody elses question the standard for the PC bus is
  14. IEEE P996.
  15.  
  16. Now on to the main event - serial I/O (or lack of).  The basic problem
  17. is that serial I/O is essentially a real time asyncronous event.  I.E.
  18. you can't control it.  This is fine if you have a real time OS to handle
  19. it but if you run an timesharing OS (like say UNIX) it becomes a
  20. problem.   The only real solution is to add more buffering (this is the
  21. benifit of the 16550).  However if you delay log enough the buffer will
  22. fill up.  If you are using the same CPU to do flow control as to empty
  23. the buffer then flow control won't help if your CPU is busy doing some
  24. other task (like SCSI interrupt handler).   
  25.  
  26. One of the proposed solutions, moving to a memory mapped disk, may not
  27. help too much.   Firstly the IRQ overhead is probably the same and
  28. secondly it will introduce a copy from shared memory to kernel buffers
  29. which will impact performance.  
  30.  
  31. So what to do:
  32.  
  33. Ensure that the serial driver spl (the level of it's interrupt handler)
  34. is better than that of the disk driver.  This may be non trivial since
  35. the spltty() value used for all the line diciplin code is a kernel
  36. source value.   However it is possible to ensure that you interrupt that
  37. the correct (splhigh or spl7 value) and by double buffering and calling
  38. the line diciplin from a poller ensure that it's run at the correct
  39. spltty and also not called for every byte of input.
  40.  
  41. Hope this helps
  42.  
  43. Regards
  44. John Pettitt (Device Driver Hacker - Retired)
  45. -- 
  46. John Pettitt                    jpp@starconn.com
  47. Archer N81034                    apple!starnet!jpp
  48. Me, say that, never: It's a forged posting!    Fax:   +1 415 967 8682
  49.                         Voice: +1 415 967 UNIX
  50.