Chapter 2
Operating Systems: Software in the Background

What is an Operating System (OS)?

An OS is a set of programs that lies between application software and the hardware.  An OS is software that controls the hardware. It provides the interface between the hardware and the user.

Operating System Definitions

The most important program in the OS is the kernel, it manages the OS and most of it remains in memory. The kernel then loads other OS programs into memory from disk as needed.  The process of loading the OS into memory is called booting.

Functions of an Operating System

Manage the computer’s resources: directs the hardware to perform tasks, controls the CPU, memory, disk drives and printers. The user need not be involved with the details of the hardware.

Establish a user interface: provide a method for the user to command the computer – command line (MSDOS, UNIX, LINUX) or graphical user interface (Windows, Mac OS use GUIs).

Execute and provide services for application software: interface between the application program and the hardware. All input and output is actually carried out by the OS.

More Operating System Definitions

 

Platform  = Operating system + Hardware

 

Application software is platform specific

 

The term platform refers to a combination of computer hardware and operating system. Wintel (MS Windows running on an Intel based PC) is the most common platform.

Generally, application software such as word processing, spreadsheets, or games, can run in just one platform.

Apple Macintosh using Mac OS is another platform.

The OS determines what software can be run on a given computer.

 

Comparing User Interfaces

 

Command line

Graphical user interface

Command line interfaces require the user to type in commands, then press Enter.  In the MSDOS interface, C:\> refers to the hard disk drive, the > is a prompt, a signal that the system is prompting you to do something.

You can get to the MSDOS  prompt in Windows, too (Start, Programs, Accessories, Command prompt).

In a graphical user interface (GUI), users work with icons and menus rather than typing in commands. Icons and menus allow pointing and clicking with a mouse, an approach that can make computer use fast, easy, and intuitive.

In a GUI, user enters a command by selecting it from a menu or by clicking on an icon or button. For example, if you double-click on the My Computer icon, then double-click on the 3 ˝ floppy A icon, you will see a list of files on the A drive.

 

Ask yourself:  Which interface do you prefer? Why?

Home/Consumer Market

Windows 95 and Windows 98

Windows 98 is a variation of Windows 95 and has much the same screen look.

Plug and Play: a user can install new hardware (printer, scanner, memory, etc) just by plugging it in and turning on the computer. Windows recognizes that the new device has been added and proceeds to configure it.

OLE (Object Linking and Embedding): lets you embed or link one document to another one. For example, you can embed a spreadsheet within a report created in a word processing program that supports OLE. When you click the spreadsheet to modify it, you will be taken to the program that you used to create the spreadsheet.

Windows 95 and forward allow file names of up to 255 characters.

The Microsoft browser, Internet Explorer, is included with Windows.

Digital Video Disk (DVD) support is included with Windows.

Many Windows applications contains wizards.  Wizards are step-by-step software tools that make tasks more user-friendly.

Home/Consumer Market

Windows Me

ME (Millennium Edition). It is built on the same code base as Windows 95 and 98 and has a similar look and feel.

Multimedia support: Windows Media Player allows you to record music CD. Windows Movie Maker provides basic video editing. Windows Image acquisition provides support for manipulating a scanner and digital camera.

Reliability features: if any system files are accidentally deleted, the System File Protection feature will automatically restore them the next time you boot the system. An Auto Update function automatically checks appropriate sites on the internet for updates to the installed operating system and application software.

The Home Networking Wizard guides the user through the process of connecting multiple computers and peripherals. On this network, multiple users can share a single Internet connection.

Corporate Market

Windows NT

Windows NT (New Technology) is meant mostly for corporate, networked environments.  It looks like Windows 98 but it is more robust and heavy-duty. It has been engineered for stability.  Windows NT comes in 2 versions: NT workstation (designed for individual users on a network) and NT server (a network operating system). It lacks support for older Windows versions, and therefore, it is more complex to learn and use.

It requires more memory and processor power than Windows 9x. It is seldom use on non-networked PCs.

Corporate Market

Windows 2000

