Topic 5 Operating System
Topic 5 Operating System
OPERATING SYSTEMS
Objectives: The motive of this lesson is to present an overview of Operating
System and within that framework the key concepts, functions and
different types of operating systems are discussed.
Structure:
7.1 Introduction
7.2 Concept and Definitions of Operating System
7.3 Booting or Bootstrapping of Operating System
7.4 Functions of Operating System
7.5 Types of Operating System
7.6 Operating Systems (DOS and Windows) for Personal Computers
7.7 Future Trends in Operating System Design
7.8 Summary
7.9 Self-Test questions
7.10 Suggested Readings
7.1 Introduction
An Operating System is system software which may be viewed as an organized
collection of software consisting of procedures for operating a computer and
providing an environment for execution of programs. It acts as an interface between
user and the hardware of a computer system.
The operating system (OS) is the first thing loaded onto the computer. The most
important program that runs on a computer and without the operating system, a
computer is useless. Every general-purpose computer must have an operating system
to run other programs. Operating systems perform basic tasks, such as recognizing
input from the keyboard, sending output to the display screen, keeping track of files
and directories on the disk, and controlling peripheral devices such as disk drives and
printers. Any desktop or laptop PC that you buy normally comes pre-loaded with
130
Windows OS. Macintosh computers come pre-loaded with OS X. Many corporate
servers use the Linux or UNIX operating systems.
Understanding the operations and functions of operating system used in computers for
a user is quite important as per the following reasons:
User interacts with the computer through operating system in order to
accomplish his task since it is his primary interface with a computer.
The purpose of an operating system is to organize and control hardware and software
so that the device it lives in behaves in a flexible but predictable way. In this lesson,
we will learn what a piece of software must do to be called an operating system, and
to know how the operating system in our desktop computer works and how many
types of operating systems are around.
For large systems, the operating system has even greater responsibilities and powers.
It makes sure that different programs and users running at the same time do not
interfere with each other. The operating system is also responsible for security,
ensuring that unauthorized users do not access the system.
131
Long-term Storage
Non-determinacy
OS provides the instructions to display the on screen elements with which the
user interact. Collectively, these elements are known as the user interface.
OS loads programs such as word processing and spreadsheet programs into the
computer’s memory to be used by the users.
132
The Operating System mainly consists of the Control Programs and the Processing
Programs.
133
the need for the user to deal with the hardware or related problems. Thus the operating
system allows the user to concentrate on his application and prevents him for having
to spend a lot of time determining how things are to be specifically accomplished by
the hardware.
When the power is turned on of a computer, the first program that runs is usually a set
of instructions kept in the computer's read-only memory. This code examines the
system hardware to make sure everything is functioning properly. This power-on self
test (POST) checks the central processing unit, memory, and basic input-output
systems (BIOS) for errors and stores the result in a special memory location. Once the
power-on self test (POST) has successfully completed, the software loaded in read-
only memory (sometimes called the BIOS or firmware) will begin to activate the
134
computer's disk drives. In most modern computers, when the computer activates the
hard disk drive, it finds the first piece of the operating system: the bootstrap loader.
Bootstrap Loader is a very simple program sufficient only to direct the CPU to look
for specific file on the disk memory, and executes the instructions stored in the file.
The file contains machine codes to direct the CPU to continue loading the rest of the
operating system into the memory. When the operating system is fully loaded into the
memory, the computer is ready to accept user’s commands.
In the most basic form, the bootstrap loader sets up the small driver programs that
interface with and control the various hardware subsystems of the computer. It sets up
the divisions of memory that hold the operating system, user information and
applications. It establishes the data structures that will hold the myriad signals, flags
and semaphores that are used to communicate within and between the subsystems and
applications of the computer. Then it turns control of the computer over to the
operating system.
135
to operators and return later to collect them. Some of the examples of such programs
which accept the batch processing environment are payroll, forecasting, statistical
analysis and large scientific number-crunching programs.
There are some difficulties with a batch operating system from the point of view of
programmer or user. Firstly, batch operating systems provide a non interactive
environment i.e. allow little or no interaction between user and executing programs.
Secondly, due to turnaround delays and offline debugging, batch processing is not
very convenient for program development. Therefore, only the programs that do not
require interaction and programs with long execution times may be served well by a
batch operating system.
Multi-tasking operating system: Allows more than one program to run concurrently.
Multi-process operating system: Supports running a program on more than one CPU.
Multi-threading operating system: Allows different parts of a single program to run
concurrently.
Multi-user operating system: Permits hundreds or even thousands of concurrent users to
run programs.
136
having a single CPU. In these operating systems, CPU switches from one task to
another so quickly that it gives the illusion to the user of executing all the programs
(or tasks) at the same time.
This is the type of operating system most people use on their desktop and laptop
computers today. Microsoft's Windows and Apple's Mac OS platforms are both
examples of operating systems that will let a user have several programs in operation
at the same time. For example, it's entirely possible for a Windows user to be writing a
note in a word processor while downloading a file from the Internet while printing the
text of an e-mail message.
There are two basic types of multitasking: preemptive and cooperative. In preemptive
multitasking, the operating system parcels out CPU time slices to each program. In
cooperative multitasking, each program can control the CPU for as long as it needs it.
If a program is not using the CPU, however, it can allow another program to use it
temporarily. OS/2, Windows 95, Windows NT, the Amiga operating system and
UNIX use preemptive multitasking, whereas Microsoft Windows 3.x and the
MultiFinder (for Macintosh computers) use cooperative multitasking. The terms
multitasking and multiprocessing are often used interchangeably, although
multiprocessing implies that more than one CPU is involved.
Multi-processing operating system: These OS have the ability to support more than
one process at the same time i.e. allowing more than one programs to run concurrently
on the multiple CPUs in a single computer system. Multiprocessing systems are much
more complicated than single-process systems because the operating system must
allocate resources to competing processes in a reasonable manner. This type of
operating system differs from multi-user operating system in the way that these refer
to utilization of multiple CPUs. This is also called parallel processing. The examples
of this type of operating system are OS/2 for high-end PCs, UNIX, MVS etc.
137
requires the programmer to design the program so carefully that all the threads can run
at the same time without interfering with each other.
These OS refer to computer systems that support two or more simultaneous users and
allow simultaneous access to a computer system through two or more terminals.
Although frequently associated with multiprogramming, multi-user operating system
does not imply multi-programming or multi-tasking. A dedicated transaction
processing system such as railway reservation system that supports hundreds of
terminals under control of a single program is an example of multi-user operating
system. All mainframes and minicomputers are multi-user systems, but most personal
computers and workstations are not. Another term for multi-user is time sharing.
The term multiprogramming refers to the situation in which a single CPU divides its
time between more than one jobs. The term multitasking is described as any system
that runs or appears to run more than one application program at one time. Whereas in
multiprocessing, multiple CPUs perform more than one job at one time. Time-sharing
is a special case of multiprogramming, where a single CPU serves a number of users
at interactive terminals.
Time-sharing operating system: These operating systems allow two or more users to
run their respective programs at the same time by making these programs resident in
the memory of computer. The concept of allowing more than one programs in the
memory of computer is called multiprogramming. Therefore this OS is a form of
138
multiprogramming operating system which operates in an interactive mode with a
quick response time. All time-sharing systems need to be multi-programmed but not
necessarily all the multi-programmed systems to be time shared.
In this type of OS, the user types a request to the computer through a keyboard. The
computer processes it and a response is displayed on the user’s terminal. A time
sharing system allows the many users to simultaneously share the computer resources.
Since each action or command in a time-shared system take a very fraction of time,
only a little CPU time is needed for each user. As the CPU switches rapidly from one
user to another user, each user is given impression that he has his own computer,
while it is actually one computer shared among many users.
Time-slice scheduling of CPU approach is used for time sharing processing in which
programs are executed with rotating priority that increases during waiting and drops
after the service is granted. In order to prevent a program from monopolizing the
processor, a program executing longer than the system defined time-slice is
interrupted by the operating system and placed at the end of the queue of waiting
program. The examples of this type of operating system are VMS (on DEC
Mainframes), UNIX, XENIX, MVS etc.
These OS are used in environments where a large number of events mostly external to
computer systems, must be accepted and processed in a short time or within certain
deadlines. The primary objective of real-time operating systems is to provide quick
response time and thus meet the scheduling deadlines. User convenience and resource
utilization are of secondary concern to real-time system. Real time can also refer to
139
events simulated by a computer at the same speed that they would occur in real life. In
graphics animation, for example, a real-time program would display objects moving
across the screen at the same speed that they would actually move. The major positive
features of this type of operating system are fast response time, feedback mechanism
and reliability.
Real-time operating systems respond to input immediately. They are used for such
tasks as navigation, in which the computer must react to a steady flow of new
information without interruption. Most general-purpose operating systems are not
real-time because they can take a few seconds, or even minutes, to react. Examples of
such applications are flight control, Industrial Control, Telephone Switching
Equipments, Real-time Simulations etc. Real time systems are also frequently used in
military application. In case of real-time systems, memory management and file
management are of least importance as compared to processor and I/O management
therefore real-time operating systems are different from traditional operating systems
like MS-DOS and UNIX or XENIX. Some of the examples of real-time operating
systems are:
Operating System for IBM System/3: Communication Control Program (CCP),
Operating System: Duplex Multiple Environment Real-time (DMERT) etc.
140
Controlling access so that only users in the proper authorization are allowed to
access particular resources
Making the use of remote resources appear to be identical to the use of
resources
Providing up-to-the minute network documentation on-line.
The main advantage of distributed operating systems is that there is a little fault-
tolerance and are considered to be more reliable than uniprocessor based systems.
They perform even if certain part of the hardware is malfunctioning. On the other
side, the disadvantage is that unless one is careful, it is easy for the communication
protocol overhead to become a major source of inefficiency.
With the different types of operating systems in mind, it is time to look at the basic
functions provided by an operating system.
141
is immediately displayed on the screen. But, how this file is opened from the disk
(storage device) and how information is displayed on the monitor (output device). All
these types of functions are performed by the operating system. In order to enable
computer to effectively and efficiently utilize its resources to monitor the system
performance and to provide services to the users, an operating system is needed. So,
an operating system performs basically three types of functions.
These functions of operating system, in the most general sense, can be classified into
six categories:
Processor management
Memory and Storage management
File management
Device Management
Security
Command Interpretation
While there are some who argue that an operating system should do more than these
six tasks, and some operating-system vendors do build many more utility programs
142
and auxiliary functions into their operating systems, these six tasks define the core of
nearly all operating systems. Let's look at the tools the operating system uses to
perform each of these functions.
High-speed cache - This is fast, relatively small amounts of memory that are available
to the CPU through the fastest connections.
143
Main memory - This is the RAM that you see measured in megabytes when you buy a
computer.
Secondary memory - This is most often some sort of rotating magnetic storage that
keeps applications and data available to be used, and serves as virtual RAM under the
control of the operating system.
The operating system must balance the needs of the various processes with the
availability of the different types of memory, moving data in blocks between available
memories as the schedule of processes dictates.
File Management: The file management module of an operating system takes care of
file related activities such as organization, storing, retrieval, naming, sharing, and
protection of files. The important concepts used for file management are as follows:
File Access Methods: To use the information stored in a file, it must be accessed and
read into computer memory. The two commonly supported file access methods at
operating system level are sequential and random access.
File Operations: An operating system provides a set of operations to deal with files
and their contents. File operations like creating, renaming, copying, deleting, opening,
closing, reading, writing, seeking the files or setting the attributes of the files are some
of the operations provided by operating system.
File Naming: When a file is created, it is given a name, which can be later used to
access the file. The rules for naming files vary from one operating system to another.
144
One reason that drivers are separate from the operating system is so that new
functions can be added to the driver and thus to the hardware subsystems without
requiring the operating system itself to be modified, recompiled and redistributed.
Through the development of new hardware device drivers, development often
performed or paid for by the manufacturer of the subsystems rather than the publisher
of the operating system, input/output capabilities of the overall system can be greatly
enhanced.
External Security: It deals with securing the computer system against external factors
such as fires, floods, leaking out of stored information by a person who has access to
the information and so on.
Internal Security: It mainly deals with User authentication (user identification must be
checked), Access Control (prohibit the user from accessing those information for
which not authorized to access) and cryptography (a method to ensure access control).
145
7.6 Operating Systems (DOS and Windows) for Personal
Computers
Although a number of companies have offered operating systems over the years, one
company, Microsoft Corporation, has dominated the market for microcomputer
operating systems. In practice, their products have evolved from one to another in a
reasonably sequential fashion. The following is a brief summary.
MS-DOS:
MS-DOS stands for Microsoft Disk Operating System and is a single user operating
system developed by Microsoft. Microsoft is a software company in Redmount,
Washington, U.S.A. It was introduced in 1981 jointly by Microsoft and IBM and was
the most popular operating system for personal computers in 1980s. Some of the disk
and file maintenance commands of MS-DOS are as follows:
DIR To list the directory
TREE To list all disk subdirectories and their subdirectories
TYPE To see the contents of a file on the screen
REN To rename a disk file
DEL To erase files from a disk
COPY To copy files from one location of disk to another
DISKCOPY To copy the entire diskette
FORMAT To realign the tracks and sectors of the diskette
CHKDSK To check the disk space and get information of the diskette
VER To see the version of the operating system being used
DOS was adequate for the IBM-compatible PCs of the early 1980s, but it has certain
limitations that became noticeable as PCs became more powerful. The limitations of
this OS are:
Under DOS, only a single program can be loaded into memory at a time.
DOS was not designed to handle the large amounts of RAM that today’s PCs
typically use.
DOS was designed for 16-bit CPUs and can not take advantage of the 32-bit
architecture of the 486, Pentium, and later chips.
DOS filenames are limited to eight characters, plus a three character
“extension” following a period sign.
146
DOS command-line interface is more difficult to learn than a well designed
GUI.
Microsoft Windows:
Microsoft Windows operating system was developed by Microsoft to overcome the
limitations of its own MS-DOS operating system. The first successful version of this
operating system was Windows 3.0, which was released in 1990. The subsequently
released versions were Windows 95, Windows 98, Windows 2000, and Windows XP.
The main features of Microsoft Windows are as follows:
Its command-line interface is GUI. Hence, it is easier for a new user to learn
and use the system.
Microsoft Windows was designed to be not just an operating system, but also
a complete operating environment. For example, Microsoft word processor
works similarly the way a Microsoft spreadsheet works. This means that the
experience gained by learning one Windows program is useful while using
any other Microsoft windows program.
It is a single user, multi-tasking operating system. It means that a user may run
more than one program at a time.
147
network will become as easy as working on a stand alone PC. However, a number of
clear trends are emerging which will point the way the future operating systems will
be designed. These are as follows:
Microcode will support all the functions of operating system integrated into it,
currently performed by software, therefore, the execution time will be faster.
Use of distributed operating system will increase because the new trends are
towards distributed control among the localized processors in place of
centralized system.
The concurrency is becoming an important feature of programming language.
Hardware and operating systems are being designed to execute concurrent
programs more efficiently.
Lots of developments are taking place in computer networking. The data
transmission rate is also increasing. Therefore, the use of networking
operating system will also increase.
More recently, operating systems have started to pop up in smaller computers as well.
If you like to tinker with electronic devices, you are probably pleased that operating
systems can now be found on many of the devices we use every day, from cell phones
to wireless access points. The computers used in these little devices have gotten so
powerful that they can now actually run an operating system and applications. The
computer in a typical modern cell phone is now more powerful than a desktop
computer from 20 years ago, so this progression makes sense and is a natural
development. In any device that has an operating system, there is usually a way to
make changes to how the device works. This is far from a happy accident; one of the
reasons operating systems are made out of portable code rather than permanent
physical circuits is so that they can be changed or modified without having to scrap
the whole device.
For desktop systems, access to a LAN or the Internet has become such an expected
feature that in many ways it is hard to discuss an operating system without making
reference to its connections to other computers and servers. Operating system
developers have made the Internet the standard method for delivering crucial
148
operating system updates and bug fixes. Although it is possible to receive these
updates via CD, it is becoming increasingly less common. In fact, some entire
operating systems themselves are only available through distribution over the Internet.
Further, NetBooting allows the operating system for one computer to be served over a
network connection, by a remote computer connected anywhere in the network. One
NetBoot server can serve operating systems to several dozen client computers
simultaneously, and to the user sitting in front of each client computer the experience
is just like they are using their familiar desktop operating system like Windows or
Mac OS.
7.8 Summary
An Operating System is system software which may be viewed as an organized
collection of software consisting of procedures for operating a computer and
providing an environment for execution of programs. It acts as an interface between
user and the hardware of a computer system. All the hardware functioning are
performed under the supervision of this operating system. It is always desired by the
user that the operating system should be small in size and easily maintainable so that
operations can be performed in an efficient manner with more reliability. The
Operating System mainly consists of two types of programs: the Control Programs
and the Processing Programs.
The process of loading the operating system into memory is known as booting. When
a computer is turned on the operating system must be brought into the memory of
computer from the hard-disk storage. The process is normally started by a small
program called bootstrap loader.
Operating system provides a number of services. At the lowest level, there are system
calls, which allow a running program to make a request from operating system
directly. At a higher level, there is a command interpreter, which supports a
mechanism for a user to issue a request without writing a program.
149
Operating System as a Resource Manager
Although a number of companies have offered operating systems over the years, one
company, Microsoft Corporation, has dominated the market for microcomputer
operating systems. In practice, their products have evolved from one to another in a
reasonably sequential fashion.
150
Network and Distributed
Give a brief idea of Microsoft operating systems for personal computers.