Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : QWHITE13.ZIP
Filename : OPTCOM.TEC

Output of file : OPTCOM.TEC contained in archive : QWHITE13.ZIP

ID:OC DESQview: Optimize Communications
Quarterdeck Technical Note #251 Filename: OPTCOM.TEC
by Vernon Balbert CompuServe: OPTCOM.TEC
Last revised: 7/27/92 Category: DV

Subject: Information on the "Optimize Communications" option in Setup
DESQview / Advanced Options / Performance, and how it affects the
priority of interrupts for communications programs.

In DESQview Setup, Advanced Setup, Performance, there's a line that reads:

Optimize communications? (Y/N): N

By default this is set to N for no. However, if you use a modem or other
serial communications device you may wish to alter it. Setting it to Y is
often good enough but if you have a hardware configuration that is
unconventional then the following explanation may be helpful.

"Optimize communications" changes the priority that your computer assigns to
IRQs. IRQ is short for Interrupt ReQuest. This is a way for hardware to
interrupt the microprocessor and tell it that there is a piece of hardware
that needs immediate attention. In the case of serial communications the
serial port sends an IRQ every time data comes in. Your machine has to be
ready to respond to that IRQ when it happens or you will lose data. Your
computer handles IRQs in order of priority. The normal priority is to respond
to IRQ 0 first, followed by IRQ 1, IRQ 2, etc. We can illustrate it as

0 1 2 3 4 5 6 7

(IRQs only go up to 7 for the purposes here. There are also IRQs 8-15, but
they are beyond the scope of this document.) However, under DESQview, this
order can be detrimental to high speed communcations. This is because COM
1 is assigned to IRQ 4 and COM 2 is assigned to IRQ 3 (Although these
assignments of COM port to IRQ are traditional and nearly universal, many
serial ports allow a different assignment of COM port to IRQ). This puts them
in the middle of the pack, after the keyboard IRQ (#1) and IRQ 2 (often the
mouse) and data can be lost because the IRQ isn't getting enough attention.

This is where "Optimize communications" comes in. This allows you to change
the priority of the IRQs. If you answer Y to "Optimize communications?
(Y/N):", DESQview rotates the order of priority so that IRQ 2 has the
highest, unless DESQview detects that you have a mouse attached to IRQ 2,
in which case DESQview gives IRQ 3 the highest priority. The IRQ order
changes as follows:

2 3 4 5 6 7 0 1

if you have no mouse on IRQ 2, or:

3 4 5 6 7 0 1 2

if you have a mouse on IRQ 2.

As you can see, things have been wrapped around. This causes the IRQs of your
serial ports to have a higher priority than the keyboard (and, if the mouse is
on 2, the mouse as well) thus allowing more attention to be given to COM 2
than other IRQs. But what if you have a modem on COM 1 or a non-standard COM
port such as 3 or 4? Well, "Optimize communications" will accept other things
besides Y or N. You can put in the number of the IRQ that you want to have
more attention paid to. For instance, if you have a modem on COM 1, then you
would like "Optimize communications" set to IRQ 4, just put the number 4 where
it asks for "Optimize communications? (Y/N):". This changes the IRQ order
like so:

4 5 6 7 0 1 2 3

If you have a modem on COM 3 and it's been configured for IRQ 5, then you
should set "Optimize communications" to 5. But what if you have multiple COM
ports on different IRQs? Which one should get priority?

Let's say you have modems on COM 1, 2 and 3 where COM 3 is configured for IRQ
5. Then you should set "Optimize communications" to Y or 3 so that the
highest priority should go to the first modem, next highest to the next, etc.
If COM 3 is configured for IRQ 2, then you should set "Optimize
communications" to 2 so that the communications interrupts get higher priority
than the rest of the system.

DESQview can only rotate the priority order of the IRQs, it cannot change the
order. If you have modems on both COM 1 (IRQ 4) and COM 2 (IRQ 3), if you set
"Optimize Communications" to "4" COM 2 will drop to the LOWEST priority,
below the keyboard: a bad thing. Always set "Optimize Communications" to the
lowest IRQ you use for serial communications.


If you have a mouse attached to a serial port set its IRQ and "Optimize
communications" so that the serial port you use for serial communications has
a higher priority. If you put the mouse on IRQ 3 and the modem on IRQ 4, set
"Optimize communications" to "4". If you put the mouse on IRQ 4 and the modem
on IRQ 3, set "Optimize communications" to "Y". If you use multiple serial
ports for communications make sure that the IRQ the mouse uses does not
intervene between them so you can set "Optimize communications" so that the
mouse has a lower priority.

Just for your information, some IRQs are attached to specific system
resources. The following table explains this:

IRQ System Resource

0 System Timer

1 Keyboard Event

2 Unassigned can be given to addin boards such as a network card or COM
3 or 4

3 COM 2

4 COM 1

5 LPT2: usually can be given to addin boards such as a
network card or COM 3 or 4

6 Diskette event

7 Data request from LPT1:

The assignment of IRQ 4 to COM 1 and IRQ 3 to COM 2 is what IBM chose and is
traditional, but many serial cards allow you to choose other IRQs (typically
2 and 5) or even reverse the assignments of COM 1 and COM 2 to each other's
traditional IRQs.

* Trademarks are property of their respective owners. *
*This technical note may be copied and distributed freely as long as it*
*is distributed in its entirety and it is not distributed for profit. *
* Copyright (C) 1992 by Quarterdeck Office Systems *
************************ E N D O F F I L E *************************