0% found this document useful (0 votes)
35 views27 pages

Operating System Ubit 3

Notes btech 2nd year

Uploaded by

sonakshib30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views27 pages

Operating System Ubit 3

Notes btech 2nd year

Uploaded by

sonakshib30
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

VISION INSTITUTE OF TECHNOLOGY,ALIGARH

Subject: Operating system

Unit-1

Introduction : Operating system and functions, Classification of Operating


systems- Batch, Interactive, Time sharing, Real Time System, Multiprocessor
Systems, Multiuser Systems, Multiprocess Systems, Multithreaded Systems,
Operating System Structure- Layered structure, System Components,
Operating System services, Re-entrant Kernels, Monolithic and Microkernel
Systems.
Outcome: Introduction: An operating system (OS) serves as an intermediary
between users and computer hardware, providing a platform for executing
programs and managing system resources. It performs various functions to
ensure efficient utilization of resources and smooth execution of tasks. These
functions include process management, memory management, file system
management, device management, and user interface.
Classification of Operating Systems:
1. Batch Operating System:
 Processes are executed in batches without user interaction.
 Examples include early mainframe systems where jobs were
submitted in batches and executed sequentially.
2. Interactive Operating System:
 Provides a user-friendly interface for interactive communication
between users and the system.
 Allows users to interact with the system in real-time, executing
commands and receiving immediate responses.
 Modern desktop and server operating systems like Windows,
macOS, and Linux fall into this category.
3. Time-sharing Operating System:
 Allows multiple users to interact with the system concurrently.
 Time is divided into small time slices, with each user getting a
fair share of CPU time.
 Examples include UNIX and its variants.

Page1 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

4. Real-Time Operating System:


 Designed to handle real-time applications where timely response
is crucial.
 Guarantees a maximum response time for critical tasks.
 Used in systems like flight control systems, industrial
automation, and multimedia applications.
5. Multiprocessor Systems:
 Support multiple processors working together to execute tasks
simultaneously.
 Enhance system performance and provide fault tolerance.
 Common in high-performance computing and servers.
6. Multiuser Systems:
 Allow multiple users to access the system concurrently.
 Each user has their own account and resources are shared
among users.
 Examples include mainframe systems and server environments.
7. Multiprocess Systems:
 Combine features of multiprocessor and multiuser systems.
 Support multiple users and multiple processors working
concurrently.
8. Multithreaded Systems:
 Support multiple threads of execution within a single process.
 Enhance system responsiveness and resource utilization.
 Common in modern operating systems and applications.
Operating System Structure:

Page2 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

 Layered Structure: Organizes the OS into layers, with each layer


responsible for specific functions. Communication between layers
occurs through well-defined interfaces.
 System Components: Includes various modules and components such
as the kernel, device drivers, file system, and user interface.
 Operating System Services: Provide essential functions to applications
and users, including process management, memory management, file
system services, and device management.
 Reentrant Kernels: Kernels that can handle multiple requests
simultaneously without interference.
 Monolithic and Microkernel Systems: Refers to the design of the
operating system kernel. Monolithic kernels contain most OS
functionalities within a single executable, while microkernels delegate
some functionalities to separate processes or servers.

OPERATING SYSTEM:

An Operating System can be defined as an interface between user and hardware.


It is responsible for the execution of all the processes, Resource
Allocation, CPU management, File Management and many other tasks.

The purpose of an operating system is to provide an environment in which a user can


execute programs in convenient and efficient manner.

Page3 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Structure of a Computer System


A Computer System consists of:

o Users (people who are using the computer)


o Application Programs (Compilers, Databases, Games, Video player, Browsers, etc.)
o System Programs (Shells, Editors, Compilers, etc.)
o Operating System ( A special program which acts as an interface between user and
hardware )
o Hardware ( CPU, Disks, Memory, etc)

Page4 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Types of Operating Systems (OS)


An operating system is a well-organized collection of programs that manages the
computer hardware. It is a type of system software that is responsible for the smooth
functioning of the computer system.

Batch Operating System


In the 1970s, Batch processing was very popular. In this technique, similar types of jobs
were batched together and executed in time. People were used to having a single
computer which was called a mainframe.

