You are on page 1of 7

Operating Systems

Sources: Forouzan, B. Foundations of Computer Science, 3rd edition; Pinard/Romer/Morley, CMPTR, 3rd edition

1. Introduction
A computer is a system composed of two major components: hardware and software. Computer hardware is the
physical equipment. Software is the collection of programs that allows the hardware to do its job.
Computer software is divided into two broad categories: the operating system and application programs (Figure
7.1). Application programs use the computer hardware to solve users' problems. The operating system, on the other
hand, controls the access to hardware by users.

Figure 7.1 A computer system

1.1. Operating system


An operating system is complex, so it is difficult to give a simple universal definition. Instead, here are some
common definitions:
 An operating system is an interface between the hardware of a computer and the user (programs or
humans).
 An operating system is a program (or a set of programs) that facilitates the execution of other programs.
 An operating system acts as a general manager supervising the activity of each component in the computer
system. As a general manager, the operating system checks that hardware and software resources are used
efficiently, and when there is a conflict in using a resource, the operating system mediates to solve it.

An operating system is an interface between the hardware of a computer and the user (programs or
humans) that facilitates the execution of other programs and the access to hardware and software
resources.

Two major design goals of an operating system are:

 Efficient use of hardware.


 Easy of use of resources.

1.2. Bootstrap Process


The operating system, based on the above definitions, provides supports for other programs. For example, it is
responsible for loading other programs into memory for execution. However, the operating system itself is a
program that needs to be loaded into the memory and be run. How is this dilemma solved?

The problem can be solved if the operating system is stored (by the manufacturer) in part of memory using ROM
technology. The program counter of the CPU (see Chapter 5) can be set to the beginning of this ROM memory.
When the computer is turned on, the CPU reads instructions from ROM and executes them. This solution,
however, is not very efficient, because a significant part of the memory would needs to be composed of ROM
and could not therefore be used by other programs. Today's technology needs to allocate just a small part of
memory to part of the operating system.

The solution adopted today is a two-stage process. A very small section of memory is made of ROM and holds a
small program called the bootstrap program. When the computer is turned on, the CPU counter is set to the
first instruction of this bootstrap program and executes the instructions in this program. This program is only
responsible for loading the operating system itself, or that part of it required to start up the computer, into RAM
memory. When loading is done, the program counter in the CPU is set to the first instruction of the operating
system in RAM and the operating system is executed. Figure 7.2 illustrates the bootstrap process.

Figure 7.2 The bootstrap process

2. Components
Today's operating systems are very complex. An operating system needs to manage different resources in a
computer system. It resembles an organization with several managers at the top level. Each manager is responsible
for managing their department, but also needs to cooperate with others and coordinate activities. A modern
operating system has at least four duties: memory manager, process manager, device manager, and file manager.
Like many organizations that have a department that is not necessarily under any specific manager, an operating
system also has such a component, which is usually called a user interface or a shell . The user interface is
responsible for communication outside the operating system. Figure 7.3 shows the typical components of an
operating system.

Figure 7.3 Components of an operating system

2.1. User Interface


Each operating system has a user interface, a program that accepts requests from users (processes) and
interprets them for the rest of the operating system. A user interface in some operating systems, such as UNIX, is
called a shell. In others, it is called a window to denote that it is menu driven and has a GUI (graphical user
interface) component.

2.2. Memory Manager


One of the responsibilities of a modern computer system is memory management . Memory allocation must be
controlled by the operating system. Memory management techniques can be divided into two categories:
monoprogramming and multiprogramming. In monoprogramming, most of the memory capacity is dedicated to
one single program. In multiprogramming, more than one program can be in memory at the same time.

Although the memory size of computers has increased tremendously in recent years, so has the size of the
programs and data to be processed. Memory allocation must be managed to prevent applications from running
out of memory. Memory management includes management of multiprogramming and virtual memory.
In multiprogramming , more than one program is in memory at the same time, and they are executed
concurrently, with the CPU switching rapidly between the programs. Figure 7.5 shows memory in a
multiprogramming environment.

Figure 7.5 Multiprogramming

2.3. Process Manager


Modern operating systems use three terms that refer to a set of instructions: program, job, and process.

A program is a nonactive set of instructions stored on disk (or tape). It may or may not become a job.

A program becomes a job from the moment it is selected for execution until it has finished running and
becomes a program again.

A process is a program in execution. It is a program that has started but has not finished. In other words, a
process is a job that is being run in memory. It has been selected among other waiting jobs and loaded into
memory.

Figure 7.12 State diagram with boundaries between program, job, and process

The process manager uses schedulers and queues to manage processes. Process management involves
synchronizing different processes with different resources. This may potentially create resource deadlock or
starvation. Deadlock occurs when the operating system does not put resource restrictions on processes:
starvation can happen when the operating system puts too many resource restrictions on a process.

2.4. Device Manager

