[comp.windows.ms] Windows handling multi-tasking with comm. pgms.

baer@uwovax.uwo.ca (06/28/91)

I am running a communications app. which comes in both a DOS and an OS/2
version (Rexxterm).  I just purchased a 9600 baud modem for my 16mHz
386sx.  This modem has MNP 5 (and v.42) error correction; of these 2,
the modem at the "mainframe" end seems to provide MNP 5 but not v.42.
MNP 5 should provide a throughput of up to 19,200 baud.  Under Windows 3,
when I run the serial port at 19,200 baud and connect at 9600 baud,
I lose characters, even with the communications app. running in the
foreground and no major app's running in the background (file system,
pgm. manager that's all).  With the serial port set at 9600 baud, 
I have no problem with the comm. program in the foreground.  With any
serious multi-tasking in 386 enhanced mode, even this configuration 
(9600 serial port speed) isn't low enough: there is a loss of characters
when I run the com. program in the background (priority=100) and
either Word Perfect or a stats program in the foreground (priority=100).
This despite the fact that the foreground program suffers some 
degradation (typed characters take a while to appear on screen etc.).

Under DOS alone, there is no problem running the communications 
program with the serial port set at 19,200 baud.

Under OS/2, there is no problem either, even when I have 2 or 3 
other processes running.  I can run a stats program in the background
and WP for OS/2 in the foreground (or vice versa), with the comm.
program in the background transferring files with a serial port
speed of 19,200 and no characters are lost (although as I load
more foreground processes, the actual transfer rate seems to go down
-- there must be some handshaking going on -- OS/2 seems to be able
to keep up with my modem when data are shovelled through).

Just thought you might be interested.  Technical explanations/discussions
invited.   


-- 
---------------------------------------------------------------------
Douglas Baer, 
University of Western Ontario, London, Canada N6A 5C2
Internet: BAER@UWO.CA    Bitnet: BAER@UWOVAX

mjh@zurich.ai.mit.edu (Mark Hood) (06/28/91)

I've just downloaded and extracted Kermit for Windows from watsun.  These
files are found in kermit/test/wk*.  The program seems to handle 19200
without losing any characters.
--

Mark Hood
mjh@zurich.ai.mit.edu
"Wouldn't it be FABULOUS if ZIPMAN was in charge?"

jcmorris@mwunix.mitre.org (Joe Morris) (06/28/91)

baer@uwovax.uwo.ca writes:

>I am running a communications app. which comes in both a DOS and an OS/2
>version (Rexxterm).  I just purchased a 9600 baud modem for my 16mHz
>386sx.  This modem has MNP 5 (and v.42) error correction; of these 2,
>the modem at the "mainframe" end seems to provide MNP 5 but not v.42.
>MNP 5 should provide a throughput of up to 19,200 baud.  Under Windows 3,
>when I run the serial port at 19,200 baud and connect at 9600 baud,
>I lose characters, even with the communications app. running in the
>foreground and no major app's running in the background (file system,
>pgm. manager that's all).  With the serial port set at 9600 baud, 
>I have no problem with the comm. program in the foreground.  With any
>serious multi-tasking in 386 enhanced mode, even this configuration 
>(9600 serial port speed) isn't low enough: there is a loss of characters
>when I run the com. program in the background (priority=100) and
>either Word Perfect or a stats program in the foreground (priority=100).
>This despite the fact that the foreground program suffers some 
>degradation (typed characters take a while to appear on screen etc.).

>Under DOS alone, there is no problem running the communications 
>program with the serial port set at 19,200 baud.

There's a tech note from Microsoft (last updated 10 December 90) which
addresses lost data running at 19.2 or higher using KERMIT.

Its suggestions (which I haven't tried since I'm limited to 9600 bps)
are:

  - mark "Lock Application Memory" in the PIF file

  - Set COMxBUFFER to a big value (1024 suggested as a start)

  - Set COMBoostTime to a higher value (10 msec suggested)

  - Set COMxProtocol to XOFF (and use XON/XOFF in REXXTerm)

It also suggests that KERMIT users turn the timer off because delays
between characters caused by Windows' buffering can make Kermit think
it's got a dead circuit.

Joe Morris

testurm@immd4.informatik.uni-erlangen.de (Torsten Sturm) (06/28/91)

Hi, I'm working on a DDK-Driver, so I have the source code of
the comm.drv driver.
The thing is, that this driver is not sending and receiving
an array of characters on an interrupt-based way !! (BTW the assembler
code written there is a terrible one, i've not expected that from MS).
If you send a buffer of chars to the commport, you call WriteComm(..),
which (and now listen good) make a while loop, calling for each char
a routine named $SNDCOMM, not like a normal commdriver with an inter-
rupt scheme !!

So the best speed you can expect is 9600, if you are lucky.

In 386-Mode, the is additionally a vitual device driver between the 
port and the windows comm.drv, which handles the intterupts !
So it could be even slower than in 286-mode !

That all is common weakness of Windows !
Hope that helps !!
---
Torsten Sturm 
tnsturm@faui09.informatik.uni-erlangen.de
tnsturm@faui40.informatik.uni-erlangen.de
testurm@faui41.informatik.uni-erlangen.de
testurm@faui43.informatik.uni-erlangen.de
storm@faui80.informatik.uni-erlangen.de

drazil@netcom.COM (Devin Ben-Hur) (06/30/91)

The Win3 COMM.DRV communications driver is horrible.  There is a replacement
called TurboComm from
Bio-Engineering Research Labs 
2831 7th St.
Berkeley, CA  94710
415/540-8080

This driver is aware of the NS16550A[F]N buffered UART and will virtualize
it in enhanced mode.  It supports high speed interrupt driven comminucations.
I've used it to perform V.32bis/HST communications from both Win3 and DOS
programs in the box in the background while doing database, spreadsheet, 
compiles, etc. simultaneously without ever losing a character.

It cost me around $25, I think the price went up recently.

I've never called it, but their suposed to have a BBS at 415/548-0513
-- 
Devin Ben-Hur             415/948-1067, 415/949-3941
drazil@netcom.com
"To go is to return.  Take the afternoon off."