Unit III
Lesson 7
Operating System Basics
Structure
7.1 Objectives
7.2 Operating System
7.3 History of Operating Systems
7.4 Objectives of operating systems
7.1 Objectives
At the end of this unit students will be able to:
Define what a Operating System is.
Understand functions of operating system.
Understand objectives of operating system.
7.2 Operating System
An operating system is a layer of software or program which takes care of
technical aspects of a computer's operation. It shields the user of the machine
from the low-level details of the machine's operation and provides frequently
needed facilities. There is no universal definition of what an operating system
consists of. You can think of it as being the software which is already installed
on a machine, before you add anything of your own. Normally the operating
system has a number of key elements:
a technical layer of software for driving the hardware of the
computer, like disk drives, the keyboard and the screen;
a filesystem which provides a way of organizing files logically,
and
a simple command language which enables users to run their
own programs and to manipulate their files in a simple way.
Some operating systems also provide text editors, compilers,
debuggers and a variety of other tools. Since the operating
system (OS) is in charge of a computer, all requests to use its
resources and devices need to go through the OS.
An OS therefore provides legal entry points into its code for
performing basic operations like writing to devices.
Operating systems may be classified by both how many tasks they can
perform simultaneously and by how many users can be using the system
simultaneously. That is single-user or multi-user and single-task or multi-
tasking. A multi-user system must clearly be multi-tasking.
7.3 History of Operating Systems
An operating system (OS) is a software program that manages the
hardware and software resources of a computer. The OS performs basic
tasks, such as controlling and allocating memory, prioritizing the processing
of instructions, controlling input and output devices, facilitating networking,
and managing files. The first computers did not have operating systems.
However, software tools for managing the system and simplifying the use of
hardware appeared very quickly afterwards and gradually expanded in
scope. By the early 1960s, commercial computer vendors were supplying
quite extensive tools for streamlining the development, scheduling, and
execution of jobs on batch processing systems. Examples were produced by
UNIVAC and Control Data Corporation, amongst others. Through the 1960s,
several major concepts were developed, driving the development of
operating systems. The development of the IBM System/360 produced a
family of mainframe computers available in widely differing capacities and
price points, for which a single operating system OS/360 was planned
(rather than developing ad-hoc programs for every individual model).This
concept of a single OS spanning an entire product line was crucial for the
success of System/360 and, in fact, IBM's current mainframe operating
systems are distant descendants of this original system; applications written
for the OS/360 can still be run on modern machines. OS/360 also contained
another important advance: the development of the hard disk permanent
storage device (which IBM called DASD). Another key development was the
concept of time-sharing: the idea of sharing the resources of expensive
computers amongst multiple computer users interacting in real time with the
system. Time sharing allowed all of the users to have the illusion of having
exclusive access to the machine; the Multics timesharing system was the
most famous of a number of new operating systems developed to take
advantage of the concept. Multics, particularly, was an inspiration to a
number of operating systems developed in the 1970s, notably Unix. Another
commercially-popular minicomputer operating system was VMS. The first
microcomputers did not have the capacity or need for the elaborate
operating systems that had been developed for mainframes and minis;
minimalistic operating systems were developed. One notable early operating
system was CP/M, which was supported on many early microcomputers and
was largely cloned in creating MS-DOS, which became wildly popular as the
operating system chosen for the IBM PC (IBM's version of it was called IBM-
DOS or PC-DOS), its successors making Microsoft one of the world's most
profitable companies. The major alternative throughout the 1980s in the
microcomputer market was Mac OS, tied intimately to the Apple Macintosh
computer. By the 1990s, the microcomputer had evolved to the point where,
as well as extensive GUI facilities, the robustness and flexibility of operating
systems of larger computers became increasingly desirable. Microsoft's
response to this change was the development of Windows NT, which served
as the basis for Microsoft's entire operating system line starting in 1999.
Apple rebuilt their operating system on top of a UNIX core as Mac OS X,
released in 2001. Hobbyist-developed reimplementation’s of Unix,
assembled with the tools from the GNU project, also became popular
versions based on the Linux kernel are by far the most popular, with the
BSD derived Unix’s holding a small portion of the server market. The
growing complexity of embedded devices has a growing trend to use
embedded operating systems on them. The appropriate OS may depend on
the hardware architecture, specifically the CPU, with only Linux and BSD
running on almost any CPU. Windows NT has been ported to other CPUs,
most notably the Alpha, but not many. Since the early 1990s the choice for
personal computers has been largely limited to the Microsoft Windows family
and the Unix-like family, of which Linux and Mac OS X are becoming the
major choices.
7.4 Objectives of operating systems
Modern operating system has the following major goals.
1. To hide details of hardware by creating abstraction: An
abstraction is software that hides details and provides a set of higher-
level functions.
2. To allocate resources to processes: An operating system controls
how processes may access resources
3. Provide a pleasant and effective user interface: The user
interacts with the operating system through the user interface and
usually interested in the look and feel of the operating system.
4. One can view operating system from two viewpoints : resource
manager and extended machine .from resource manager point of view
operating system manages different parts of the system efficiently and
from extended point of view operating system provide a virtual
machine to users that is more convenient to use.
5. 7.5 Exercise
1. Define operating system.
2. Discuss the history of Operating system.
Lesson 8
Operating System Types and functions
Structure
8.1 Classification of Operating Systems
8.2 Functions of an Operating System
8.3 Exercise
8.1 Classification of Operating Systems
All operating systems consist of similar components and perform almost
similar functions but the methods and procedures for performing these
functions are different. Operating systems are classified into different
categories based on their distinguishing features
Different Types of Operating Systems are:
Single User Operating Systems
Batch Processing Operating Systems
Time-Sharing Operating Systems
Multiprogramming Operating Systems
Multi-user Operating Systems
Parallel Operating Systems
Distributed Operating Systems
Real Time Operating Systems
Embedded Operating System
Single User Operating System:
Single user operating system allows a single user to access the
computer at a time. These computers have a single processor and
execute a single program. The resources such as CPU and I/O devices
are constantly available to the user in a single user operating system
for operating the system. As a result, the CPU site idle for most of the
time and is not utilized to its maximum.
Batch Processing Operating System:
The batch processing operating system places the user’s jobs on an
input queue and these jobs are stored as a batch. The batch monitor
executes these batches at a definite interval of time. The batch
monitor accepts the commands for initializing, processing and
terminating a batch.
These jobs are executed through interaction with the hardware and the
operating system gives the output back to different users. The batch
processing operating system automatically executes the next job in
the batch and decreases the user intervention during the processing of
jobs.
Time Sharing Operating System:
The time sharing operating system has complex requirements as it
allows multiple jobs to be kept in the memory for their execution by
the CPU. It requires a backing store that swaps the jobs between the
disk and the main memory.
Multiprogramming Operating System:
Multiprogramming operating system allows multiple users to execute
multiple programs using a single CPU. The multiprogramming
operating system executes different processes concurrently using a
time-multiplexed CPU by implementing the concept of CPU slicing
between them.
The operating system stores multiple jobs in main memory and CPU
immediately switches to the next job in sequence when the previous
executing process comes in wait stage. The previous executing process
comes in wait stage due to an interrupt or requirement of I/O
operations.
Therefore, multiprogramming operating system increases the
utilization of CPU by reducing its idle time. UNIX, Windows 95,
Windows NT, and OS/2 are examples of multiprogramming operating
systems.
Multi User Operating System:
Multi user operating system allows various users to access the
different resources of a computer simultaneously. The access is
provided using a network that consists of various personal computers
attached to a mainframe computer. These computers send and receive
information to multi user mainframe computer system.
Parallel Operating System:
Parallel Operating system consists of multiple processors sharing the
clock, bus, memory and peripheral devices. Parallel operating systems
are also known as multiprocessor or tightly coupled operating system.
Distributed Operating Systems:
In distributed operating system processing user requests are carried
out independently in more than one location but with shared and
controlled access to some common facilities. A system consists of
multiple parts located at or embedded in geographically dispersed
physical locations.
Real Time Operating Systems:
Real time operating system defines the completion of job within the
rigid time constraints otherwise the job loses its meaning. Real time is
the ability to respond to an event deterministically.
Embedded Operating System:
Embedded operating systems are mainly executed on computers that
control devices. These devices are mobile phones, TV sets etc. These
systems consist of circuits and 32-bit microprocessors that control the
functioning of various operations.
8.2 Functions of an Operating System
Acts as an extended machine.
Acts as a resource manager.
Acts as a constant application program interface.
The operating system acts as an extended machine by translating your
commands into machine language instructions. The CPU executes
these machine language instructions and operating system re-
translates the output back into a user understandable language. An
operating system acts as a resource manager by controlling and
allocating various hardware and software resources to different users
in an-optimal and efficient mode. The task of resource management
becomes essential in multi-user operating systems where different
users compete for the same resources.
As resource manager operating system has the following functions:
Process management
Main memory management
File management
secondary storage management
I/O management
Process Management
Process refers to a program in execution.
A process is a unit of work in a system such a system consists of a
collection of processes which are Operating system processes and user
process.
The operating system is responsible for the following activities of the
process management.
Creating and deleting the user and system process.
Allocating hardware resources among the processes.
Controlling the progress of processes.
Providing mechanisms for process communications.
Providing mechanisms for deadlock handling.
Main memory management
Main memory (primary memory) management is concerned with
following functions.
Keeping track of the status – Each memory location is either free or
allocated.
Determining allocation policy for memory.
Allocation technique – specific location must be selected and
allocation information updated.
De-allocation technique – after de-allocation, status information must
be updated.
File Management.
Secondary storage are usually organized into named collections called
files.
Computer uses physical media for storing the different information.
A file may contain a report, an executable program or a set of
commands.
A file consists of a sequence of bits, bytes, lines or records.
Physical media is used for storing files.
Physical media are different types, magnetic disk, magnetic tape and
optical disk.
The operating system is responsible for the following activities of the
file management.
Creating and deleting of files.
Mapping files onto secondary storage.
Backing up files on stable storage media.
Secondary storage management.
Main memory is too small to accommodate all data and programs.
When power is lost, main memory lost data, so computer system must
provide secondary storage to backup main memory.
The operating system is responsible for the following activities of the
secondary storage management.
o Free space management
o Storage allocation
o Disk scheduling.
I/O system management.
Keeping track the status of devices is called the I/O traffic controller..
Each I/O Device has device handler with that device.
8.3 Exercise
Q1. Give the classification of Operating Systems.
Q2. Discuss briefly the functions of operating system