Windows 2000 maintains the stability and security features from NT, and incorporates Windows 98 ease of set up and hardware awareness.  There are 2 versions: Windows 2000 Professional for individual users, and Windows 2000 for network servers.

Microsoft originally intended that Windows 2000 would be the convergence of the 9x and NT series, providing a single OS for both home and corporate users.  The most noticeable feature of Windows 2000 is that it knows who you are. One computer can serve many people. Once you identify yourself, it will immediately reconfigure to your preferences.  Also, it provides much better support for laptops.
 

Windows XP

Windows XP brings consumer and corporate OS together into a single product.  It incorporates and extends Windows Me with the stable and dependable Windows 2000 environment.

It has 2 categories: network server and desktop computer.  There are 3 versions for network servers, based on network complexity.  There are 2 versions for desktop computers: The professional client and the personal client.

The professional client version is aimed toward business users connected to corporate networks and includes features for file encryption, remote desktop access, and dual processor support.

The Personal client version has an improved user interface (the desktop appears much cleaner and uncluttered), improved multimedia support (support for digital media has been integrated into the operating system, much plug-in software is no longer required), and more extensive personalization.

It also has multiple user support which allows multiple users to be logged on at the same time.  One user can walk away leaving applications running, come back later and resume work with all applications still active. During that time, other users can log on, then leave their applications running.

Windows CE

Windows CE is a subset of windows, scaled back to work with less memory, on smaller screens, and without much, if any, storage.

Windows CE (Consumer Electronics) is designed for the embedded system (computing devices that are integrated into another products such as cameras, telephones) and internet appliance market.

It is used in the Pocket PC.

Windows CE allows internet connectivity.  In the not-too-distant future almost everything will be connected to the internet.

Other Operating Systems

MAC OS had the first commercially successful graphical user interface and quickly gained a reputation for user-friendliness. It is still considered by many to be easier to use Windows.

UNIX runs on just about every type of computer available. No one company controls UNIX. UNIX is the primary OS in use on internet servers today.

LINUX is UNIX-like, you can download it free from the Internet. LINUX is extremely stable – it rarely ever crashes. The biggest disadvantage is the scarcity of applications. LINUX is open-source software, which means that it is freely available and not under the control of any one company. Many users install LINUX in a dual-boot, allowing them to choose between Windows and LINUX each time they boot their PC.

Network Operating Systems

A Network Operating System (NOS) provides the instructions so that computers in a network interact with each other.  It is designed to let computers on a network share resources such as hard disks and printers.

The server version of Windows 2000 is one example of a NOS. Novell NetWare is another example.

A NOS supports data security (Does this user have the right to that data?).

A NOS supports troubleshooting (oops, computer XYZ on the network failed to receive a message intended for it).

A NOS supports administrative control (track online hours and track the number of messages to and from each computer).

In a client/server network, parts of the NOS (mostly file accesses and management programs) run on the server computer, while other NOS components run on the client computer. In addition, each client computer has its own OS like Windows Me.

One of the NOS main tasks is to make the resources appear as though they are running from the client’s computer.

Ask yourself:  What would you do if you discover there is a bug in an OS? 1– keep quiet, 2—contact manufacturer, 3—contact popular magazine.

Operating Systems for Large Computers

Mainframes are large computers owned by businesses and universities

Which program gets the CPU? What keeps the programs from getting mixed up with one another? How is storage handled when several programs may want to get data from disk or send processed data to disk at the same time? Why doesn’t printer output from several programs get all jumbled up?

The OS takes anticipates these problems and takes care of them behind the scenes so that users can share the computer’s resources without worrying about how it is done.

Sharing the CPU

Multiprocessing

The previous questions all address sharing problems (multiple users sharing the CPU, memory, storage, printer).

Resource allocation is the process of assigning computer resources to certain programs for their use.

All programs running on the computer must share the CPU.  Two approaches to sharing the CPU are multiprogramming and timesharing.

Multiprocessing refers to the use of a powerful computer with multiple CPUs so that multiple programs can run simultaneously, each using its own processor.

Sharing the CPU

In multiprogramming more than one program can be open at a time, but only one is using the CPU at any given moment.