The device manager, or input/output manager, is responsible for access to input/output devices. There are
limitations on the number and speed of input/output devices in a computer system. Because these devices are
slower in speed compared with the CPU and memory, when a process accesses an input/output device, the
device is not available to other processes for a period of time. The device manager is responsible for the efficient
use of input/output devices.
A detailed discussion of device managers requires advanced knowledge of operating system principles and is
beyond the scope of this book. However, we can briefly list the responsibilities of a device manager:

 The device manager monitors every input/output device constantly to ensure that the device is functioning
properly. The manager also needs to know when a device has finished serving one process and is ready to
serve the next process in the queue.
 The device manager maintains a queue for each input/output device or one or more queues for similar
input/output devices. For example, if there are two fast printers in the system, the manager can have one
queue for each or one queue for both.
 The device manager controls the different policies for accessing input/output devices. For example, it may
use FIFO for one device and shortest length first for another.

2.5. File Manager


Operating systems today use a file manager to control access to files. A detailed discussion of the file manager
also requires advanced knowledge of operating system principles and file access concepts that are beyond the
scope of this book. We discuss some issues related to file access in Chapter 13, but this is not adequate to
understand the actual operation of a file manager. Here is a brief list of the responsibilities of a file manager:

 The file manager controls access to files. Access is permitted only by permitted applications and/or users,
and the type of access can vary. For example, a process (or a user that calls a process) may be allowed to
read from a file but is allowed to write to it (that is, change it). Another process may be allowed to execute a
file and a process, but not allowed to read its contents, and so on.
 The file manager supervises the creation, deletion, and modification of files.
 The file manager can control the naming of files.
 The file manager supervises the storage of files: how they are stored, where they are stored, and so on.
 The file manager is responsible for archiving and backups.

3. Examples of Operating Systems

3.1. DOS
DOS (Disk Operating System) was the dominant operating system for personal computers during the 1980s and
early 1990s. DOS traditionally used a command line interface, although later versions of DOS supported a menu-
driven interface. It was originally developed by Microsoft Corporation, but is no longer updated. However,
computers running the Windows operating system, can still execute DOS commands and users can issue these
commands using the Command Prompt window:
3.2. Windows
Windows has been the predominant operating system for personal computers for many years, and holds about
90% of the market. Microsoft created the original version of Windows – Windows 1.0 – in 1985 in an effort to
meet the needs of users frustrated by having to learn and use DOS commands.

 Up through Windows 3-11 were operating environments, not operating systems.

 Windows 95, 98, Me, XP, Vista, 7, and 8 offered improvements for personal computers (support for
new hardware like DVDs, improved multimedia and networks, improved GUI, etc.).

 Other versions (Windows Server and Windows Phone) supported other devices.

Windows 10 is the latest version of Windows and is designed for all devices, from smartphones to tablets to
personal computers to servers.

3.3. OS X
OS X (formally called Mac OS X) is the proprietary operating system for <ac computers made by Apple. It is based
on the UNIX operating systems and set the original standard for graphical user interfaces.
3.4. UNIX
Unix was developed in the late 1960s at AT&T Bell Laboratories as an operating system for midrange servers.
Computer systems ranging from personal computers to mainframes can run UNIX, and it can support a variety of
devices – this flexibility gives it an advantage over competing operating systems in some situations. However,
UNIX is more expensive, requires a higher level of technical knowledge, and tends to be harder ti install,
maintain, and upgrade than most other commonly used operating systems.

3.5. Linux
Linux (pronounced with a short i sound) is an operating system developed by Linus Torvalds in 1991. It was
release to the public as open source software, which is a program whose source code is available to the public
and may be modified to improve or customise it. Although Linux originally used a command line interface, most
recent versions use a graphical user interface. The advantage of Linux is that it is less expensive and much more
customizable than Windows and Linux are available for a wide variety of computers, from personal computers to
servers to mobile devices. For example, Android, an operating system widely used with smartphone, is based in
Linux. So is Chrome OS, the first cloud operating system designed for devices that will be sued primarily online.

3.6. iOS
The mobile operating system designed for the Apple IPhone, iPad and iPod touch is iOS. It is based on OS x,
supports multi-touch input, and has a variety of built-in apps and features.
3.7. Android
Android is a Linux-based operating system developed by the Open Handset Alliance, a group that includes
Google and more than 30 technology and mobile companies. Android us essentially tied with iOS as the most
widely used mobile operating system. Recent versions of Android support multi-touch input and has a variety of
built-in apps with more than one million additional apps available via the Google Play store. In addition to being
used with Android smartphones, Android is the operating system used with Android tablets, Android Wear smart
watches, and some smart TV’s.

3.8. Operating systems for larger computers


Servers, mainframes, and supercomputers can use:

 Conventional operating systems, such as Windows, UNIX, and Linux


 Proprietary operating systems designed solely for that system, i.e. IBM z/OS for IBM mainframes
 Customized conventional operating systems
 i.e. Version of UNIX developed for an IBM mainframe or a Cray supercomputer.

You might also like