You are on page 1of 46

BY

JUHI AGARWAL
ASSISTANT PROFESSOR
CIT
UPES
What is an Operating System?
 A program that acts as an intermediary between a user of a computer and
the computer hardware.
 It provides a user-friendly environment in which a user may easily develop
and execute programs.
 Operating System is a software, which makes a computer to actually work.

 Otherwise, hardware knowledge would be mandatory for computer


programming.
 So, it can be said that an OS hides the complexity of hardware from
uninterested users.
Examples: Windows, Linux, Unix and Mac OS, etc.,
Operating system goals:
Execute user programs and make solving user problems
easier.
Make the computer system convenient to use.
Use the computer hardware in an efficient manner.
In general, a computer system has some resources
which may be utilized to solve a problem. They are
Memory
Processor(s)
I/O
File System
etc.
Computer System Components/ Structure of
Operating System

1. Hardware – provides basic computing resources (CPU, memory, I/O


devices).
2. Operating system – controls and coordinates the use of the hardware
among the various application programs for the various users.
3. Applications programs – define the ways in which the system resources
are used to solve the computing problems of the users (compilers,
database systems, video games, business programs).
4. System programs: This layer consists of compilers, Assemblers,
linker etc.
5. Users (people, machines, other computers).
Abstract View of System Components
Humans

Program
Interface

User Programs

O.S. Interface

O.S.

Hardware Interface/
Privileged
Instructions
Disk/Tape/Mem
6
ory
Two Views of Operatin System

1. User's View
2. System View
1. User View
The user view of the computer refers to the interface being
used. Such systems are designed for one user to monopolize its
resources, to maximize the work that the user is performing. In
these cases, the operating system is designed mostly for ease of
use, with some attention paid to performance, and none paid to
resource utilization.
2. System View
Operating system can be viewed as a resource allocator
also. A computer system consists of many resources like -
hardware and software - that must be managed efciently.
The operating system acts as the manager of the resources,
decides between conflctlng requests, controls
executlon of programs etc.
 The operating system performs the following system tasks

1) Process management: Process management is responsible for ensuring that each process and
application receives the required processor’s time for its functioning and using as many
processor cycles as possible.
Depending on the operating system, the basic unit of software that the operating system deals
with in scheduling the work done by the processor is called as process or a thread. A process is
software which performs actions and can be controlled by a user or other applications or by
the operating system.

2) Memory management: A single process must have enough memory to execute and should not
run into the memory space for another process. The various memories in the system must be
properly used so that each process can run efectively. Memory management is responsible for
accomplishing this. The operating system sets up the boundary for the types of software and
for individual applications.

10
3) Device management: A driver is a program which is used to control the path between
the operating system and the hardware on the computer’s motherboard. The driver acts
as a translator between the electrical signals of the hardware and the high-level
programming languages of the operating system. The operating system assigns high-
priority blocks to drivers so as to release and ready the hardware resource for further
usage as quickly as possible.

3) File management: File management is also known as file system, is the system which
the operating system uses to organize and to keep track of the files. A hierarchical file
system uses directories to organize files into a tree structure. An entry is created by the
operating system in the file system to show the start and end locations of a file, the file
name, file type, file archiving, and user’s permissions to read and modify the file and
the date and time of the files creation.

11
Fuictois of Operatin System

It boots the computer


It performs basic computer tasks e.g. managing the
various peripheral devices e.g. mouse, keyboard
It provides a user interface, e.g. command line, graphical
user interface (GUI)
It handles system resources such as computer's memory
and sharing of the central processing unit(CPU) time by
various applications or peripheral devices.
It provides fle management which refers to the way that
the operating system manipulates, stores, retrieves and
saves data.
Error Handling is done by the operating system. It takes
preventive measures whenever required to avoid errors.
The OS manages these resources and allocates them to
specific programs and users.
With the management of the OS, a programmer is rid of
difficult hardware considerations.
 An OS provides services for
Processor Management
Memory Management
File Management
Device Management
Concurrency Control
1.1 Geieral Defiitoi
Another aspect for the usage
of OS is that; it is used as a Application Programs
predefied library for
System Programs
hardware-software
interaction. Operating System
This is why, system
programs apply to the Machine Language
installed OS since they
cannot reach hardware HARDWARE

directly.
DIFFERENCES BETWEEN APPLICATION AND SYSTEM
SOFTWARE
Subject Application Software System Software
System software is
computer software
Application software is
designed to operate the
computer software
Definition computer hardware and to
designed to help the user to
provide a platform for
perform specific tasks.
running application
software.
It is specific purpose It is general-purpose
Purpose
software. software.

