Consultor Eletrônico



Kbase 1428: What is protected mode PROGRESS and how does it work ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
What is protected mode PROGRESS and how does it work ?

920622-gfs01
As an alternative to running within the limits of DOS Real Mode,
access to memory above 1MB is available via a tool called a DOS
Extender. We currently use a product called OS/286 from Ergo
Computing located in Peabody, Massachusetts.

OS/286 allows DOS programs to run in Protected Mode on a 286, 386
or 486 PC with at least 2MB of RAM. Internally, OS/286 provides the
same services to Protected Mode programs in the same way that DOS
provides to Real Mode programs. However, calls to the PC's BIOS can
only be made via Real Mode. Therefore, communication exists between
Real and Protected Mode for this purpose.

The Protected Mode version of PROGRESS consists of several pieces:

o Database, compiler, interpreter and user interface code run in
Protected Mode, above 1MB.

Memory allocation for internal space such the edit buffer, local
buffer, PROGRESS stack, etc. is allocated from extended memory.
Although, the same limits apply here as for Real Mode. (e.g. -e
limit of 63, etc).

o Networking code runs below 640KB in Real Mode.

Network drivers can be placed above or below 640KB. To communicate
with the network drivers, PROGRESS has to switch between Real and
Protected modes. This is accomplished through two additional
programs, PRORPC.EXE and PRONCS.EXE.

PRORPC.EXE is started by the protected mode portion of PROGRESS to
establish the link between protected mode code and PRONCS.EXE,
which is located using the DOS environment variable PRONCS, DOS
PATH, or local directory.

PRONCS.EXE is a program whose main purpose is to communicate with
the network drivers (e.g. NETBIOS, SPX, TCP/IP).

In addition, to effectively communicate with the network drivers,
buffer space must be set up in Real memory to contain the
client/server conversation. The protected mode code does the
allocating of this memory. This can be adjusted with the -Nb startup
parameter.

Starting with PROGRESS version 6.2H, new networking interfaces have
been implemented via PRONCS. A complete list follows:

PRONCS.EXE supports FTP TCP/IP.
PROXLN.EXE supports Excelan TCP/IP.
PRONFS.EXE supports Sun PC-NFS TCP/IP.
PROWOL.EXE supports Wollongong TCP/IP.
PROHP.EXE supports HP TCP/IP.
PROLWP.EXE supports Novell LAN Workplace TCP/IP
PROBTS.EXE supports CTOS Clusters.

All the above also include NETBIOS and SPX support as well.

Using OS/286, we provide an executable (_pprogrs.exe) which
contains the OS/286 Kernel, Loader (ploader.exe) and PROGRESS code.

The Kernel manages operation in protected mode and handles
communication between the program and real mode, particularly DOS
and the BIOS.

The Loader, which PROGRESS provides, loads the kernel and PROGRESS.
It then executes PROGRESS in Protected Mode.

'A20' represents the address of 1MB. To be able to switch between
Real and Protected Modes, a program must manipulate the state of
the 'A20 line'. This is dependent on a PC's BIOS and CPU. One must
'enable' the A20 line to go from Protected to Real Mode, then
'disable' it to return to Protected from Real mode.

Because the handling of A20 is PC dependent, ERGO supplies a
program called TUNE.EXE which tests how to enable and disable the
A20 line and patches the OS/286 kernel with the knowledge on how
to do it.

TUNE.EXE tests for the machine type, and compares it to an internal
database with all common machines in it. If the machine is in the
database, TUNE.EXE resets the OS/286 kernel and quits. Otherwise,
TUNE tries various methods of switching modes and of enabling and
disabling A20. When TUNE.EXE finishes, it will have chosen the
fastest way of switching modes and of enabling and disabling the
A20 line. In some instances, TUNE.EXE may hang the PC you are
running it on, if it does, simply reboot the PC and rerun it until
it finishes. TUNE.EXE leaves a 'checkpoint' file and restarts where
it left off.

If an Extended Memory Manager (EMM) is run on a PC that supports
the VCPI (Virtual Control Program Interface) standard, such as
QEMM386 or 386-to-the-Max, the OS/286 kernel will run without
modification because the EMM takes over the mode-switching tasks.
If the EMM supports XMS, such as HIMEM.SYS, the OS/286 kernel will
use it to allocate extended memory and to enable or disable the A20
line.


The current ERGO kernel (V2.1.06) is not compatible with DPMI (DOS
Protected Mode Interface) memory management. The driver EMM386 that
is supplied with DOS V5.00 is such a memory manager. To use
Protected Mode PROGRESS with EMM386, you need to use the following
line: device=emm386 2048 RAM. The RAM parameter sets aside memory
that is VCPI compliant. In this case we set 2MB aside (2048).

Diagram of memory after Protected Mode PROGRESS is executed

------------------------------- 2MB


-------------------------------


PROGRESS


------------------------------- 1MB

Upper Memory Area

------------------------------- 640KB
DOS

-------------------------------
_PPROGRS.EXE
-------------------------------
PRONCS.EXE
-------------------------------
PRORPC.EXE
-------------------------------
Network Buffers
-------------------------------
FREES
------------------------------- 0KB

Note: If LOWALLOCATE is used, then this amount of memory will be
allocated from REAL memory (below 640KB) and it's used to
supplement Protected Mode memory.
This is set in the config.286 file. See Sys. Admin I manual.

Common Errors
-------------
pmode loader, task failed err = 269

means that a 'General Protection Fault' has occurred. Usually, its
cause is a lack of memory, an incompatibility with another program
currently in memory or a programming bug in the case of HLC or HLI.

From TUNE: cannot enable A20

On a 486 machine, ERGO's software has a problem, and it's fixed in
V2.1.06, which is used in the PROGRESS product starting with
V6.2H18.

From TUNE: cannot make a conclusive analysis of machine

Can happen when running DOS 5.0 and HIMEM.SYS. To remedy, remove
HIMEM.SYS and then run TUNE.


WRITTEN DOCUMENTATION
==============================================

System Adminastration Manual I (dos, dos lan)

DOS/WINDOWS Installation Manual

Progress Software Technical Support Note # 1428