5-1 - Operating systems
 ***********************

(Thanks to Arne Vajhoej for the useful information and comments that 
 made this chapter possible.
 Thanks to Timothy Prince for the important contribution)

 The computer hardware contains a lot of electronic circuits, without
 the proper software, the hardware will stay just that, a heap of 
 interconnected electronic components.

 The basic software that enables us to use the computer is called the 
 OPERATING SYSTEM (OS). Almost every task is performed using the OS
 routines directly, or indirectly through the shell (command language 
 interpreter) calling this routines.



 Booting the operating system
 ----------------------------
 The first task the OS does is to load itself into the main memory, 
 and run itself, a feat comparable to pulling yourself up with your 
 bootstraps, the term 'booting' derives from just that metaphor.
 
 At 'boot time' the computer is still just a component's heap, there 
 is yet no friendly OS that can load and run programs with a single 
 call to a system routine.

 The magic is performed in several stages, each loading a larger 
 functional subset of the OS, and each doing the preparations needed
 for the next stage.



 Some words on CPU states
 ------------------------
 The Central Processing Unit (CPU) is that part of the hardware
 actually executing programs, in a kind of loop the CPU reads
 (fetches) machine instructions from the memory and executes them.

 That looping behaviour is the normal operating mode, however CPUs
 can be at two other modes:

    Halted    The CPU doesn't loop, it just sits there passively
              although it gets the proper electrical voltages

    Console   The CPU loops, but it doesn't execute a program
              loaded into the main memory, it runs a special
              program supplied by the manufacturer and burned 
              in the Programmable Read Only Memory (PROM)

 Halted mode is the right mode to switch off power. The operating 
 system may put the processor in that mode when a serious internal 
 error occurred.

 Console mode is also called: boot monitor mode, PROM monitor mode.
 It is used to:

    1) Boot the operating system 
    2) Run special software: 

          standalone backup program 
          programs testing the hardware (CPU, disks etc)

    3) Perform some special commands:

          hardware password handling

 Console mode on PC computers is the setup/diagnostics mode, 
 PC CPUs have also a halt state but it is not used. 

 The Halt state may be emulated by console mode, in that case
 halting is just going to console mode (e.g. MicroVAX).



 Booting, halting etc in practice
 --------------------------------
 Operation procedures for booting the operating system or halting 
 the CPU are very system/hardware dependant, and may be specific to 
 a certain hardware model (and even firmware version).

 The best way is to read carefully the appropriate guide, and get as
 much advice as possible from the company's technicians. 

 Because the subject is relatively old technology that is used 
 infrequently, it is difficult to find good documentation, and over
 the years it became a little bit mysterious (like tapes). 


 

 Common Operating Systems
 ------------------------

  Operating system |  Company                      | Hardware               | 
 ------------------|-------------------------------|------------------------|
  VMS              | Digital Equipment Corp. (DEC) | VAX, Alpha (AXP)       |
 ------------------|-------------------------------|------------------------|
 UNIX variants:    |                               |                        |
  SunOS/Solaris    | Sun Microsystems              | SPARC, Intel, Motorola |
  HPUX             | Hewlett-Packard               | PA                     |
  AIX              | IBM                           | Power                  |
  IRIX             | Silicon Graphics Inc. (SGI)   | MIPS                   |
  DEC UNIX (OSF/1) | Digital Equipment Corp. (DEC) | VAX, Alpha             |
  ULTRIX           | Digital Equipment Corp. (DEC) | VAX, MIPS              |
  UNICOS           | Cray Research Inc. (CRI)      | CRAY                   |
  Linux            | Free, supported by GNU        | Intel                  |
 ------------------|-------------------------------|------------------------|
 System 6,7, ...   | Apple                         | Motorola, Power        |
 ------------------|-------------------------------|------------------------|
 OS/2 (WARP)       | IBM                           | Intel                  |
 ------------------|-------------------------------|------------------------|
 OS/400            | IBM                           | 360/370/390, Power     |
 VM/CMS            | IBM                           | 360/370/390            |
 MVS               | IBM                           | 360/370/390            |
 MVS/XA            | IBM                           | 360/370/390            |
 MVS/ESA           | IBM                           | 360/370/390            |
 ------------------|-------------------------------|------------------------|

 Other system software: 
 ------------------|-------------------------------|------------------------|
 DOS               | Microsoft (MS)                | Intel                  |
 ------------------|-------------------------------|------------------------|
 DOS + MS Windows  | Microsoft (MS)                | Intel                  |
 ------------------|-------------------------------|------------------------|
 MS Windows 95     | Microsoft (MS)                | Intel                  |
 ------------------|-------------------------------|------------------------|
 Windows NT        | Microsoft (MS)                | Intel, Alpha, MIPS     |
 ------------------|-------------------------------|------------------------|


 
 What is the best operating system?
 ----------------------------------
 The right answer is: an operating system that can run on your computer
 and you are familiar with. No OS is useful if you can't use it, and
 the better you know it, the more it will be useful.

 Put another way, you should learn how to use your operating system, 
 read the online help, user manuals etc.



 The programming interface to the OS
 -----------------------------------
 Vendor-specific functions shouldn't be used if it is at all possible 
 to circumvent them. Unfortunately, this is a long-standing problem 
 which is particularly acute for graphics functions.

 Some possibilities (admittedly not perfect):  

    1) The suite of commonly used non-standard functions which 
       are being adopted as "libU77" in g77. 

    2) Functions which may be implemented indirectly using the
       standard C libraries. 

    3) POSIX functions which may be accessed directly or via 
       the (non-standard) "system()" system call. 

 Using system routines is a gross violation of the Fortran standard, 
 and against the spirit of standards, they should be used only by
 system programmers

 
Return to contents page