Chapter 8, Operating Systems and Utility Programs

Discovering Computers 2004

File modified  11 May 04 1523 hrs.

Topics

Used Computers and Upgrades

Do not buy a used computer unless you also get the original CDs containing the operating system.
If you purchase a used computer with the intent of using specific software already on that system, make sure you get the original disks for that software.  If you need to upgrade the software later, you might be required to first insert the original software version disk.  If unavailable, the update copy might assume the previous version was pirated and will disable the old copy as well as not install the new version.
Upgrading the operating system does not always produce better performance of applications programs.  For Microsoft products, if you upgrade the operating system, you might need to also upgrade all the corresponding applications software to be at least contemporary to the operating system before it will work well, and also often upgrade the hardware.  Count the total cost first.  It is better to upgrade all at once than to upgrade piecemeal.

System Software

Types of software: applications, and systems software
Systems software
Controls or influences control of basic resources of a computing system.
Provides functions without anticipating applications.
Influenced by the hardware.
You can write programs to run on a computer with no operating system to manage it.  (An operating system is an example.  It is a program that is not managed by another operating system!)  
System software
Operating systems
Utilities (more discussion later)
Translators: Compilers, Assemblers, Interpreters

Operating Systems

STATEMENT OF BILL GATES, CHAIRMAN AND CEO MICROSOFT CORPORATION, 
Before the Committee on the Judiciary, United States Senate, March 3, 1998
http://www.igc.apc.org/trac/feature/microsoft/monopoly/gates.html
17 Jan 2002

Microsoft is perhaps best known for developing and marketing operating systems, such as its Windows family of products. Here again, however, we face intense competition from many sources. Dozens of operating systems are available for a variety of computers, ranging from new generations of so-called "information appliances" (such as handheld personal computers or "smartphones") to powerful mainframe computers. IBM alone offers a range of operating systems that include PC-DOS and OS/2 (for personal computers), AIX (for mainframes, servers, workstations and personal computers), OS/400 (for minicomputers), and OS/390 and other mainframe operating systems. Other major operating system vendors include Apple (Macintosh), Novell (IntranetWare), Sun Microsystems (Solaris and JavaOS), Hewlett Packard (HP/UX), Digital Equipment (VMS and Digital UNIX), Lucent (Inferno), Santa Cruz Operation (OpenServer and UnixWare). Overall, Microsoft accounts for just 13% of all operating system-level software revenues (a product category that includes operating systems and related software such as utilities).