In Batch operating system, access is given to more than one person; they submit their
respective jobs to the system for the execution.

The system put all of the jobs in a queue on the basis of first come first serve and then
executes the jobs one by one. The users collect their respective output when all the
jobs get executed.

Page5 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

The purpose of this operating system was mainly to transfer control from one job to
another as soon as the job was completed. It contained a small set of programs called
the resident monitor that always resided in one part of the main memory. The
remaining part is used for servicing jobs.

Page6 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Advantages of Batch OS

o The use of a resident monitor improves computer efficiency as it eliminates CPU time
between two jobs.

Disadvantages of Batch OS
1. Starvation

Batch processing suffers from starvation.

Page7 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

There are five jobs J1, J2, J3, J4, and J5, present in the batch. If the execution time of J1
is very high, then the other four jobs will never be executed, or they will have to wait
for a very long time. Hence the other processes get starved.

2. Not Interactive

Batch Processing is not suitable for jobs that are dependent on the user's input. If a
job requires the input of two numbers from the console, then it will never get it in the
batch processing scenario since the user is not present at the time of execution.

Multiprogramming Operating System


Multiprogramming is an extension to batch processing where the CPU is always kept
busy. Each process needs two types of system time: CPU time and IO time.

In a multiprogramming environment, when a process does its I/O, The CPU can start
the execution of other processes. Therefore, multiprogramming improves the
efficiency of the system.

Page8 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Advantages of Multiprogramming OS

o Throughout the system, it increased as the CPU always had one program to execute.
o Response time can also be reduced.

Multiprocessing Operating System


In Multiprocessing, Parallel computing is achieved. There are more than one
processors present in the system which can execute more than one process at the
same time. This will increase the throughput of the system.

Page9 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Multitasking Operating System

Page10 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

The multitasking operating system is a logical extension of a multiprogramming system that


enables multiple programs simultaneously. It allows a user to perform more than one
computer task at the same time.

Advantages of Multitasking operating system

o This operating system is more suited to supporting multiple users simultaneously.


o The multitasking operating systems have well-defined memory management.

Disadvantages of Multitasking operating system

o The multiple processors are busier at the same time to complete any task in a
multitasking environment, so the CPU generates more heat.

Network Operating System

An Operating system, which includes software and associated protocols


to communicate with other computers via a network conveniently and

Page11 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

cost-effectively, is called Network Advantages of Network Operating


System

o In this type of operating system, network traffic reduces due to the division between
clients and the server.
o This type of system is less expensive to set up and maintain.

Disadvantages of Network Operating System

o In this type of operating system, the failure of any node in a system affects the whole
system.
o Security and performance are important issues. So trained network administrators are
required for network administration.

Real Time Operating System


In Real-Time Systems, each job carries a certain deadline within which the job is
supposed to be completed, otherwise, the huge loss will be there, or even if the result
is produced, it will be completely useless.

Page12 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

The Application of a Real-Time system exists in the case of military applications, if you
want to drop a missile, then the missile is supposed to be dropped with a certain
precision.

Advantages of Real-time operating system:

o Easy to layout, develop and execute real-time applications under the real-time
operating system.
o In a Real-time operating system, the maximum utilization of devices and systems.

Disadvantages of Real-time operating system:

o Real-time operating systems are very costly to develop.


o Real-time operating systems are very complex and can consume critical CPU cycles.

Time-Sharing Operating System


In the Time Sharing operating system, computer resources are allocated in a time-
dependent fashion to several programs simultaneously. Thus it helps to provide a large

Page13 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

number of user's direct access to the main computer. It is a logical extension of


multiprogramming. In time-sharing, the CPU is switched among multiple programs
given by different users on a scheduled basis.

A time-sharing operating system allows many users to be served simultaneously, so


sophisticated CPU scheduling schemes and Input/output management are required.

Time-sharing operating systems are very difficult and expensive to build.

Advantages of Time Sharing Operating System

o The time-sharing operating system provides effective utilization and sharing of


resources.
o This system reduces CPU idle and response time.