•Time Sharing,
•Resource Sharing,
•Client Server
•Batch Processing
Operating System
•Real time Operating
•Package Program,
Classification System
•Customized Program
•Multi-processing
Operating System
•Multi-programming
Operating System
•Distributed Operating
System
Application Software System Software Create his
performs in a environment own environment to run
Environment
which created by itself and run other
System/Operating System application.

It executes as and when It executes all the time in


Execution Time
required. computer.

Application is not essential System software is essential


Essentiality
for a computer. for a computer

The number of application The number of system


Number software is much more than software is less than
system software. application software.
Examples of system Programs

1. The BIOS (basic input/output system) gets the computer system started


after you turn it on and manages the data flow between the operating
system and attached devices such as the hard disk, video
adapter, keyboard, mouse, and printer.
2. The boot program loads the operating system into the computer's main
memory or random access memory (RAM).
3. An assembler takes basic computer instructions and converts them into a
pattern of bits that the computer's processor can use to perform its basic
operations.
4. A device driver controls a particular type of device that is attached to your
computer, such as a keyboard or a mouse. The driver program converts the
more general input/output instructions of the operating system to messages
that the device type can understand.
Types of Operatin System
1. Batch operating system
2. Serial Processing
3. Time-sharing operating systems
4. Multiprogramming
1. Multiuser
2. Multiprocessor
3. Multitasking
5. Distributed operating System
6. Network operating System
7. Real Time operating System
Serial Processing
 1) Serial Processing: The Serial Processing Operating Systems are those which
Performs all the instructions into a Sequence Manner or the Instructions those are
given by the user will be executed by using the FIFO Manner means First in First
Out. All the Instructions those are Entered First in the System will be Executed First
and the Instructions those are Entered Later Will be Executed Later. For Running
the Instructions the Program Counter is used which is used for Executing all
the Instructions.
 In this the Program Counter will determines which instruction is going to Execute
and the which instruction will be Execute after this. Mainly the Punch Cards are
used for this. In this all the Jobs are firstly Prepared and Stored on the Card and
after that card will be entered in the System and after that all the Instructions will be
executed one by One. But the Main Problem is that a user doesn’t interact with
the System while he is working on the System, means the user can’t be able to enter
the data for Execution.
What is Batch Processing Operating System?

 To avoid the problems of early systems the batch processing systems were
introduced. The problem of early systems was more setup time. So the
problem of more set up time was reduced by processing the jobs in batches,
known as batch processing system. In this approach similar jobs were
submitted to the CPU for processing and were run together.
Time-shariin operatin systems
 A tlme sharlng system allows many users to share the computer resources
simultaneously. In other words, time sharing refers to the allocation of
computer resources in time slots to several programs simultaneously. For
example a mainframe computer that has many users logged on to it. Each user
uses the resources of the mainframe -i.e. memory, CPU etc. The users feel that
they are exclusive user of the CPU, even though this is not possible with one
CPU i.e. shared among diferent users
Multi programming
In Multi programming we can Execute Multiple Programs
on the System at a Time and in the Multi-programming the
CPU will never get idle, because with the help of Multi-
Programming we can Execute Many Programs on the System
and When we are Working with the Program then we can also
Submit the Second or Another Program for Running and the
CPU will then Execute the Second Program after the
completion of the First Program. And in this we can also
specify our Input means a user can also interact with the
System.
Multiprogramming operating system
Multi-tasking operating system
Multiuser

Operating System Concepts


Multiprocessing
 Multiprocessing: Generally a Computer has a Single Processor means a
Computer have a just one CPU for Processing the instructions. But if we
are Running multiple jobs, then this will decrease the Speed of CPU. For
Increasing the Speed of Processing then we uses the Multiprocessing, in the
Multi Processing there are two or More CPU in a Single Operating System
if one CPU will fail, then other CPU is used for providing backup to the
first CPU. With the help of Multi-processing, we can Execute Many Jobs at
a Time. All the Operations are divided into the Number of CPU’s. if first
CPU Completed his Work before the Second CPU, then the Work of
Second CPU will be divided into the First and Second.
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.
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.
Real Time operating System

 A real-time system is defined as a data processing system in which the time interval
required to process and respond to inputs is so small that it controls the
environment. The time taken by the system to respond to an input and display of
required updated information is termed as the response time. So in this method, the
response time is very less as compared to online processing.

 Real-time systems are used when there are rigid time requirements on the operation
of a processor or the flow of data and real-time systems can be used as a control
device in a dedicated application. 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 System
 1) Hard Real Time System: In the Hard Real Time System, Time is fixed and we
can’t Change any Moments of the Time of Processing. Means CPU will Process the
data as we Enters the Data.
 2) Soft Real Time System: In the Soft Real Time System, some Moments can be