[Linux was not in Bill Gates' list. Linux was released in 1994, but had not yet become a system in widespread use. Linux was distributed under the General Public License (GPL).]

When purchasing application software, make sure it is compatible with your particular operating system and hardware!

Operating system
The operating system is the executive manager of computer hardware resources.
A processor can operate without an operating system.  The purpose of the operating system is to provide services to applications programs and make the overall use of the computer more efficient.  It is very possible to write a program that can run on a computer without the operating system being present.  When this is done, the burden of all the details fall onto the shoulders of the programmer to handle all hardware-dependent aspects of the task.  Many special purpose computers run without an operating system, such as in a missile seeker head.  If your car has a processor that controls fuel, air mixture, and ignition timing, it probably runs without an operating system.

 

Starting a computer
The process of loading the kernel of an operating system into memory when a computer is starting is called booting the computer.  A few instructions must be loaded immediately into the computer to begin the process of reading in the operating system.  These few instructions are called the bootstrap loader.
On very old mainframe computers, the computer operator literally keyed the instructions in binary form into the computer via front panel controls.  The computer was then placed into run mode and these instructions were executed.  The IBM 7040 required 19 instructions (36 bits each) to read the operating system kernel from hard disk into memory.
Later computers permitted the initial instructions to be read from paper tape, mylar tape, or aluminum tape.  The latter was in a loop, and was referred to as a bootstrap.  The CDC 8090 did this.  
On microcomputers today, the initial set of instructions reside in ROM.  If the ROM is located in addressable memory, the contents do not need to be recopied into memory before being used.  This initial benefit may become a hindrance if that address space is desired for other code.
Starting a PC
Cold Boot:  Starts the operating system when turning the computer on.
Turning the computer off and back on should be the method of last resort for regaining control of the computer.
Warm Boot:  Starts the operating system without requiring the computer to be turned off and back on.
On Windows 95 and later: Start | Shutdown | Restart
On most PCs: CTRL-ALT-DEL works if the computer is unresponsive to mouse or other keyboard commands.
Some computers have a reset button will restart the computer without turning the computer off first.
Some computers with a reset button starts the boot process at an earlier stage than done with twice pressing CTRL-ALT-DEL.
Sequence
Turn on power
CPU reset, fetch first BIOS (Basic Input/Output System) instruction from ROM.
Power-On Self Test (POST) from BIOS. Checks:
System buses
System clock
Adapter cards
How much working RAM is installed.
Mouse
Keyboard
Secondary storage devices (disk drives, etc).
Compare POST results with configuration previously stored.  
Amount of memory
Type of disk drives: # heads, cylinders, sectors per track
Keyboard
Monitor
Current date and time
Other devices
On most PCs, this is stored in a low power memory chip implemented with CMOS technology, and hence is often called "the" CMOS chip. Another name for it is the "BIOS chip", which is more accurate.  (CMOS technology is used for many other applications too.)
BIOS fetches Operating System boot program from the boot drive: A, CD or DVD, or C
Load boot program into memory and execute.
Boot program loads OS kernel into RAM.
OS loads configuration tables and drivers.
OS loads remainder of memory-resident portion.
Location of operating system code
Kernel: The portion of an operating system required for routine tasks for continuity of operation.  The kernel excludes software for tasks that are performed occasionally.
Memory-resident portion: The portion of the operating system kernel that is retained in memory to minimize the burden for accessing the secondary storage for operating system code.  In a virtual memory operating system, the memory-resident portion of the kernel is protected from being swapped to disk.  On small memory machines, it is common for portions of the kernel to be swappable.
Windows Registry
Hardware-specific information for use by hardware detection and Plug and Play system components.
Contains initialization and status information for many application programs.
Can have multiple configurations for the same computer. (Home, travel; different users)

 

Catastrophe
It is good to print out the data contained in the CMOS chip for reference.  This is necessary only when you have changed hardware.
Make a recovery disk every several months.  
Use the boot disk if the system crashes and will not restart.
If the boot disk does not work, use the Rescue CD or Rescue Disk that came with your PC.
If all else fails, remove the small battery that powers the CMOS chip.  Wait a minute.  Reinstall the battery.  The computer will now restart.  You will need to reenter BIOS data into the CMOS chip.  It is possible that you may need to reload your operating system.

 

Operating System Features
These factors are major influences on the sophistication of an operating system:
Number of users permitted
Number of tasks permitted
Number of CPUs
Single-user, single-tasking
Multitasking
Allows multiple simultaneous tasks in an active state.
Foreground, background
Foreground: Tasks running interactively with user
Background: Tasks running without user interaction
Multi-user, time sharing
Preemptive multitasking: Operating system proactively schedules and allocates processes to resources according to preset time slices.
Multiprocessing
Allows simultaneous use of more than one processor.
Processor assignment and management.
Processor coordination: access to common resources, message passing.
Categories: 
Stand-alone: Does not require connection to a network to perform useful tasks.
Network: Two categories.
Permits (but does not require) connection to a network.  Allows file and resource sharing when a network is working.  Computers with groupware can usually work in stand-alone mode when the network is down.  Murphy's Law: Networks seem to fail at the worst possible time, and also early on weekends and holidays.  This is when workaholics try to catch up, and when productive deep thought can take place without distraction.  Essential software should be loaded on individual computers.
Requires connection to a network in order to perform useful tasks.  Network PCs do not have storage or printing capability.  The operating system must use network resources to perform these tasks.  This setup is useful in a corporate or military setting when it is necessary to control and account for access to software and data for security purposes.
Distributed Computing: Performing processing tasks on a collection of CPUs, possibly separated by great distances. There are two varieties. Both varieties require message passing and semaphores. 
One variety is to split a task into independent tasks to be accomplished by separate CPUs. Results are combined in a final step.  
Another variety partitions a problem into coordinated tasks which are then accomplished by separate CPUs. The second variety requires close coordination during task execution. Personal computers have now been networked to perform tasks that previously required a supercomputer.
Some applications lend themselves well to being partitioned for execution on a distributed computing system (multiple CPUs) or network. http://www.psc.edu/htbin/software_by_category.pl/hetero_software 
Embedded: The operating system resides in ROM rather than on a disk. This design option is reasonable for small portable or special purpose computers intended to operate without secondary storage devices.
Fault-tolerant computer: 
redundancy at logic level, or component assembly level. 
Trap on failure, perform diagnostics, perform or recommend corrective action.
Logic switching is the deselection of bad circuits and selection of replacement circuits to keep a logic unit working.  Building in the capability to do this is expensive and is not common among retail consumer electronics.
Functions
Overview
F = File Manager
D = Device Manager
U = User Command Interface
M = Memory Manager
P = Process Manager
User Command Interface
Command Line Interface: 
typed input.  Many commands, with many options.  DOS: dir , cd.. , cd windows 
requires use of recall memory
requires training and  use of reference material
UNIX, DOS are common examples
Menu User Interface
Common on mid 1980s computers, and late 1980s laptops.
Graphical User Interface (GUI): 
pointing device input.
requires use of recognition memory.
minimizes training needed for routine productive use.  
Microsoft Windows, MacIntosh OS, IBM OS/2, X-Windows
Process Manager
Schedules use of the processor.
Keep separate the concept of number of users, number of processors (CPUs), and number of tasks (processes).
Operating System Types Single process
operating system
Multiprocessing
operating system
Single task
operating system
Single user  
Multitasking
operating system
Single user
Multiuser (time share)
Single user (supercomputer)
Multiuser 
A user is merely a command stream with the ability to initiate an interrupt.  It can be a human sitting at an input device, or it can be a batch command or script file.
A multiple user system must at least be a multitasking system, since monitoring each command stream is itself a task.
A multiplayer game can be a single task running on a single process operating system.  Fir this example, the "user" is the command stream that invoked the program.  The players are merely providing data inputs to the game.  Responding to player input is done under application program control.  The application program is the single task.
A multiplayer game can be implemented to spawn tasks, and thus need a multitasking operating system.  It can also be implemented to take advantage of multiple processors.
A computer with a coprocessor (multiprocessor hardware) can be used with a single task / single process operating system by suspending activity of the master CPU and assigning the task to the coprocessor until the coprocessor is finished.
For a coprocessor to perform a task in parallel with a master CPU, the operating system must be able to spawn a second task and assign it to the coprocessor, and handle termination of the coprocessor task when it is finished.  It is possible to have an operating system to handle coprocessors (such as a floating point processor) as a special case without being designed to handle general independent processes (tasks).
Performance monitor
Memory Manager
Allocates, schedules, and manages use of primary storage.
Buffer
Virtual Memory
Operating system logical address space is larger than primary storage physical address space.  Logical and physical address spaces are partitioned into pages.  Pages of logical address space that are not needed immediately are placed onto secondary storage.  Windows calls this the swap file.
Paging, thrashing
Adding more memory does not always cure thrashing.  Sometimes, you need to kill a task that is memory hungry.  Sometimes, this means uninstalling software that does monitoring functions, such as parts of Norton System Works.
Belady's Anomaly
Device Manager
Allocates, schedules, and manages use of secondary storage hardware and other devices.
Device driver
Exchanges command, status, and data between a device and the operating system.
Plug and Play
Interrupt Request (IRQ)
Error recovery
External device interrupt request
Virtual Device
Print spooler; print queue.  SPOOL stands for Simultaneous Peripheral Operation On Line. http://webpages.charter.net/thecomputercollection/ibm1410/ibm1410.htm 18 Jan 2002.
File Manager
Manages the file system, and the exchange of data with secondary storage system.
Security and access control.
Windows 9x, Windows NT and XP, and Unix file systems are very different and not compatible.
Windows is very inefficient in use of large capacity disk drives.  
28 bits are used in the file allocation table under FAT32.  Cluster size depends on disk capacity.  Partitioning the hard drive into multiple logical drives reduces cluster size. 
Logical hard disk cluster size: Windows 98 Resource Kit, page 401, Table 10.2
Drive Size FAT32 Cluster Size
256 MB - 511 MB Not supported.
512 MB - 8 GB 4 KB
8 - 16 GB 8 KB
16 GB - 32 GB 16 KB
> 32 GB 32 KB
Files are indexed by a linear linked list structure.
Windows writes two file allocation tables on a floppy disk. Redundancy is for robust use by novices.
Unix permits much faster retrieval from large files.  Files are indexed with a tree structure.
Administration. (Not part of every operating system.)
Accounting functions.
Access control to system.
Enforcement of license restrictions.
Popular current operating systems
DOS, Microsoft Windows 3.x,  Windows 95, Windows 98, Windows 2000, NT, Windows Millennium Edition, Windows CE, Windows XP
Palm OS, Mac OS
OS/2 Warp: One of the first PC multi-operating system platforms.
UNIX, Linux, X-Windows
Novell NetWare, Banyon Vines, Microsoft Internet Information Server
GNOME: Free desktop environment for UNIX
http://www.gnome.org/ 
Permits use of components across a network

Utility Programs

Utility programs consist of software that perform functions related to the efficiency of the computer which are initiated upon user command.
The dividing line between operating system and utility software is not always precise.  Functions once performed by utility programs occasionally get built into an operating system.
In the early 1960s, output from an IBM 7040 intended for the printer was written to magnetic tape.  That tape was then taken to an IBM 1401.  A program on the IBM 1401 read the tape and sent the output to the printer.  This program was called a print utility.
Screen savers were programs that ran as separate tasks and were not part of the operating system.  Software to invoke the action of screen savers is part of Windows.  Screen savers are still considered as utility programs, but may later be considered as part of the user interface portion of an operating system.
File maintenance: format, viewer, (de)compression, defragmenter, uninstaller, backup and restore, anti-virus
Formatting is the process of recording the sector boundary codes on a magnetic disk prior to using the disk for storage of data.
Defragmenter: Reorganizes files to improve read access performance.
Personal Firewalls: Protect computer against unwanted intrusions.
Diagnostics: troubleshooting; scandisk; Power On Self Test (POST); performance monitor; error logging (Dr. Watson)
Windows 98 System Tools menu:
Maintenance: screen saver (prevents CRT screen burn on old CRTs), logic switching
Screen savers are not energy savers. When old monitors were left on for a long period of time without changing the cursor position, the character at the current position would become burned into the phosphor. To solve the problem of physically damaging the tube, software was written to move the cursor around on the display when the mouse and keyboard had not been used for some predetermined period of time.  New monitors do not have this problem.  Further, the Energy Star compliant monitors turn off after a preset time, eliminating the problem completely.  Today, screen savers are primarily entertaining.  They serve the useful function of replacing a display of possibly sensitive information with an innocuous image.  This limits the chance that an unauthorized person would view sensitive data when the monitor is unattended.  Screen savers can be password protected to prevent going out of screen saver mode unless a correct password is entered.  This is desirable for people that work with sensitive corporate or personal data.
Power Management
Power loss shut down. Belkin UPS has a data cable to a communications port or USB port over which a signal is sent to the computer if primary power is lost.  A timer is started when a signal is received.  If primary power is not restored before a predetermined time has lapsed, then power management software commences an orderly shutdown of the computer.  This includes saving a snapshot of memory or by saving and closing all open files.
Standby mode. If a computer is designed to have a standby mode, the computer will enter the standby mode after a predetermined time lapse since the last movement of the mouse or key press on the keyboard. Standby mode may include stopping disk drives.
Performance Monitoring
Examples: Norton Utilities