Disadvantages of Time Sharing Operating System

o Data transmission rates are very high in comparison to other methods.

Page14 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

o Security and integrity of user programs loaded in memory and data need to be
maintained as many users access the system at the same time.

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.

Advantages of Distributed Operating System

o The distributed operating system provides sharing of resources.


o This type of system is fault-tolerant.

Disadvantages of Distributed Operating System

o Protocol overhead can dominate computation cost.

Page15 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Multi-User Operating System


An operating system is software that acts as an interface between the
user and the computer hardware which does multiple functions such as
memory management; file management and processor management. The
operating system should have to meet the requirements of all its users in
a balanced way so that if any problem would arise with a user, it does not
affect any other user in the chain.

Multi-threaded Operating system: Multithreading is the ability of a


program or an operating system to enable more than one user at a
time without requiring multiple copies of the program running on
the computer

Page16 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Operating System Services


The main purpose of the operating system is to provide an environment for
the execution of programs. Thus, an operating system provides certain
services to programs and the users of those programs.
1. Program Execution
 The operating system provides a convenient environment where users
can run their programs.
 The operating system performs memory allocation to programs, and
load them into appropriate location so that they can execute. The users
do not have to worry about all these tasks.
2. I/O Operations
 In order to execute a program, it usually requires an I/O operation. For
example, it may need to read a file and print the output.
 When all these I/O operations are performed users cannot control I/O
devices.
 All I/O is performed under the control of the operating system.
3. Communication
 The various processes executing on a system may need to communicate
in order to exchange data or information.
 The operating system provides this communication by using a facility
for message passing. In message passing packets of information are
moved between processes by the operating system.

Page17 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Operating System Structure


An operating system is a design that enables user application programs to communicate
with the hardware of the machine. The operating system should be built with the utmost
care because it is such a complicated structure and should be simple to use and modify.
Partially developing the operating system is a simple approach to accomplish this. Each of
these components needs to have distinct inputs, outputs, and functionalities.

SIMPLE STRUCTURE
o There are four layers that make up the MS-DOS operating system, and each has
its own set of features.
o These layers include ROM BIOS device drivers, MS-DOS device drivers,
application programs, and system programs.
o The MS-DOS operating system benefits from layering because each level can
be defined independently and, when necessary, can interact with one another.
o If the system is built in layers, it will be simpler to design, manage, and update.
Because of this, simple structures can be used to build constrained systems that
are less complex.
o When a user program fails, the operating system as whole crashes.

Page18 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Advantages of Simple Structure:

o Because there are only a few interfaces and levels, it is simple to develop.
o Because there are fewer layers between the hardware and the applications, it
offers superior performance.

Disadvantages of Simple Structure:

o The entire operating system breaks if just one user program malfunctions.
o Since the layers are interconnected, and in communication with one another,
there is no abstraction or data hiding.
o The operating system's operations are accessible to layers, which can result in
data tampering and system failure.

Page19 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

LAYERED STRUCTURE
The OS is separated into layers or levels in this kind of arrangement. Layer 0 (the lowest
layer) contains the hardware, and layer 1 (the highest layer) contains the user interface
(layer N). These layers are organized hierarchically, with the top-level layers making use
of the capabilities of the lower-level ones.

The functionalities of each layer are separated in this method, and abstraction is also
an option. Because layered structures are hierarchical, debugging is simpler, therefore
all lower-level layers are debugged before the upper layer is examined. As a result, the
present layer alone has to be reviewed since all the lower layers have already been
examined.

The image below shows how OS is organized into layers:

Advantages of Layered Structure:

o Work duties are separated since each layer has its own functionality, and there
is some amount of abstraction.
o Debugging is simpler because the lower layers are examined first, followed by
the top layers.

Page20 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Disadvantages of Layered Structure:

o Performance is compromised in layered structures due to layering.


o Construction of the layers requires careful design because upper layers only
make use of lower layers' capabilities.

MONOLITHIC STRUCTURE
The monolithic operating system controls all aspects of the operating system's
operation, including file management, memory management, device management,
and operational operations.

Advantages of Monolithic Structure:

o Because layering is unnecessary and the kernel alone is responsible for


