Subject: Basics of Operating
System [433703]
Unit 1: Introduction
of Operating
System
Course Outcome
(CO)..
After completion of Unit-1 Students
will be able to..
Differentiate Operating Systems
based on their features.
What is Program and
software?
• Program
• Is a set of instructions that can be
executed to perform a specific task.
• Software
• Is a collection of programs and related
data that will instruct the computer
what to do? and how to do?
Types of
software
• Application software
• Is a software or group of programs,
designed for End users.
• For Ex. Word processor, spreadsheet,
accounting applications, web browser etc.
• System software
• Is a software designed to provide the
platform for other software like application
software, utility software etc.
• For Ex. Operating system like Linux,
windows, Mac OS etc.
4
Definition
Definition : OS is a program (type of
system software) that controls the
execution of application program and acts
as an interface between the user and H/W
- An OS is an intermediary between the user
of the computer & the computer hardware
- OS is an important part of almost every
computer systems
• Purpose:- to provide environment so user
can execute program easily
5
Objectives of the
OS
• Hide details of computer HW from User
• Effective management and allocation
of resources to processes.
• Acts as an interface between user
and HW
• Makes computer system easier to use
in efficient manner.
• Provide effective and efficient
environment for user to execute
programs.
6
Goals of
OS
- OS doing mainlytwo tasks:
- Manage comp H/W
- provide user a simpler interface
Goal:
- Provide convenience to users
- Efficient operations of the comp
sys
7
Goals of
OS
Primary Goals:
• User Convenience : It should be easy to use,
providing a user-friendly interface and making it
simple to interact with the system.
• Program Execution: It facilitates the execution of
user programs, providing the necessary
environment and services for them to run.
• Resource Management: The OS manages and
allocates the computer's resources, including the
CPU, memory, disk storage, and input/output
devices, to ensure fair utilization.
• Security: The OS protects the system and user data
from unauthorized access, ensuring the
confidentiality, integrity, and availability of
information. 8
Goals of
OS
Secondary Goals:
• Efficient Resource Utilization: It should aim to
maximize the performance and utilization of
computer resources like CPU, Memory and IO
devices, ensuring that the system runs smoothly
and efficiently.
• Reliability: It should be robust and reliable, able to
handle errors and exceptions gracefully, ensuring
that the system continues to operate smoothly. It
should be modular in design and easy to debug.
9
Functions of OS
Process Management
• Takes care of creating and deleting
processes, scheduling of resources, process
synchronisation.
Memory Management
• Allocates and reallocates memory for
various processes according to their needs.
File Management
• Keeping track of all files and maintaining the
integrity of data within them, including their
directory structure.
10
Functions of OS
Security
• Protects resources and information of a
computer system against destruction
and unauthorized access
Device management/ IO Management
• Co ordinating and controlling
various input and output devices
Job control
• System commands which controls
the operation of OS
11
Why there is a Need of
OS ?
• OS as resource allocator
• Easy interaction between human (user) and
HW
• When power in ON, OS starts itself.
• Controlling of IO and program
execution
• Providing security
• Loading and scheduling user
programs
• Efficient use of memory in
computer
12
Components of the
Computer
- H/W System
-H/W is at lowest level, contain physical
devices like processor, memory, KB etc.
- OS
- OS manages all the H/W, also hide
the complex details of the H/W from
users.
- provide simpler i/f
- Application program
- Appl program are for particular tasks
- Ex->railway reservation sys, banking
sys etc
-User
- at the top
- Interact with the system using appl
13
program
Views of Operating
system
(1) User View (user point of view)
• This is a top down view
• OS can be considered as an extended machine
• OS hides all the details of the H/W from user,
provide simple i/f
• User doesn’t know the complexities of the H/W
• Primary goal is → user convenience
(2) System View (system point of view)
• This is a bottom up view
• OS can be considered as a resource manager
• OS manager all the resources as CPU, memory,
I/O devices
• Resources can be shared in two ways:
1. By multiplexing in Time and 2. By
multiplexing in Space 14
Types of Operating
systems
• Batch operating system
• Multiprogramming operating
system
• Time sharing operating system
• Multitasking operating system
• Real time operating system
• Network operating system
• Distributed operating system
15
Types of
1. Batch Operating System
OS
• In earlier systems→ input were card readers, tape
drives and outputs were line printers, punch cards,
tape drives
Job
Input (Batch of job) Output
OS
• Job is submitted to the operator, then loaded a
single program into main memory
• Operator sort them in batches with similar char.
• After some time (days) comp generated out put
and errors.
• Memory is divided in to two parts → Job and OS
16
Types of
• Advantages of Batch Operating System
• Multiple users can share the batch systems.
•
OS
The idle time for the batch system is very little.
• It is easy to manage large work repeatedly in batch
systems
• No need specific hardware and system support to
input data in system
• Disadvantages of Batch OS
• Low throughput → as CPU remains idle when I/O going on
• Programmers do not have direct interaction with
the job
• Debugging is only offline
• Operations were too much time consuming
• Examples of Batch Operating Systems: Payroll
17
Systems, Bank Statements, etc.
Types of
2. Multi programming Operating System
• OS
In which ability to run more than one
program concurrently
• More than one program loaded into main memory
(RAM) simultaneously and executed
simultaneously
• Also referred as Multi tasking
• It improves system throughput and resource
utilization
18
Types of
Multiprogramming can be implemented in two
ways OS
1. Non preemptive
• Program is allowed to execute until it
voluntarily gives up the CPU
• Program gives up when it wait for some event like
I/O operation or when it terminates.
• When CPU becomes free, it is allocated to some
other program
2. Preemptive
• Program is allowed to run for some maximum amount
of time
• After then, CPU is forcibly taken away from the
program
• It is also called ‘Time sharing operating system’
• Suitable for interactive programs. 19
•
Types of
OS required following features for multi programming
OS
• Memory management and protection
• OS should have virtual memory and swapping
• CPU scheduling should be sophisticated
• Disk management and file system should not be
complex
• Synchronization and communication should be there to
avoid a deadlock
Advantages:
• Maximum CPU utilization
• Users feel an illusion that many programs are
allocated to the CPU simultaneously
Disadvantage 20
• CPU scheduling is required
Types of
3. Time sharing operating system
• Time sharing is aOS logical extension of
multiprogramming.
• Provide simultaneous user interaction
• Time-sharing systems were developed to provide
interactive use of a computer system at a reasonable
cost.
• Multiple jobs are executed by switching the CPU
between them.
• In this, the CPU time is shared by different processes, so
it is called as “Time sharing Systems”.
• Time slice is defined by the OS, for sharing CPU time
between processes.
• Examples: Multics, Unix, etc., 21
Types of
Advantage
OS
• Each task gets an equal
opportunity.
• Fewer chances of duplication of
software.
• CPU idle time can be reduced.
Disadvantages
• Reliability problem.
• One must have to take of the
security and integrity of user
programs and data.
• Data communication problem.
22
Types of
4. Real time operating system
• OS
In which time is a key parameter
• Input immediately affects output and time is very critical
• Generally used in nuclear power plants, oil refining,
chemical processing and air traffic control
• Input coming from some sensors are processed immediately and
then results are generated which controls some devices
• All operations occurs in some time limits
• Well-known RTOS->VxWorks, QNX, FreeRTOS, and Zephyr
• There are two types of RTOS
1. Hard real time system → all critical tasks must be completed
within specified time limit, tasks are guaranteed to occur in
time.
• Ex → oil refining, airospace, automotive, etc
2. Soft real time system → less strict
• Missing deadline some time
• Ex → digital audio and multimedia system, online gaming 23
Multi processing OS
Multi-Processing Operating System is a type of
Operating System in which more than one CPU is
used for the execution of resources. It betters the
throughput of the System.
1. Symmetric multiprocessing
2. Asymmetric multiprocessing
24
• Advantages
• It increases the throughput of the
system.
• As it has several processors, so, if
one processor fails, we can proceed
with another processor.
• Disadvantages
• Due to the multiple CPU, it can be
more complex and somehow
difficult to understand.
25
Network operating
system
An system, which
includes
Operating and
associated
software protocol t
communicat s with o
e computers via a othe
conveniently network and r
cost-
effectively, is called Operating
System.
Advantages of Network Operating
System
• In this type of operating system, network
traffic reduces due to division between
clients
the and the server.
• This type of system is less expensive to set up
and maintain.
Disadvantages of Network Operating System
• In this type of operating system, the failure of
any node in a system affects the whole system.
• Security and performance are important issues.
So trained network administrators are required for
network administration.
• Example: Microsoft Windows Server, Cisco IOS
27
Distributed Operating
• System
The Distributed Operating system is not
installed on a single machine, it is divided
into parts, and these parts are loaded on
different machines.
• A part of the distributed Operating system is
installed on each machine to make their
communication possible.
• Distributed Operating systems are much
more complex, large, and sophisticated
than Network operating systems because
they also have to take care of varying
networking protocols.
• Ex. LOCUS, MICROS, Google's Fuchsia OS,
and Apache Hadoop
28
Distributed Operating
System
Various autonomous interconnected computers
communicate with each other using a shared
communication network.
Independent systems possess their own memory
unit and CPU.
These systems' processors differ in size and
function.
The major benefit of working with these types of
operating systems is that it is always possible that
one user can access the files or software that are
not present on his system but on some other
system connected within this network, i.e., remote
access is enabled within the devices connected to
that network.
29
Distributed Operating
Systemof Distributed OS:
Application
• Cloud Computing Platforms
• Internet of Things (IoT)
• Distributed Databases
• Content Delivery Networks (CDNs)
• Peer-to-Peer (P2P) Networks
• High-Performance Computing (HPC)
• Distributed File Systems
30
31
Advantages of Distributed Operating System
• The distributed operating system provides
sharing of resources.
• This type of system is fault-tolerant
• Load on host computer reduces
• These systems are easily scalable as many
systems can be easily added to the network
Disadvantages of Distributed Operating
System
• Protocol overhead can
dominate computation cost.
• These types of systems are not readily
available as they are very expensive
• Not only that the underlying software is highly
32
OS
•
Services
OS services can be describes in two diff
ways
1. user point of view → convenience
2. system point of view → efficiency
Services from user point Services from
system of view point of view
• Program execution • Resource allocation
• I/O operations • Accounting
• File system manipulation • Protection
• Communication
• Error detection
33
Services from user
point
❑ Program of
Execution:
The main Goal of OS is to provide an efficient
and view
convenient environment for the execution of
program. So an OS must provide various functions for
loading a program into main memory, execute it and
after execute terminate it.
❑ I/O Operations:
A running program needs I/O operations for
reading input data, and for outputting the result. This
I/O may be with a file or with a device. As User cant
control I/O device directly for security reasons, OS
provides service for I/O operations
❑ File System Manipulations
OS provides file system
manipulations functionalities like create, read, write,
and delete a file.
34
❑ Communications:
In multitasking environment more
than one process is running
simultaneously. Sometimes there is a
need of exchanging information among
processes. Such processes may be on the
same machine, or on different machines. OS
provides mechanism for such inter process
communication
❑ Error Detection
Errors may be in user program, CPU
and Memory Hardware, or in I/O devices.
OS detects such errors and makes User
aware from them. It also provides some error
recovery mechanism.
35
Services from system
pointAllocation:
❑ Resource of
view
When multiple users are sharing
same machine, or when multiple jobs
the
are
running simultaneously, there is a need of fair
allocation of resources among them, OS does this.
❑ Accounting:
Accounting is the process of
keeping information about which user uses which
resource and for what duration of time. Such
information can be used to bill the users in multi-
user environment, or to get usage statistics to make
future planning.
❑ Protection:
OS ensures that all access to system
resource is controlled. Also security from
outsides is important. 36
Generations of Operating
Systems
• First generation (1945-1955)
• Vacuum Tubes
• Second Generation (1955- 1965)
• Era of Transistors
• Third Generation (1965-1980)
• Era of Integrated Circuits (ICs)
• Fourth Generation (1980
onwards)
• Era of Large Scale Integration (LSI)
History of
OS Evaluation of
OS
33
Evolution of Operating
System
1.The First Generation(1945-1955)
- Hardware : Vacuum tube and plug
boards
- No Operating System, No
programming languages.
2. The Second Generation( 1955-1965)
- Hardware : Transistors
- Machines were called Mainframes
- Batch Operating System took birth
( described in next section).
3. The Third Generation( 1965-1980)
-Hardware : Integrated Circuits (ICs)
- Multiprogramming OS and Variations of it
such as Time-Sharing, Multitasking OS
came in picture.
- UNIX became popular Operating System.
4. Forth Generation( 1980- Present)
- Hardware: LSI ( Large scale integration)
- Personal Computers evolved
- OS with GUI as Windows 95, 98, NT, XP,
Windows 7, 8 etc and LINUX.
Operating system structures
• What is Kernel ??
• The kernel is the core part of an operating system. It
acts as a bridge between software applications and
computer hardware.
• The kernel is the first part of the operating system to
load into memory during booting (i.e., system
startup), and it remains there for the entire duration of
the computer session because its services are required
continuously.
• It manages system resources, such as the CPU,
memory, and devices, ensuring everything works
together smoothly and efficiently.
(1) Monolithic Structure
• In this approach, all the core functionalities of the
operating system—such as process management,
memory management, file systems, I/O management,
and so on—are combined into a single large binary file.
This entire binary runs in kernel mode.
• It is one of the most common techniques used for
designing early operating systems.
• Whenever a user application needs to access any of these
OS functionalities, it does so by using a system call.
• To better understand this approach, let’s consider the
structure of a traditional UNIX operating system, As
shown in the following figure-1.
Ex. Traditional UNIX system Structure
•In this structure, the OS is broadly divided into two parts: System programs,
and the kernel
•Everything below the system call interface and above the hardware interface is
considered part of the kernel.
• The kernel is responsible for providing important OS services like:
• o File system management
• o CPU scheduling
• o Memory management
• o Device drivers
• o Other low-level operations
• All these services are accessible to user programs through system calls.
• In a monolithic structure, most OS services reside in the same address
space (i.e., the kernel space) and can call each other directly.
• While the monolithic kernel looks simple conceptually, in reality, it is
difficult to design, implement, and maintain, especially as the system
grows in size.
• However, the biggest advantage is performance—since all components
are tightly integrated; the system is fast and efficient, with minimal
overhead from system calls or internal communication.
• In a monolithic structure, all operating system services run in kernel
mode and share the same address space. So, if any one service (like a
device driver or file system module) fails or has a bug, it can crash the
entire operating system.
(2) Layered Approach
• In the layered approach,
the operating system is
broken down into
multiple layers (or
levels).
• The lowest layer (Layer
0) is the hardware.
• The highest layer (Layer
N) is the user interface.
• This layering structure
is depicted in Figure-2
below
• Each layer is an abstract object, consisting of data
and operations that can manipulate that data.
• A higher layer can call (invoke) the operations
provided by the layer directly below it, but not those
of layers further down directly
Key Advantages
• Simplicity: The system is easier to build and
maintain because each layer performs a well-
defined function.
• Ease of debugging: Errors can be located more
easily because functionality is separated by layers.
(3) Microkernel Structure
• The microkernel approach structures the operating
system by removing all nonessential components
from the kernel and implementing them as user-
level programs that run in separate address spaces.
As a result, the kernel becomes smaller and simpler.
• Typically, a microkernel provides only the core
functionalities, such as:
• Basic process management
• Memory management
• Inter-process communication (IPC) through message
passing
• The architecture of a typical microkernel-based
operating system is shown in the figure-3 below.
Architecture of typical Microkernel
The primary role of the microkernel is to manage communication between:
Client programs (user applications) and System services (such as file systems,
device drivers), which are also running in user space. This communication is
handled using message passing.
Example: When a client program wants to access a file, It does not
communicate directly with the file server. Instead, the client and file server
exchange messages indirectly through the microkernel, which acts as a
mediator.
Case Study: Windows Vs Linux
Windows Linux
1. Closed Source 1. Open source
2. Less secure 2. Secure
3. High Hardware cost 3. High Hardware cost
4. Customizable features 4. Non customizable
5. Uses different data drives 5. There are no drives,
like C: D: to store files tree
and folders like hierarchical file
6. Hard drives, printers system is used.
are considered as 6. Peripherals are
devices. considered as files
7. Four types of user 7. Three types of user
account accounts 1) Regular 2)
types 1)administrator Root
2) 3) Service account
Standard 3) Child 4)
Guest
Case Study: Windows Vs Linux
Windows Linux
8. Administrator user has all 8. Root user is super user
admin privileges having all
of computer administrative
9. Two files with privileges
same name 9. Linux is case sensitive,
in same folder are so
not possible “sample” and
“SAMPLE”
10.My Documents is are two different files
default Home directory in LINUX/Unix
11.Backward slash (\) is 10.For every use
used as path /home/username
separator between directory is created
directories. which
is called his
home directory
11.Forward slash (/)
is used
THANK YOU..
39