From: rafetmad@cheshire.oxy.edu (David R. Giller)
Subject: Re: OS/2 2.0 vs. 32-bit DOS protected
Organization: Occidental College, Los Angeles, CA 90041 USA.
Distribution: comp
Date: Mon, 13 Apr 1992 00:31:55 GMT

In article <1992Apr12.204856.29589@ux1.cso.uiuc.edu> sjc28473@uxa.cso.uiuc.edu (Steven Joseph Chmura) writes:
>Could someone help me understand the advantages of running 32bit os2/2.0 apps
>versus 32-bit protected mode dos applications????  I know I know all about
>the VM and protection.  I am simply wondering if OS2/2.0 32bit apps
>will run significantly faster than the same program compiled under
>the 32bit instructions for dos.

This is difficult to say.  There are lots of issues involved, and whether
one type is just plain faster might not be the only issue.

First off, applications that are designed for an operating system rather than
designed to go around one are cheaper to make, and are more likely to be
cheaper to support.  DOS extenders are messy.  They are working against
10 years of accumulated DOSisms, and they have to essentially create their
own operating system functions, like Windows.  The problem is, you can't
run more than one DOS-extended application at a time, typically, and when
you do, you have a huge overhead of two applications that have to manage
themselves and the computer.  DPMI is an example of a DOS extender technology
that does a good job of solving lots of these problems, but it's not easy
either.

32-bit OS/2 applications aren't going around anything.  They are talking
directly with the OS, in ways the OS understands.  This relationship is
enforced, which means you are guaranteed future compatibility, if the OS
makes any attempt to keep backward compatibility.  For example, OS/2 2.0
is a new, 32-bit system with a new, 32-bit API.  This is a radical change
from OS/2 1.x.  However, OS/2 2.0 has support for the old APIs, and thus
old, 16-bit applications work just fine, despite the fact that the system
on which they are running has undergone a complete revolution.

In addition, OS/2 provides multithreading, which is a simple way to make
programs much simpler, and yet more responsive and with the same functionality.
This is very difficult or impossible to do effectively with most DOS
extenders.  DOS is not re-rentrant, which means that no program can have
two sections that require concurrent access to OS functions.

One reason that you can't compare OS/2 2.0 32-bit programs with DOS 32-bit
programs is that DOS really has no 32-bit interface, and so there is no way
to write a single program that will compile and run under both operating
systems.  OS/2 provides a set of OS functions, and DOS has ways of hooking
in DOS extenders to provide similar functions.  However, the interface and
programming style is completely different, and moving from one enviroment to
another requires, basically, a complete rewrite.

To answer your question directly, the programs are likely to run at the same
speed, there are other advantages to using OS/2, that you only get with a
GUI and full 32-bit operating system, such as interapplication protection,
a fast file system, multithreaded file access, etc.

-Dave
-- 
David Giller, Box 134 | Q: How many Oregonians does it take to screw in a light
Occidental College    | bulb?  A: Three.  One to replace the bulb, and two to
1600 Campus Road      | fend off all the Californians trying to share the
Los Angeles, CA 90041 | experience. ---------------------------rafetmad@oxy.edu
Newsgroups: comp.os.os2.misc