managing all operations, it is easy to design and execute.

Disadvantages of Monolithic Structure:

Page21 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

o The monolithic kernel's services are interconnected in address space and have
an impact on one another, so if any of them malfunctions, the entire system
does as well.
o It is not adaptable. Therefore, launching a new service is difficult.

Kernel?
In computer science, Kernel is a computer program that is a core or heart of an
operating system. Before discussing kernel in detail, let's first understand its basic,
i.e., Operating system in a computer.

o As discussed above, Kernel is the core part of an OS(Operating system); hence


it has full control over everything in the system. Each operation of hardware and
software is managed and administrated by the kernel.
o It acts as a bridge between applications and data processing done at the
hardware level. It is the central component of an OS.

Types of Kernel
There are mainly five types of Kernel, which are given below:

Page22 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

1. Monolithic Kernels
In a monolithic kernel, the same memory space is used to implement user services
and kernel services.

It means, in this type of kernel, there is no different memory used for user services and
kernel services.

As it uses the same memory space, the size of the kernel increases, increasing the
overall size of the OS.

The execution of processes is also faster than other kernel types as it does not use
separate user and kernel space.

Examples of Monolithic Kernels are Unix, Linux, Open VMS, XTS-400, etc.

Advantages:

Page23 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

o The execution of processes is also faster as there is no separate user space and
kernel space and less software involved.
o As it is a single piece of software hence, it's both sources and compiled forms
are smaller.

Disadvantages:

o If any service generates any error, it may crash down the whole system.
o These kernels are not portable, which means for each new architecture, they
must be rewritten.
o Large in size and hence become difficult to manage.

2. Microkernel

A microkernel is also referred to as μK, and it is different from a traditional kernel or


Monolithic Kernel. In this, user services and kernel services are implemented into two
different address spaces: user space and kernel space. Since it uses different spaces for
both the services, so, the size of the microkernel is decreased, and which also reduces the
size of the OS.

Microkernels are easier to manage and maintain as compared to monolithic kernels.


Still, if there will be a greater number of system calls and context switching, then it
might reduce the performance of the system by making it slow.

Advantages

Page24 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

o A new service can be easily added without modifying the whole OS.
o In a microkernel, if a kernel process crashes, it is still possible to prevent the
whole system from crashing.

Disadvantages

o There is more requirement of software for interfacing, which reduces the system
performance.
o Process management is very complicated.
o The messaging bugs are difficult to fixed.

S.
Parameters Microkernel Monolithic kernel
No.

In microkernel, user In monolithic kernel, both


services and kernel user services and kernel
1. Address Space
services are kept in services are kept in the
separate address space. same address space.

Design and OS is easy to design and


2. OS is complex to design.
Implementation implement.

Microkernel are smaller in Monolithic kernel is larger


3. Size
size. than microkernel.

Easier to add new Difficult to add new


4. Functionality
functionalities. functionalities.

To design a microkernel, Less code when compared


5. Coding
more code is required. to microkernel

Page25 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Failure of one component


Failure of one component
in a monolithic kernel leads
6. Failure does not effect the
to the failure of the entire
working of micro kernel.
system.

7. Processing Speed Execution speed is low. Execution speed is high.

It is easy to extend It is not easy to extend


8. Extend
Microkernel. monolithic kernel.

To implement IPC
messaging queues are Signals and Sockets are
9. Communication used by the utilized to implement IPC
communication in monolithic kernels.
microkernels.

10. Debugging Debugging is simple. Debugging is difficult.

Extra time and resources


11. Maintain It is simple to maintain. are needed for
maintenance.

Message forwarding and Message passing and


Message passing
context switching are context switching are not
12. and Context
required by the required while the kernel
switching
microkernel. is working.

The kernel only offers IPC The Kernel contains all of


13. Services and low-level device the operating system’s
management services. services.

Page26 Faculty: VIKRAM SHARMA


[email protected]
VISION INSTITUTE OF TECHNOLOGY,ALIGARH
Subject: Operating system

Unit-1

Page27 Faculty: VIKRAM SHARMA


[email protected]

You might also like