Change. Means after giving the Command to the CPU, CPU Performs the Operation
after a Microsecond.
Need of Operating System
1. For convenience
Provides a high level abstraction of physical resources
Enables the construction of more complex software
systems.
Enables portable code.

2. For efciency
• Shares limited or expensive physical resources.
• Provides protection
Operating System Services
 Program execution – system capability to load a program into memory
and to run it.
 I/O operations – since user programs cannot execute I/O operations
directly, the operating system must provide some means to perform I/O.
 File-system manipulation – program capability to read, write, create, and
delete files.
 Communications – exchange of information between processes executing
either on the same computer or on different systems tied together by a
network. Implemented via shared memory or message passing.
 Error detection – ensure correct computing by detecting errors in the CPU
and memory hardware, in I/O devices, or in user programs.
Additional Operating System Functions
Additional functions exist not for helping the user, but rather for ensuring
efficient system operations.
• Resource allocation – allocating resources to multiple users or multiple
jobs running at the same time.
• Accounting – keep track of and record which users use how much and
what kinds of computer resources for account billing or for
accumulating usage statistics.
• Protection – ensuring that all access to system resources is controlled.
Operating system services
An Operating System provides services to both the users and to the programs.

It provides programs an environment to execute.


It provides users the services to execute the programs in a convenient
manner.
Following are a few common services provided by an operating system

Program execution
I/O operations
File System manipulation
Communication
Error Detection
Resource Allocation
Protection
1. Pronram executoi
 Operating systems handle many kinds of activities from user programs
to system programs like printer spooler, name servers, fle server, etc.
Each of these activities is encapsulated as a process.
 A process includes the complete execution context (code to execute,
data to manipulate, registers, OS resources in use). Following are the
major activities of an operating system with respect to program
management −
 Loads a program into memory.
 Executes the program.
 Handles program's execution.
 Provides a mechanism for process synchronization.
 Provides a mechanism for process communication.
 Provides a mechanism for deadlock handling.
2. I/O Operatoi
 An I/O subsystem comprises of I/O devices and their corresponding
driver software. Drivers hide the peculiarities of specifc hardware
devices from the users.

 An Operating System manages the communication between user and


device drivers.

 I/O operation means read or write operation with any fle or any
specifc I/O device.

 Operating system provides the access to the required I/O device when
required.
3. File system maiipulatoi
 A fle represents a collection of related information. Computers can store fles
on the disk (secondary storage), for long-term storage purpose. Examples of
storage media include magnetic tape, magnetic disk and optical disk drives like
CD, DVD. Each of these media has its own properties like speed, capacity, data
transfer rate and data access methods.
 A fle system is normally organized into directories for easy navigation and
usage. These directories may contain fles and other directions. Following are
the major activities of an operating system with respect to fle management −
 Program needs to read a fle or write a fle.
 The operating system gives the permission to the program for operation on fle.
 Permission varies from read-only, read-write, denied and so on.
 Operating System provides an interface to the user to create/delete fles.
 Operating System provides an interface to the user to create/delete directories.
 Operating System provides an interface to create the backup of fle system.
4. Commuiicatoi
 In case of distributed systems which are a collection of processors that
do not share memory, peripheral devices, or a clock, the operating
system manages communications between all the processes. Multiple
processes communicate with one another through communication
lines in the network.
 The OS handles routing and connection strategies, and the problems
of contention and security. Following are the major activities of an
operating system with respect to communication −
 Two processes often require data to be transferred between them
 Both the processes can be on one computer or on diferent computers,
but are connected through a computer network.
 Communication may be implemented by two methods, either by
Shared Memory or by Message Passing.
5. Error haidliin
 Errors can occur anytime and anywhere. An error may occur in CPU,
in I/O devices or in the memory hardware. Following are the major
activities of an operating system with respect to error handling −
 The OS constantly checks for possible errors.
 The OS takes an appropriate action to ensure correct and consistent
computing.
6. Resource Maianemeit
 In case of multi-user or multi-tasking environment, resources such as
main memory, CPU cycles and fles storage are to be allocated to each
user or job. Following are the major activities of an operating system
with respect to resource management −
 The OS manages all kinds of resources using schedulers.
 CPU scheduling algorithms are used for better utilization of CPU.
7. Protectoi

 Considering a computer system having multiple users and concurrent


execution of multiple processes, the various processes must be protected from
each other's activities.
 Protection refers to a mechanism or a way to control the access of programs,
processes, or users to the resources defned by a computer system. Following
are the major activities of an operating system with respect to protection −
 The OS ensures that all access to system resources is controlled.
 The OS ensures that external I/O devices are protected from invalid access
attempts.
 The OS provides authentication features for each user by means of passwords.

You might also like