VOICE Home Page: http://www.os2voice.org |
October 2001
[Newsletter Index]
|
By Michal Necasek © October 2001 |
The evolution of OS/2 started - well, a long time ago. Probably the most
important point in OS/2 pre-history was the introduction of IBM Personal Computer
(a complete lack of inventiveness when it comes to product naming, so typical for
IBM) in 1981. The designers of the IBM PC unfortunately made one huge mistake -
they grossly underestimated the popularity and impact of the PC. Of course blaming
them for lack of foresight would be kind of silly. If they could see into the future,
they could have made big bucks in the future prediction business and wouldn't need
to bother designing computers. Anyway the original plan was to sell 250,000 PCs
over five years. IBM in fact sold that much before the PC was even officially released!
Not to mention in the next five years... And even now the PC architecture suffers
from many design choices made twenty years ago. Again, that's not to say the choices
were poor at the time when they were made, just that too much of a good thing (backwards
compatibility) can be bad.
The IBM PC had one feature that propelled it to unprecedented popularity: it
was an open system. IBM published all the hardware specs and anyone could make add-on
cards for the PC and even complete 'clones'. This soon created a huge market for
all the new hardware manufacturers. The quality was often shoddy but the stuff was
cheap and selling like hot cakes. This continues on until the present day. As they
say, the more things change, the more they stay the same.
On the software side, IBM decided to contract a third party to write an operating
system for the PC. The wonderful stories about how PC-DOS came to be the OS of choice
for the PC have been told elsewhere. PC-DOS itself wasn't all that wonderful however.
In fact calling any version of DOS an "operating system" is stretching
the definition more than a little, and especially PC-DOS 1.0. But let's get back
to the history. Just like the PC hardware, the software components were very open.
The interfaces to DOS and the BIOS were well documented and it was easy for third
parties to use and extend them. This enormous flexibility is the reason why DOS
is still used even now for some tasks.
The DOS and BIOS interfaces unfortunately also had one major deficiency.
They were not stellar performers and what's much worse, they didn't cover the complete
functionality of the PC hardware (especially DOS was seriously lacking in this regard).
This meant that to take full advantage of hardware capabilities, many application
programs had to access the hardware directly, circumventing the DOS and the BIOS.
This is a Bad Thing(TM) and came to haunt PC software and hardware vendors (and
users) for years and years to come. More about this later.
OK, we're now in the early 1980's. The PC is a popular business tool, the software
and hardware markets have exploded and practically everyone sells some gizmos and
nifty utilities for the PC. But PC users are not quite happy (OK, humans are never
quite happy but that's besides the point, because that's built in). They actually
have good reasons for this unhappiness:
But perhaps the most significant advance was realized by the CPU. The IBM AT
sported the Intel 80286 CPU (with 6MHz frequency compared to 4.77MHz 8088 CPUs in
the PC). The 286 was still a 16-bit CPU just like its predecessors but had one major
new feature: the protected mode of operation. The 8086 only had one mode which would
later be called "real mode" (probably because all memory addresses correspond
to "real" physical memory locations, unlike in protected mode). After
startup, the 286 ran in real mode, (almost) fully compatible with the 8086 only
faster and with a slightly larger and improved instruction set. It could address
1MB of memory just like the 8086 - actually the 286 could address 1MB + 64KB but
that's not important here. In protected mode however it could address a whopping
16MB of memory - that was a lot considering that PCs with 16MB RAM became
common more than ten years later. But even better than the vast memory addressing
capability, the protected mode was, well, protected. This means that memory
access wasn't "free for all" - instead, there were four levels (or
rings) of protection and less privileged code couldn't clobber memory belonging
to more privileged components. This meant that user code couldn't accidentally or
deliberately overwrite operating system code and also applications were protected
from each other. Likewise some CPU instructions were now restricted and could only
be executed by code with sufficient privilege, such as the OS kernel or device drivers.
An attempt to breach the protection triggered an exception which would be intercepted
by the OS - that would typically terminate the offending application. All the protection
checks were performed in hardware with minimal runtime overhead.
Both IBM and Microsoft fully realized the problems inherent in the real-mode
DOS architecture and worked on solutions throughout early and mid-80's. There were
two significant products that made it to the retail shelves:
At the same time Microsoft (I don't know about IBM) was working on a whole new
operating system designed to replace DOS. As early as January 1983, Microsoft started
work on a multitasking version of MS-DOS which was intended to replace the real-mode
single-tasking versions. This project kept changing names like crazy. First it was
called DOS 3.0 (DOS 2.x was current at that time). But then Microsoft shipped DOS
3.0 as we know it and the project was renamed to DOS 4.0. Microsoft in fact did
ship a version of multitasking real-mode DOS 4.0. If you think that's wrong... well,
you're wrong. There was another DOS 4.0 shipped later which continued the
line of real-mode single-tasking DOS. This 'special' version of DOS 4.0 was allegedly
only sold to some European OEMs and was never intended for end-users. I've also
seen this version of DOS 4.0 being referred to as eDOS. At any rate after the work
on the "real" DOS 4.0 started, the advanced version was again renamed,
again with a complete lack of foresight, this time to (you guessed it) DOS 5.0.
And yet again, this was not the final name. Instead, sometime around 1985 IBM joined
the project and signed the Joint Development Agreement with Microsoft which gave
both companies ownership of the resulting product. After a while the project was
renamed to CP/DOS - this stood for Control Program/DOS and was an obvious pun on
PC-DOS. But, as if there weren't enough name changes, CP/DOS wasn't the final name
either. Not too long before the release, the product was renamed to OS/2 - probably
to match the new IBM product line, the PS/2 (no, that's not Playstation, it's Personal
System/2). This name in my opinion caused more harm than good because it gave people
the completely wrong impression that OS/2 somehow required IBM hardware to run.
As if there weren't enough names, another name OS/2 had during its development stage
was 286DOS (which made sense in a way).
The PS/2 itself was an interesting beast. It was in many ways a radical departure
from the AT. The PS/2 had an entirely new bus architecture called Microchannel (or
MCA). It was really very good. Its performance blew ISA out of the water. Where
ISA could transfer 5MB/sec, maybe more if you were lucky, MCA could easily reach
transfer speeds of 20, 40 or even 80MB/sec. MCA also had some advanced features
like busmastering and a sort of Plug and Play support via reference diskettes. The
PS/2 also had new BIOS support called Advanced BIOS or ABIOS designed for protected
mode operation. Moreover, the PS/2 introduced the VGA graphics standard and later
XGA.
Unfortunately IBM also made one major mistake: they made MCA proprietary and
charged hardware vendors licensing fees. This had the disastrous effect that the
PC computing world pretty much skipped MCA and about five years later came to the
conclusion that ISA really was bad and PCI had to reinvent many MCA features.
NCR was one of the very few licensees.
But I'm digressing again, back to CP/DOS, er, OS/2. The first version of OS/2
was released in late 1987. From some angles OS/2 strongly resembled DOS and from
others it didn't look like DOS at all. The command line interface of OS/2 1.0 looked
a lot like DOS. All the familiar commands like DIR, COPY, DEL and so on were there.
But the internals were extremely remote from DOS. In fact OS/2 broke very significant
new ground and introduced to the PC many advanced features previously only found
in larger systems. I don't know whether IBM or Microsoft influenced the design of
the OS/2 kernel more. I do know however the names of the lead architects of OS/2:
on the Microsoft side it was Gordon Letwin and on IBM side Ed Iacobucci (later the
co-founder and CEO of Citrix).
It is interesting that OS/2 1.0 did not implement all features designed for it
because of time constraints (again, some things never change...). The most obvious
missing feature was the Presentation Manager (codenamed Winthorn during development)
but there were a number of other less visible features missing which were later
implemented in OS/2 1.1 and 1.2, such as installable file systems (IFSs).
OS/2 1.0 was indeed a radical departure from DOS and had a number of important
features that DOS could never have - and which many other OSes began to support
only many years later.
The OS/2 developers actually considered a way to run DOS applications in protected
mode but there were too many problems with that approach. The final design they
settled on was to have a single fullscreen DOS session that would not execute in
background - the OS/2 programs on the other hand still continued to run even when
the DOS session was active. This required frequent switching between protected and
real mode (if the DOS session was in foreground) which in turn required some extra
work to make the performance acceptable. One example of the extra effort needed
was with device drivers: they had to support dual mode operation, ie. they had to
run in both real and protected mode to keep the number of mode switches down.
The DOS code in OS/2 was undoubtedly based on actual source code used in MS-DOS/PC-DOS
but with many modifications. The file system code for instance was protected mode
only - that is, for file access the OS had to switch to protected mode. This however
became a big plus later when installable file systems were introduced: the OS/2
DOS box had no problem accessing files on a HPFS volume for instance.
All the protected mode code on the other hand was brand spanking new with all
those nifty features listed previously. The kernel and system DLLs were written
almost exclusively in assembly language for two reasons:
IBM Personal Computer DOS Version 0.00 SesMgr- that's from SESMGR.DLL. I told you the final name changes came late in the development cycle.
In OS/2 1.0 there wasn't really much to look at. The interface was text only
- the promised Presentation Manager was still not finished and customers really
wanted something to play with. As I mentioned earlier, it strongly resembled DOS.
But after hitting Ctrl-Esc the Program Selector appeared. It allowed users to switch
between sessions as well as start new sessions. The Program Selector looked like
this (this is a screenshot from the OS/2 1.0 tutorial program):
The theoretical maximum was 16 sessions but because the OS already occupied a
few of them, the real limit was 12 user sessions. But that's still 11 sessions more
than plain DOS - and probably not much of a limiting factor anyway because there
are only so many tasks humans can do at the same time. The original plan was to
run Presentation Manager as a single session (or Screen group) under the Program
Selector but in actual implementation the functionality of PM and the task switching
shell was merged, resulting in PMSHELL. Not the best decision if you ask me... but
IBM and Microsoft of course didn't ask me. Back in the late 1980's I couldn't
provide a whole lot of valuable input anyway because at that time I wasn't even
sure what a PC was and I had certainly never heard of OS/2. I did find computers
very interesting however - as long as I could play cool games on them (in my defense
I should say that by that time I had already started to dabble in BASIC on 8-bit
micros).
The Program Selector was customizable and even had online help (again a screenshot
from the tutorial):
The lightweight text-mode shell TSHELL for OS/2 2.x is obviously modeled after
the ancient Program Selector.
The only somewhat sexy (OK, not totally unsexy) program supplied with
OS/2 1.0 was the tutorial. It was actually kind of neat. The first screen looked
like this:
How old is this blue logo screen anyway? The tutorial had two main sections
- one presenting multitasking and the Program Selector and the other explaining
some basic commands as well as the concepts of directories and files.
Taking these screenshots was an adventure in itself. Unfortunately I have not
been able to install OS/2 1.0 (probably because I couldn't find an appropriately
small enough harddrive, the smallest I could get was 500MB). The tutorial program
however does run under OS/2 1.3 as well as OS/2 4.5 (yeah, that's some backwards
compatibility!). Unfortunately it insists on running in a fullscreen session. But
not being the type who gets discouraged easily, I wrote two small programs that
capture and display the screen. Thanks to the power of the OS/2 API it actually
wasn't all that difficult. I can only shudder when I remember how this would be
done under DOS.
From a user's point of view, OS/2 1.0 had several deficiencies. Some of them
were fixed in later 1.x releases, however some took longer to fix:
Now for a lecture. There's been a lot of disinformation about OS/2 circulated in recent months. Most of this stuff apparently originates with the CEOs of companies who compete with Microsoft in the applications and languages market. Lazy press people who have never run OS/2 and don't know any better pass these falsehoods on to the public.Has anything at all changed since then?
On the whole, OS/2 1.0 was neither a smashing success (or we'd be all running
OS/2 now) nor a total flop (or I wouldn't be writing this under OS/2 version 4.5).
It did introduce a great number of new (mostly good) concepts to the world of PCs.
Programming for OS/2 consequently required a great deal of adjustment, especially
from DOS programmers who were used to the premise that the hardware was "theirs
for the taking". OS/2 suddenly prevented applications from accessing the hardware
directly and forced them to behave nicely. However, that was made a lot easier by
providing a clean and powerful API. That the API was designed well is proven by
the fact that most OS/2 1.x apps can still run years later on the latest versions
of OS/2 as well as (to a lesser extent) Windows NT/2000 without any hassles associated
with virtualization of DOS or Windows 3.x applications.
Most importantly perhaps, OS/2 1.x built a solid foundation for OS/2 2.0, which
itself was a major stepping stone in the PC history. Most of the concepts introduced
in OS/2 1.0 proved to be good and were not significantly changed in later releases.
Hats off to the original designers and engineers at IBM and Microsoft.
[Feature Index]
editor@os2voice.org
[Previous Page] [Newsletter Index] [Next Page]
VOICE Home Page: http://www.os2voice.org