Operating System - Module I

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Operating System

What is Operating System?

An Operating System (OS) is a collection of programs that acts as an interface between a user
of a computer and the computer hardware.

The operating system has two objectives such as:


▪ Firstly, an operating system controls the computer’s hardware.
▪ The second objective is to provide an interactive interface to the user and interpret commands
so that it can communicate with the hardware.
The operating system is very important part of almost every computer system.

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.
• The output result was display in monitor. In addition to communicating with the
hardware the operating system provides on error handling procedure and display an error
notification.

• 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.

• Computer system components are divided into 5 parts


➢ Computer hardware
➢ operating system
➢ utilities
➢ Application programs
➢ End user
• The operating system controls and coordinate a user of hardware and various application
programs for various users.

• It is a program that directly interacts with the hardware.

• The operating system is the first encoded with the computer and it remains on the
memory all time thereafter.

View of Operating System

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.
Functions of Operation System:
The various functions of operating system are as follows:

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.

• Creating & deleting both user & system processes.

• Suspending & resuming processes.

• Providing mechanism for process synchronization.

• Providing mechanism for process communication.

• Providing mechanism for deadlock handling.

2. Main Memory Management:


The main memory is central to the operation of a modern computer system. Main memory is a
large array of words or bytes ranging in size from hundreds of thousand to billions. Main
memory stores the quickly accessible data shared by the CPU & I/O device. The central
processor reads instruction from main memory during instruction fetch cycle & it both reads
&writes data from main memory during the data fetch cycle. The main memory is generally the
only large storage device that the CPU is able to address & access directly. For example, for the
CPU to process data from disk. Those data must first be transferred to main memory by CPU
generated E/O calls. Instruction must be in memory for the CPU to execute them. The OS is
responsible for the following activities in connection with memory 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.

• Allocating &deallocating memory space as needed.

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,
data transfer rate & access method (sequential or random).For convenient use of computer
system the OS provides a uniform logical view of information storage. The OS abstracts from the
physical properties of its storage devices to define a logical storage unit the file. A file is
collection of related information defined by its creator. The OS is responsible for the following
activities of file management.

• Creating & deleting files.

• Creating & deleting directories.

• Supporting primitives for manipulating files & directories.

• Mapping files into secondary storage.

• Backing up files on non-volatile media.

4. I/O System Management:


One of the purposes of an OS is to hide the peculiarities of specific hardware devices from the
user. For example, in UNIX the peculiarities of I/O devices are hidden from the bulk of the OS
itself by the I/O subsystem. The I/O subsystem consists of:
• A memory management component that includes buffering, catching & spooling.

• 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.

5. Secondary Storage Management:


The main purpose of computer system is to execute programs. These programs with the data they
access must be in main memory during execution. As the main memory is too small to
accommodate all data & programs & because the data that it holds are lost when power is lost.
The computer system must provide secondary storage to back-up main memory. Most modern
computer systems are disks as the storage medium to store data & program. The operating
system is responsible for the following activities of disk management.
• Free space management.

• 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
in a number of different ways. The communication network design must consider message
routing & connection strategies are the problems of connection & security.

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.

Types of Operating Systems


Following are some of the most widely used types of Operating system.

1. Batch Operating System


2. Multiprogramming Operating System
3. Time Sharing Operating System
4. Multiprocessor System
5. Real-Time Operating System
6. Distributed Operating System
7. Networking Operating System
8. Handheld System

1. Batch Operating System

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.

The problems with Batch Systems are as follows −

• Lack of interaction between the user and the job.


• CPU is often idle, because the speed of the mechanical I/O devices
is slower than the CPU.
• Difficult to provide the desired priority.
2. Multiprogramming Operating System

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.

3. Time-sharing Operating System

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.
Multiple jobs are executed by the CPU by switching between them, but the switches occur so
frequently. Thus, the user can receive an immediate response.

Advantages of Timesharing operating systems are as follows −

• Provides the advantage of quick response.


• Avoids duplication of software.
• Reduces CPU idle time.

Disadvantages of Time-sharing operating systems are as follows −

• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.

4. Multiprocessor Operating System (Parallel Systems/ Tightly coupled Systems )

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.

Advantages of Multiprocessor Systems


• Enhanced performance
• Execution of several tasks by different processors concurrently, increases the system's
throughput without speeding up the execution of a single task.
• If possible, system divides task into many subtasks and then these subtasks can be
executed in parallel in different processors. Thereby speeding up the execution of single
tasks.

5. Real Time Operating System:-


It is a special purpose operating system, used when there are rigid time requirements on the
operation of a processor or the flow of data. A real-time operating system must have well-
defined, fixed time constraints, otherwise the system will fail. For example, Scientific
experiments, medical imaging systems, industrial control systems, weapon systems,
robots, air traffic control systems, etc.

There are two types of real-time operating systems.

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.

6. Network Operating System


A Network Operating System runs on a server and provides the server the capability to manage
data, users, groups, security, applications, and other networking functions. The primary purpose
of the network operating system is to allow shared file and printer access among multiple
computers in a network, typically a local area network (LAN), a private network or to other
networks.
Examples of network operating systems include Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
The advantages of network operating systems are as follows −

• Centralized servers are highly stable.


• Security is server managed.
• Upgrades to new technologies and hardware can be easily integrated into the system.
• Remote access to servers is possible from different locations and types of systems.

The disadvantages of network operating systems are as follows −

• High cost of buying and running a server.


• Dependency on a central location for most operations.
• Regular maintenance and updates are required.

7. Distributed Operating System

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.

The advantages of distributed systems are as follows −

• 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.
• Better service to the customers.
• Reduction of the load on the host computer.
• Reduction of delays in data processing.

8. Handheld Systems

Handheld systems include Personal Digital Assistants(PDAs), such as Palm-Pilots or


Cellular Telephones with connectivity to a network such as the Internet. They are usually
of limited size due to which most handheld devices have a small amount of memory, include
slow processors, and feature small display screens.

Generations of Operating System

The First Generation (1940 to early 1950s)

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 Second Generation (1955 - 1965)

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.

The Third Generation (1965 - 1980)

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 (1980 - Present Day)

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.

You might also like