Multiprogramming is event-driven. One program could be using the CPU while another does something else, such as sending output to the printer.

The OS implements multiprogramming through a system of interrupts. An interrupt is a signal that causes normal program processing to be suspended temporarily. For example,  when one program needs to print, it will generate an interrupt, the OS will then give the CPU to another program, the OS will take care of the printing.

Sharing the CPU

In time sharing, each user or program is given a time slice, a tiny fraction of a second, during which the computer works on a single user’s task. Time-sharing is time-driven. When you are sitting before a terminal, the computer’s response time is quite short – a second or so – and it may seem as if you have the computer to yourself.
 

Memory management

Memory management is the process of allocating memory to programs and keeping the programs in memory separate from one another.

Some systems divide memory into separate areas, called partitions or regions. The problem is how to know how big the partitions should be. At least one of them should be large enough to hold the largest anticipated program. Regardless of whether the areas are fixed size or variable size, there is a problem with unused memory between programs.

The foreground is generally for programs that have higher priority and therefore receive more CPU time (e.g., interactive programs). The background is for programs with less important programs with lower priorities.  Background programs typically need less CPU time (e.g., batch programs) or they can wait around until the CPU is free.

Memory Management

The virtual storage concept means that the programs currently being executed are stored on disk and portions of these programs are brought into memory as needed. Memory is considered real storage while secondary storage holding the rest of the program is considered virtual storage.

Paging is the process of dividing a program into equal-size pieces called pages and storing them in equal size memory spaces called page frames. The pages are stored in memory in non-contiguous locations. The OS is able to keep track of them (paging) using an index like page table.

If too much CPU time is spent performing paging, very little is left to actually execute user programs. This situation is called thrashing. It can be eliminated by running fewer programs concurrently or by adding additional memory.

The process of keeping one program memory from overlapping another program’s memory is called memory protection. Without protection, one program might accidentally jump into the middle of another, causing a loss of data and general chaos. To avoid this problem, the OS confines each program to a limited area in memory. If a program attempts to enter some memory area outside its limits, the OS terminates the execution of that program.

Resource Allocation

What happens if more than one user wants to read or write to a file? The OS keeps track of the input and output requests and processes them, usually in the order in which they are received. Any program or instruction to read or write a record is routed to the OS, which processes the request and then returns control to the program.

The OS makes sure that only one program is actually reading or writing at a time.

Spooling: When multiple programs want to print to the same printer, the OS sends the documents to be printed to a disk file. The disk file is placed into a queue to be printed when the printer becomes available. Spooling also addresses the problem of relatively slow printer speeds. Writing to a file is much faster than writing to a printer.

Utility programs

Strictly speaking utilities are considered part of system software but not part of the OS. Some utilities are packaged with the OS, others can be purchased separately.

Some utility programs can be run directly by the user.

A file manager is one utility that can be run by the user. It is a program that allows the user to organize and manage files. It allows the user to store files in a hierarchical directory structure.

A directory is an area in storage that contains files and other directories. Directories are also called folders. File manager allows you to display the files in the directories and to copy, move, rename, delete files, format, and copy diskettes.

Windows Explorer is the file manager that comes with the Windows OS.

Utility programs

A device driver is a small program that accepts commands from the OS and converts them into the proper format for the device it supports. Manufacturers provide device drivers for each of their products. Installing the product includes installing the appropriate device driver to your hard drive.  Examples of devices that need drivers are a printer, a scanner, or a mouse.
 

Backup and restore utilities allow you to make backups of entire disk drives or of selected directories. These backups can be made to diskettes, or to high capacity media such as CD, DVD, or tapes.
 

A file compression utility reduces the amount of space required by a file. Compressed files take up less space on disk and also take less time to transmit across communication lines. Many files available for downloading from the Internet are in compressed format and must be uncompressed into their original form before they can be used. WinZip is a popular compression utility.

Utility programs

When a file is not stored in contiguous (adjacent) locations it is said to be fragmented. This slows down access to the file. If a lot of files are fragmented, the effect on system performance can be very noticeable. A disk defragmenter utility will reorganize the files on the disk so that all files are stored in contiguous locations.