Databook for OS/2: Difference between revisions
Line 17: | Line 17: | ||
* [[Databook for OS/2 – Chapter 1 – What is an Operating System and why is it Important?|Chapter 1 – What is an Operating System and why is it Important?]] | * [[Databook for OS/2 – Chapter 1 – What is an Operating System and why is it Important?|Chapter 1 – What is an Operating System and why is it Important?]] | ||
==Introduction To Operating Systems== | ==Introduction To Operating Systems== |
Revision as of 13:26, 12 February 2018
by David Both
Original site: http://www.databook.bz/?page_id=2704
Notes
This is a partial reconstruction of some of the information contained in the original DataBook for OS/2. In most places, where the data is available, I have kept the original Lotus Notes headings for the pages. This provides a bit of a historical context for the pages as the headers contain dates and times that the documents were created and last updated in Notes.
Most of the original illustrations are missing, even though the captions are still part of the text. I may recreate those, but please don’t hold your breath.
Note that many of the entries in this DataBook for OS/2 were written over 15 years ago. Keep that in mind as you read them and don’t laugh too hard. ;-)
Thanks
Thanks to WD “Bill” Loughman of Berkeley, California for sending me his downloads of some of the pages of the original DataBook for OS/2. Using that data, I am recreating the pages that he has saved. This is a great boon for anyone still using OS/2.
Unfortunately, much more data is still missing. If you, by any chance, have downloaded and saved any pages from the DataBook for OS/2, I would be very appreciative if you would zip them up and send them to me.
Introduction To Operating Systems
This section defines the operating system, and discusses the beginnings of operating systems. It also covers the features to be found in nearly any operating system and the programmer’s view of OS/2.
Defining an Operating System
Chapter:Chapter 01 – What is an Operating System and Why is it Important? Subsection: 04. Introduction to Operating Systems Document Number:01 Topic: Defining an Operating System Date Composed: 10-27-96 01:32:22 PM Date Modified: 12-29-96 01:37:20 PM
The most important single choice you will make concerning your computer is that of the operating system which will create a useful tool out of it. Computers have no ability to do anything without software. If you turn on a computer which has no software program, it simply generates revenue for the electric company in return for adding a little heat to the room. There are far less expensive ways to heat a room.
The operating system is the first level of software which allows your computer to perform useful work.
Understanding the role of the operating system is key to making informed decisions about your computer. This chapter defines the operating system in terms of its role in your computer. It also discusses the major PC operating systems which are available today and tells you why OS/2 is the best one for a business environment.
Defining the Operating System
Every computer requires an operating system. The operating system performs many critical functions which, in turn, allows the computer to perform useful work.
Figure 1-1: A Typical Computer System From the User’s Viewpoint
To understand the need for an operating system, it is necessary to understand a little about the structure of the hardware which comprises a computer system. The microprocessor which is located in the system unit is the brains of the system. It is the part of the computer which is responsible for executing each of the instructions specified by the software application program. The keyboard is used for input to the computer, and printers and displays can be used for output. Random Access Memory (RAM) is used to store data and programs while they are being actively used by the computer. Programs and data cannot be used by the computer unless they are stored in RAM. RAM is volatile memory; that is, the data stored in RAM is lost if the computer is turned off. Diskettes and fixed disks are magnetic media used for long term storage of data and programs. Magnetic media is nonvolatile; the data stored on a disk remains even when power is removed from the computer.
Figure 1-2: Internal Components of the System Unit
All of these pieces of the computer must work together. Data must be gotten into the computer and moved about between the various components. Programs must be loaded from long term storage on the hard drive into RAM where they can be executed. Processor time needs to be allocated between running applications. Access to the hardware components of the computer such as RAM, disk drives, and printers by application programs must be managed. It is the task of the operating system to provide these functions. The operating system manages the operation of the computer and of the application software which runs on the computer.
A simple definition of an operating system is that it is a program, much like any other program; it is different only in that its function is to manage the movement of data in the computer; it also manages access to the hardware devices of the computer by application programs. In addition, an operating system provides at least some minimal system utility programs for managing various aspects of the system such as the hard drive and memory. These utility programs perform functions like deleting files, copying files from one place to another, establishing serial and parallel port parameters, and setting display resolution.
Genesis of the Operating System
Chapter:Chapter 01 – What is an Operating System and Why is it Important? Subsection: 04. Introduction to Operating Systems Document Number:02 Topic: Genesis of the Operating System Date Composed: 12-29-96 01:35:31 PM Date Modified: 12-29-96 01:37:44 PM
In the very early days of programming, the late nineteen forties and early nineteen fifties, each programmer not only had to write the application program which performed a specific function, he or she also had to write all of the very low level instructions which moved the data between the components of the computer. In addition, the programmer had to write those same instructions for managing data flow in the computer every time a new application program was written. This duplication of effort was very time consuming and wasteful.
Finally, some smart programmer said “Aren’t computers supposed to save people time in repetitive tasks? Why don’t we apply that to us programmers as well?”. In 1956, programmers at General Motors Research Labs, in cooperation with North American Aviation, did exactly that; they wrote a program which they called Input/Output System, which simplified the application programmers’ task.
This I/O System incorporated all of the common groups of instructions which were routinely used to move data from one place in the computer to another into libraries to which each programmer would have access. These groups of instructions, once having been developed, were then used many times by many different programmers in many different applications. In 1957, IBM announced its Input/Output Control System (IOCS) which provided the same type of functionality. IOCS provided programmers with standard instruction groups which could be used repeatedly for input and output operations.
These control programs allowed for the execution of one program at a time. The computer operator ran the payroll program. When the payroll program was finished, the operator could run an inventory program or accounts receivable, or whatever job was next in line. This is a single tasking environment, like DOS on personal computers.
To run an application program under IOCS, an operator would place an especial card (this was in the days of eighty column punched cards) called a bootstrap loader into the read hopper of the card reader attached to the system. Behind this card was placed the application program, and then behind the program, the operator placed the deck of data cards. After the cards were loaded into the reader, the operator pressed the LOAD button on the computer. The computer was just smart enough to read one card from the hopper of the card reader; this was the bootstrap loader. At this point, the computer turned control over to the bootstrap loader which was just smart enough to be able to load the rest of the application program and turn control of the computer over to it. If more than one application needed to be run, the operator would wait until the first application had finished. Then, he or she would place the bootstrap loader into the input hopper of the card reader, place the application and data decks in behind, and press the LOAD button again.
In 1962, IBM developed IBSYS, which provided not only for standard I/O instruction groups, but also supervised the operation of the computer. IBSYS supervised the loading and operation of application programs by allowing automatic sequential execution of multiple programs. It allowed multiple programs and their data to be placed in the input hopper of the card reader and it automatically executed each of those programs, one after the other. No more bootstrap loader was required in front of every application program. IBSYS also provided messages to the system operator to mount or dismount tapes and disk packs, as well as to change the paper in the printer so that checks could now be printed, for example, instead of invoices. This capability is very much like the batch files of DOS and OS/2 which can be used to execute a sequence of commands and programs.
IBM introduced the IBM System/360 in 1964, and with it, a new operating system, OS/360. OS/360 was a multitasking operating system, which now allowed systems to process a continuous flow of many different types of jobs with minimal intervention from the operators. Multitasking meant that multiple programs could be loaded into the computer and executed simultaneously. The multitasking capability of OS/360 was initially limited to a maximum of three programs, however. Later operating systems provided the capability to multitask as many programs as the computer had the resources to allow.
Operating System Features
Chapter:Chapter 01 – What is an Operating System and Why is it Important? Subsection: 04. Introduction to Operating Systems Document Number:03 Topic: Operating System Features Date Composed: 12-28-96 06:10:13 PM Date Modified: 01-04-97 03:22:00 PM
Primary Operating System Functions
Any operating system has some core functions which are the primary reason for its existence. These can be referred to as kernel functions because they are built into the kernel of the operating system. Warp’s kernel is the file OS2KRNL. Note that the file name has no extension.
The OS/2 kernel performs the following basic functions.
- Memory management. The kernel allocates and deallocates memory and assigns physical memory locations based upon requests, either implicit or explicit, from application programs. In cooperation with the CPU, the kernel also manages access to memory to ensure that programs only access those regions of memory which have been assigned to them. Part of memory management includes managing the SWAPPER.DAT file and the movement of memory pages between RAM and the swapper file on the hard drive.
- Task management. The OS/2 kernel manages the execution of all tasks running on the system. The scheduler portion of the kernel allocates CPU time to each running process based on its priority and whether it is capable of running. A task which is blocked – perhaps it is waiting for data to be delivered from the disk, or for input from the keyboard – does not receive CPU time. The OS/2 kernel will also preempt a lower priority task when a task with a higher priority becomes unblocked and capable of running.
- Interprocess communication.Interprocess communication (IPC) is vital to any multitasking operating system. Many tasks must be synchronized or communicate with each other to ensure that their work is properly coordinated. The kernel manages a number of IPC methods.Shared memory is used when two tasks need to pass data between them. The OS/2 clipboard is a good example of shared memory. Data which is cut or copied to the clipboard is stored in shared memory. When the stored data is pasted into another application, that application looks for the data in the clipboard’s shared memory area.
- Named pipes can be used to communicate data between two programs. Data can be pushed into the pipe by one program and the other program can pull the data out of the other end of the pipe. A program may collect data very quickly and push it into the pipe. Another program may take the data out of the other end of the pipe and either display it on the screen or store it to the disk, but it can handle the data at its own rate.
- Semaphores can be used to coordinate the activity of two programs or two separate threads within a single program. When one task sets the semaphore, for example, the other task cannot proceed until the first has reset the semaphore.
- Device management.The kernel manages access to the physical hardware through the use of device drivers. Access to physical devices must be managed carefully or more than one application might attempt to control the same device at the same time. The OS/2 kernel manages this so that only one program actually has control of or access to a device at any given moment.One example of this is a COM port. Only one program can communicate through a COM port at any given time. If you are using the COM port to get your e-mail from the Internet, for example, and try to start another program which attempts to use the same COM port such as HyperAccess Lite, the OS/2 kernel detects that the COM port is already in use. The kernel then uses the hardware error handler (HARDERR.EXE) to display a message on the screen that the COM port is in use.
- I/O Management.The kernel is also responsible for managing I/O devices. This includes parallel and serial port I/O, and file system I/O.The kernel does not actually handle physical access to the disk, but rather manages the requests for disk I/O submitted by the various running programs. It passes these requests on to the file system, whether it be FAT, HPFS, CDFS (CD-ROM file system), or NFS (Network file system), and manages the transfer of data between the file system and the requesting programs.
Much of the code for actual implementation of these kernel level functions resides in dynamic link libraries such as DOSCALL1.DLL. The command processor, CMD.EXE is also part of the kernel. Some basic command line commands are also included in the kernel as part of the file CMD.EXE. The commands are called Internal commands because they are a part of the kernel. The COPY and DEL commands are examples of internal commands.
Utilities
In addition to its kernel functions, most operating systems provide a number of basic utility programs which enable users to manage the computer on which the operating system resides. These are the external commands such as XCOPY, FDISK, FORMAT, DISKCOPY, and so on, which make managing the computer so much easier. These utilities are not truly part of the operating system; they are merely provided as useful external tools.
OS/2 Warp from a Programmer’s Viewpoint
Chapter:Chapter 01 – What is an Operating System and Why is it Important? Subsection: 04. Introduction to Operating Systems Document Number:04 Topic: OS/2 Warp from a Programmer’s Viewpoint Date Composed: 12-28-96 06:27:11 PM Date Modified: 12-29-96 12:41:01 PM
Long Term Compatibility
It is important to note that one very compelling feature of OS/2 is visible only to programmers. Warp has a very stable set of APIs (Application Programming Interface). An API is an interface through which programmers use a high level language to access operating system functions and data.
Although the API function set of OS/2 has grown over the years, it has remained remarkably stable and consistent. Programs written on and for very early versions of OS/2 will still run properly on today’s Warp 4 and on tomorrow’s versions of OS/2, whatever they might be called.
I am not a programmer, although I program a little bit so that I can more fully understand the inner workings of OS/2. I wrote a very small C language program several years ago under OS/2 1.1 using the tools available at that time. This was a simple Presentation Manager (GUI) program which created a window on the desktop in which was displayed some information about the operating system and disk drive usage. I used the API functions available at that time to obtain the operating system and disk data. That little program still runs today on Warp 4 with no errors and with the same correct results as I obtained on OS/2 1.1. The reason is the consistency of the OS/2 APIs.
IBM believes that customers (and programmers are part of the customer set for any operating system) should be able to expect long term consistency and backwards compatibility in the products they buy from IBM. That means that programs which ran last year or two years ago or last month, should run today and should still run tomorrow. It means that complete code rewrites should not be required every time the operating system is upgraded. Actually IBM believes this about its hardware, too. There are IBM ES/9000 systems which are still running programs written for the System/360 back in the 1960s. This is due to the backwards compatibility of IBM’s hardware and operating systems.
IBM brings this same compatibility to the desktop with OS/2 Warp. Not only can it run the programs written for early versions of OS/2, it can run almost every DOS and Windows 3.x program ever written. That is more programs than any other operating system on the face of the planet.
There have been about as many versions of Windows to date as there have of OS/2. OS/2 has at least 10 major version releases not counting CSDs and Fixpaks:
OS/2 1.00 OS/2 1.10 OS/2 1.20 OS/2 1.30 OS/2 2.00 OS/2 2.10 OS/2 2.11 for Windows OS/2 2.11 OS/2 Warp for Windows OS/2 Warp OS/2 Warp Connect OS/2 Warp Connect for Windows OS/2 Warp 4 OS/2 Warp Server
And almost every OS/2 program will run on all versions. Almost every DOS and Windows program will run on every version of OS/2 since 2.00.
Windows (In)Compatibility
Microsoft has invented a new set of APIs for almost every version of Windows it has ever produced. Programs written for Windows (V1) or Windows 286 will not run on any later versions of Windows. Windows 2.0 programs won’t run on Windows 3.1 or Windows 95 or Windows NT. Most Windows 3.1 programs will not run under Windows 95 or Windows NT.
Why? Because, in my opinion, Microsoft has no desire for their Windows products to be backwards compatible. Which company sells the most horizontal applications (spreadsheets, word processors, etc.) for Windows? Why, Microsoft, of course! Microsoft plays a game with the rest of the industry. Every time one or more of the horizontal application vendors competing with Microsoft approaches a significant market share, Microsoft announces a new version of Windows. And interestingly enough, each major new version is the proud possessor of a completely new API set.
Of course the Microsoft horizontal application programmers have access to the API before anyone else, and so their applications are available for the new operating system before anyone else’s. Big surprise!! So Microsoft leads the pack in market share right from the beginning.
Every time a major new version of Windows is released, every software vendor who wants to remain current must completely rewrite their application software.