Operating System - Module I
Operating System - Module I
Operating System - Module I
An Operating System (OS) is a collection of programs that acts as an interface between a user
of a computer and the computer hardware.
Managing Hardware
• The prime objective of operating system is to manage & control the various hardware
resources of a computer system.
• These hardware resources include processer, memory, and disk space and so on.
• If a device not functioning properly, the operating system cannot be communicated with
the device.
Providing an Interface
• The operating system organizes application so that users can easily access, use and store
them.
• It provides a stable and consistent way for applications to deal with the hardware without
the user having known details of the hardware.
• If the program is not functioning properly, the operating system again takes control, stops
the application and displays the appropriate error message.
• The operating system is the first encoded with the computer and it remains on the
memory all time thereafter.
User view: The user view of the computer varies by the interface being used. The examples are -
windows XP, vista, windows 7 etc. Most computer user sit in the in front of personal computer
(pc) in this case the operating system is designed mostly for easy use with some attention paid to
resource utilization. Some users sit at a terminal connected to a mainframe/minicomputer. In this
case other users are accessing the same computer through the other terminals. There user are
share resources and may exchange the information. The operating system in this case is designed
to maximize resources utilization to assume that all available CPU time, memory and I/O are
used efficiently, and no individual user takes more than his/her fair and share. Other users sit at
workstations connected to network of other workstations and servers. These users have dedicated
resources, but they share resources such as networking and servers like file, computer and print
server. Here the operating system is designed to compromise between individual usability and
resource utilization.
System view: From the computer point of view the operating system is the program which is
most intermediate with the hardware. An operating system has resources as hardware and
software which may be required to solve a problem like CPU time, memory space, file storage
space and I/O devices and so on. That’s why the operating system acts as manager of these
resources. Another view of the operating system is it is a control program. A control program
manages the execution of user programs to present the errors in proper use of the computer. It is
especially concerned of the user the operation and controls the I/O devices.
1. Process Management:
A program does nothing unless their instructions are executed by a CPU.A process is a program
in execution. A time-shared user program such as a complier is a process. A word processing
program being run by an individual user on a pc is a process.
A system task such as sending output to a printer is also a process. A process needs certain
resources including CPU time, memory files & I/O devices to accomplish its task.
These resources are either given to the process when it is created or allocated to it while it is
running. The OS is responsible for the following activities of process management.
• Keeping track of which parts of memory are currently being used & by whom.
• Deciding which processes are to be loaded into memory when memory space becomes
available.
3. File Management:
File management is one of the most important components of an OS computer can store
information on several different types of physical media magnetic tape, magnetic disk & optical
disk are the most common media. Each medium is controlled by a device such as disk drive or
tape drive those has unique characteristics. These characteristics include access speed, capacity,
• A general device- driver interfaces drivers for specific hardware devices. Only the device
driver knows the peculiarities of the specific device to which it is assigned.
• Storage allocation.
• Disk scheduling
• Because secondary storage is used frequently it must be used efficiently.
6. Networking:
A distributed system is a collection of processors that don‘t share memory peripheral devices or
a clock. Each processor has its own local memory & clock and the processor communicate with
one another through various communication lines such as high speed buses or networks. The
processors in the system are connected through communication networks which are configured
7. Protection or security:
If a computer system has multi users & allow the concurrent execution of multiple processes
then the various processes must be protected from one another‘s activities. For that purpose,
mechanisms ensure that files, memory segments, CPU & other resources can be operated on by
only those processes that have gained proper authorization from the OS.
8. Command interpretation:
One of the most important functions of the OS is connected interpretation where it acts as the
interface between the user & the OS.
The users of a batch operating system do not interact with the computer directly. Each user
prepares his job on an off-line device like punch cards and submits it to the computer operator.
To speed up processing, jobs with similar needs are batched together and run as a group. The
programmers leave their programs with the operator and the operator then sorts the programs
with similar requirements into batches.
Multiprogramming is an extension to the batch processing where the CPU is kept always busy.
Each process needs two types of system time: CPU time and IO time.
In multiprogramming environment, for the time a process does its I/O, The CPU can start the
execution of other processes. Therefore, multiprogramming improves the efficiency of the
system.
The operating system keeps several jobs in memory simultaneously as shown in below figure.
This set of job is subset of the jobs kept in the job pool. The operating system picks and
beginning to execute one of the jobs in the memory. In this environment the operating system
simply switches and executes another job. When a job needs to wait the CPU is simply switched
to another job and so on. The multiprogramming operating system is sophisticated because the
operating system makes decisions for the user. This is known as scheduling. If several jobs are
ready to run at the same time the system choose one among them. This is known as CPU
scheduling. The disadvantages of the multiprogrammed system are
• It does not provide user interaction with the computer system during the program
execution.
• The introduction of disk technology solved these problems rather than reading the cards
from card reader into disk. This form of processing is known as spooling.
Time-sharing is a technique which enables many people, located at various terminals, to use a
particular computer system at the same time. Time-sharing or multitasking is a logical extension
of multiprogramming. Processor's time which is shared among multiple users simultaneously is
termed as time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems is
that in case of Multiprogrammed batch systems, the objective is to maximize processor use,
whereas in Time-Sharing Systems, the objective is to minimize response time.
• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.
A Multiprocessor system consists of several processors that share a common physical memory.
Multiprocessor system provides higher computing power and speed. In multiprocessor system all
processors operate under single operating system. Multiplicity of the processors and how they do
act together are transparent to the others.
Hard real-time systems : Hard real-time systems guarantee that critical tasks complete on time.
In hard real-time systems, secondary storage is limited or missing and the data is stored in ROM.
In these systems, virtual memory is almost never found.
Soft real-time systems : Soft real-time systems are less restrictive. A critical real-time task gets
priority over other tasks and retains the priority until it completes. Soft real-time systems have
limited utility than hard real-time systems. For example, multimedia, virtual reality, Advanced
Scientific Projects like undersea exploration and planetary rovers, etc.
Distributed systems use multiple central processors to serve multiple real-time applications and
multiple users. Data processing jobs are distributed among the processors accordingly.
The processors communicate with one another through various communication lines (such as
high-speed buses or telephone lines). These are referred as loosely coupled systems or
distributed systems. Processors in a distributed system may vary in size and function. These
processors are referred as sites, nodes, computers, and so on.
• With resource sharing facility, a user at one site may be able to use the resources
available at another.
• Speedup the exchange of data with one another via electronic mail.
• If one site fails in a distributed system, the remaining sites can potentially continue
operating.
8. Handheld Systems
When the first electronic computer was developed in 1940, it was created without any operating
system. In early times, users have full access to the computer machine and write a program for
each task in absolute machine language. The programmer can perform and solve only simple
mathematical calculations during the computer generation, and this calculation does not require
an operating system.
The first operating system (OS) was created in the early 1950s and was known as GMOS.
General Motors has developed OS for the IBM computer. The second-generation operating
system was based on a single stream batch processing system because it collects all similar jobs
in groups or batches and then submits the jobs to the operating system using a punch card to
complete all jobs in a machine. At each completion of jobs (either normally or abnormally),
control transfer to the operating system that is cleaned after completing one job and then
continues to read and initiates the next job in a punch card. After that, new machines were called
mainframes, which were very big and used by professional operators.
During the late 1960s, operating system designers were very capable of developing a new
operating system that could simultaneously perform multiple tasks in a single computer program
called multiprogramming. The introduction of multiprogramming plays a very important role in
developing operating systems that allow a CPU to be busy every time by performing different
tasks on a computer at the same time. During the third generation, there was a new development
of minicomputer's phenomenal growth starting in 1961 with the DEC PDP-1. These PDP's leads
to the creation of personal computers in the fourth generation.
The fourth generation of operating systems is related to the development of the personal
computer. However, the personal computer is very similar to the minicomputers that were
developed in the third generation. The cost of a personal computer was very high at that time;
there were small fractions of minicomputers costs. A major factor related to creating personal
computers was the birth of Microsoft and the Windows operating system. Microsoft created the
first window operating system in 1975. After introducing the Microsoft Windows OS, Bill Gates
and Paul Allen had the vision to take personal computers to the next level. Therefore, they
introduced the MS-DOS in 1981; however, it was very difficult for the person to understand its
cryptic commands. Today, Windows has become the most popular and most commonly used
operating system technology. And then, Windows released various operating systems such as
Windows 95, Windows 98, Windows XP and the latest operating system, Windows 7. Currently,
most Windows users use the Windows 10 operating system. Besides the Windows operating
system, Apple is another popular operating system built in the 1980s, and this operating system
was developed by Steve Jobs, a co-founder of Apple. They named the operating system
Macintosh OS or Mac OS.