0% found this document useful (0 votes)
60 views

Unit1 OS

The document provides information about an Operating Systems course being taught at Noida Institute of Engineering and Technology. It includes details like the unit number, date, instructor name, course objectives, topics to be covered in unit 1 such as the introduction to operating systems, functions of operating systems, characteristics of operating systems, types of operating systems, and computer system structure. It also lists prerequisite knowledge, topic objectives, and learning resources like a YouTube playlist for the topic.

Uploaded by

Kanika Rajput
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)
60 views

Unit1 OS

The document provides information about an Operating Systems course being taught at Noida Institute of Engineering and Technology. It includes details like the unit number, date, instructor name, course objectives, topics to be covered in unit 1 such as the introduction to operating systems, functions of operating systems, characteristics of operating systems, types of operating systems, and computer system structure. It also lists prerequisite knowledge, topic objectives, and learning resources like a YouTube playlist for the topic.

Uploaded by

Kanika Rajput
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/ 136

Noida Institute of Engineering and Technology, Greater

Noida
Operating Systems
ACSE0403A

Unit: 1

Operating System
SWETA PANDEY
Assistant Professor
B Tech 4th Sem Deptt. of CSE

SWETA PANDEY OS Unit Number:1 1


2/15/2024
Noida Institute of Engineering and Technology, Greater
Noida

2/15/2024 SWETA PANDEY OS Unit Number:1 2


Noida Institute of Engineering and Technology Greater Noida
UNIT-I Fundamental Concepts of Operating System

1. Introduction- Functions of Operating System,


2. Characteristics of Operating System,
3. Computer System Structure,
4. Evolution of Operating Systems:
a. Batch Processing,
b. Multiprogramming,
c. Multitasking,
d. Multithreaded,
e. Real Time System,
f. Distributed System,
g. Multiprocessor Systems,
h. Multithreaded Systems,
2/15/2024 SWETA PANDEY OS Unit Number:1 3
Noida Institute of Engineering and Technology Greater Noida
5. System Calls, System Programs and System Boot, Interrupt Handling,
6. Operating System Structure-
Simple structure-
a. Layered Structure,
b. Monolithic,
Microkernel and Hybrid,
7. System Components,
8. Operating System Services,
9. Case Studies: Windows, Unix and Linux.

2/15/2024 SWETA PANDEY OS Unit Number:1 4


Branch wise Applications

1. Airlines reservation system.


2. Air traffic control system.
3. Systems that provide immediate updating.
4. Used in any system that provides up to date and minute
5. information on stock prices.
6. Defense application systems like RADAR.
7. Networked Multimedia Systems.
8. Command Control Systems.

2/15/2024 SWETA PANDEY OS Unit Number:1 5


Course Objectives

 To learn the fundamentals of Operating Systems.


 To understand what a process is and how processes are synchronized and
scheduled.
 To understand different approaches to memory management.
 Students should be able to use system calls for managing processes, memory
and the file system.
 To understand the structure and organization of the file system.

SWETA PANDEY OS Unit Number:1


2/15/2024 6
Course Outcomes
At the end of semester, students will be able to

CO1: Understand the fundamentals of an operating systems, functions and their structure
and functions.
CO2: Implement concept of process management policies, CPU Scheduling and thread
management.
CO3: Understand and implement the requirement of process synchronization and apply
deadlock handling algorithms.
CO4: Evaluate the memory management and its allocation policies.
CO5: Understand and analyze the I/O management and File systems

2/15/2024 SWETA PANDEY OS Unit Number:1 7


COs and POs Mapping
OPERATING SYSTEM (ACSE0403A )
CODE PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12

ACSE0403A .1 3 3 2 2 1 2 - 2 3 2 2 3

ACSE0403A .2 3 3 3 2 2 3 2 2 3 - 1 3

ACSE0403A .3 3 3 2 2 2 2 2 2 2 3 1 3

ACSE0403A .4 3 2 2 3 1 2 2 - 2 - 2 3

ACSE0403A .5 3 1 2 2 2 2 - - 2 2 2 3

2/15/2024 SWETA PANDEY OS Unit Number:1 8


Program Specific Outcomes
On successful completion of B. Tech. (I.T.) Program, the Information Technology graduates
will be able to:

• PSO1:- Work as a software developer, database administrator, tester or networking engineer


for providing solutions to the real world and industrial problems.
• PSO2:- Apply core subjects of information technology related to data structure and
algorithm, software engineering, web technology, operating system, database and
networking to solve complex IT problems.
• PSO3:-Practice multi-disciplinary and modern computing techniques by lifelong learning to
establish innovative career.
• PSO4:-Work in a team or individual to manage projects with ethical concern to be a
successful employee or employer in IT industry.

2/15/2024 SWETA PANDEY OS Unit Number:1 9


COs and PSOs Mapping

Program Specific Outcomes


Course
Outcomes PSO1 PSO2 PSO3 PSO4

ACSE0403A .1 2 1 2 2
ACSE0403A .2 2 2 1 2
ACSE0403A .3 2 3 3 2
ACSE0403A .4 2 2 1 2
ACSE0403A .5 2 2 2 2

2/15/2024 SWETA PANDEY OS Unit Number:1 10


Program Educational Objectives (PEOs)

• PEO1:Apply sound knowledge in the field of information technology to fulfill the needs of IT
industry.
• PEO2:Design innovative and interdisciplinary systems through latest digital technologies.
• PEO3:Inculcate professional – social ethics, team work and leadership for serving the
society.
• PEO4:Inculcate lifelong learning in the field of computing for successful career in
organizations and R&D sectors.

2/15/2024 SWETA PANDEY OS Unit Number:1 11


Brief Introduction about the subject with video

 An operating system acts as an intermediary between the user of a computer


and computer hardware. The purpose of an operating system is to provide an
environment in which a user can execute programs conveniently and
efficiently.

YouTube/other Video Links

• https://www.youtube.com/playlist?list=PLmXKhU9FNesSFvj6gASuWmQd23Ul5omtD

2/15/2024 SWETA PANDEY OS Unit Number:1 12


Prerequisite and Recap

 Basic knowledge of computer fundamentals.


 Basic knowledge of computer organization.
 Memory hierarchy
 Cache Organization
 Interrupt
 Registers
 Associative memory

2/15/2024 SWETA PANDEY OS Unit Number:1 13


Topic Objectives

Topic Objective
Students will be able to
Introduction of Operating System Understand the basics of Operating System,its features
characteristics and functions

Types of operating System Understand the different types of operating System


Interrupt Handling Understand the operating system concepts
Operating System Structure Understand the components and internal structure of
operating system
Operating System Services Know the different types of operating system services

2/15/2024 SWETA PANDEY OS Unit Number:1 14


Unit-1 Content
1. Introduction
2. Functions of Operating System
3. Characteristics of Operating System
4. Computer System Structure,
5. Types of Operating Systems
a. Simple Batch Systems
b. Multiprogramming Batched Systems
c. Time-Sharing Systems
d. Real -Time Systems
e. Parallel Systems
f. Distributed Systems

2/15/2024 SWETA PANDEY OS Unit Number:1 15


Introduction of Operating System
What is an Operating System?
 A program that acts as an intermediary between a user of a computer and
the computer hardware.
 An operating System is a collection of system programs that together
control the operations of a computer system.
 An operating system is a program that controls the execution of application
programs and acts as an interface between the user of a computer and the
computer hardware.
 Some examples of operating systems are UNIX, Mach, MS-DOS, MS-
Windows, Windows/NT, Chicago, OS/2, MacOS, VMS, MVS, and VM.

2/15/2024 SWETA PANDEY OS Unit Number:1 16


Introduction of Operating System

2/15/2024 SWETA PANDEY OS Unit Number:1 17


Introduction of Operating System

 Operating System lies in the category of system software. It basically manages all the resources of the computer.
An operating system acts as an interface between the software and different parts of the computer or the
computer hardware. The operating system is designed in such a way that it can manage the overall resources
and operations of the computer.

 Operating System is a fully integrated set of specialized programs that handle all the operations of the computer.
It controls and monitors the execution of all other programs that reside in the computer, which also includes
application programs and other system software of the computer. Examples of Operating Systems are Windows,
Linux, Mac OS, etc.

 An Operating System (OS) is a collection of software that manages computer hardware resources and provides
common services for computer programs. The operating system is the most important type of system software
in a computer system.

2/15/2024 SWETA PANDEY OS Unit Number:1 18


Introduction of Operating System

2/15/2024 SWETA PANDEY OS Unit Number:1 19


Introduction of Operating System

2/15/2024 SWETA PANDEY OS Unit Number:1 20


Introduction of Operating System
Computer Software:
 Software is basically a generic term used to describe computer programs.
 Software are the sets of instructions and programs that enable the computer hardware to perform
their functions.
 Computer software, represents the program(s) which perform different tasks on a computer system.
Where, a computer program is a set of computer instructions that tell the computer hardware what
and how a task to be performed. The set of different computer programs is referred to as the
computer software.
Computer software classified in as:
• System Software
• Application Software
• Utility Software / Program

2/15/2024 SWETA PANDEY OS Unit Number:1 21


Introduction of Operating System
System Software:
System Software is the type of software which is the interface between application software and system.
 Those computer software that control and monitor the computer hardware and provide essential functionality
to the computer are called system software. Therefore, system software are essential parts of a computer, which
means a computer cannot perform its functions without system software.
 Examples of system software include: operating systems, device drivers, compilers, assemblers, debuggers,
drivers.

 Application Software:
 Application Software is the type of software which runs as per user request. It runs on the platform which is
provide by system software.
 A computer software which is developed to perform a specific function is known as an application software.
Application software are also called end-user software because they are designed to use by users of the
computer.
 Example: word processing, playing multimedia files, database applications, spreadsheets, accounting, graphic
designing, etc.
 The most common examples of application software are: MS-Word, Excel, PowerPoint, browsers, video editors,
etc.
2/15/2024 SWETA PANDEY OS Unit Number:1 22
Introduction of Operating System

Hardware:
 Hardware is a set of physical parts of computers which actually executes the
instruction.
 A hardware cannot do any task with a software instructing it.
 Hardware categories: Input Devices, Output Devices, Storage Devices, Internal
components of CPU and motherboard.
 Hardware understands only machine language (or binary language).

2/15/2024 SWETA PANDEY OS Unit Number:1 23


Objectives of Operating System

• Convenient to use: One of the objectives is to make the computer system more
convenient to use in an efficient manner.
• User Friendly: To make the computer system more interactive with a more
convenient interface for the users.
• Easy Access: To provide easy access to users for using resources by acting as an
intermediary between the hardware and its users.
• Management of Resources: For managing the resources of a computer in a better and
faster way.
• Controls and Monitoring: By keeping track of who is using which resource, granting
resource requests, and mediating conflicting requests from different programs and
users.
• Fair Sharing of Resources: Providing efficient and fair sharing of resources between
the users and programs.

2/15/2024 SWETA PANDEY OS Unit Number:1 24


Functions of Operating System

2/15/2024 SWETA PANDEY OS Unit Number:1 25


Functions of Operating System
• Resource Management: The operating system manages and allocates memory, CPU time, and other
hardware resources among the various programs and processes running on the computer.
• Process Management: The operating system is responsible for starting, stopping, and managing processes
and programs. It also controls the scheduling of processes and allocates resources to them.
• Memory Management: The operating system manages the computer’s primary memory and provides
mechanisms for optimizing memory usage.
• Security: The operating system provides a secure environment for the user, applications, and data by
implementing security policies and mechanisms such as access controls and encryption.
• Job Accounting: It keeps track of time and resources used by various jobs or users.
• File Management: The operating system is responsible for organizing and managing the file system,
including the creation, deletion, and manipulation of files and directories.
• Device Management: The operating system manages input/output devices such as printers, keyboards,
mice, and displays. It provides the necessary drivers and interfaces to enable communication between the
devices and the computer.
• Backup and Recovery: The operating system provides mechanisms for backing up data and recovering it
in case of system failures, errors, or disasters.

2/15/2024 SWETA PANDEY OS Unit Number:1 26


2/15/2024 SWETA PANDEY OS Unit Number:1 27
Characteristics of Operating System

 Memory Management − Keeps track of the primary memory, i.e. what part of it is in use by whom, what part is not in
use, etc. and allocates the memory when a process or program requests it.

 Processor Management − Allocates the processor (CPU) to a process and deallocates the processor when it is no longer
required.

 Device Management − Keeps track of all the devices. This is also called I/O controller that decides which process gets the
device, when, and for how much time.

 File Management − Allocates and de-allocates the resources and decides who gets the resources.

 Security − Prevents unauthorized access to programs and data by means of passwords and other similar techniques.

 Job Accounting − Keeps track of time and resources used by various jobs and/or users.

2/15/2024 SWETA PANDEY OS Unit Number:1 28


Characteristics of Operating System

Memory Management:
• It is the management of the main or primary memory. Whatever program is executed, it has to be
present in the main memory. Main memory is a quick storage area that may be accessed directly by
the CPU. When the program execution is completed, the memory region is released and can be used
by other programs. Therefore, there can be more than one program present at a time. Hence, it is
required to manage the memory.
The operating system:
• Allocates and de allocates the memory.
• Keeps a record of which part of primary memory is used by whom and how much.
• Distributes the memory while multiprocessing.
• In multiprogramming, the operating system selects which processes acquire memory when and how
much memory they get.

2/15/2024 SWETA PANDEY OS Unit Number:1 29


Characteristics of Operating System

Processor Management:
• Every software that runs on a computer, whether in the background or in the frontend, is a process.
Processor management is an execution unit in which a program operates. The operating system
determines the status of the processor and processes, selects a job and its processor, allocates the
processor to the process, and de-allocates the processor after the process is completed.
• When more than one process runs on the system, the OS decides how and when a process will use the
CPU. Hence, the name is also CPU Scheduling.
The OS:
• Allocates and de allocates processor to the processes.
• Keeps record of CPU status.
Certain algorithms used for CPU scheduling are as follows:
• First Come First Serve (FCFS)
• Shortest Job First (SJF)
• Round-Robin Scheduling
• Priority-based scheduling etc.

2/15/2024 SWETA PANDEY OS Unit Number:1 30


Characteristics of Operating System
Device Management:
• An operating system regulates device connection using drivers. The processes may require devices for their
use. This management is done by the OS.
The OS:
• Allocates and de allocates devices to different processes.
• Keeps records of the devices.
• Decides which process can use which device for how much time.
File Management:
• The operating system manages resource allocation and de-allocation. It specifies which process receives the
file and for how long. It also keeps track of information, location, uses, status, and so on. These groupings
of resources are referred to as file systems. The files on a system are stored in different directories.
The OS:
• Keeps records of the status and locations of files.
• Allocates and de allocates resources.
• Decides who gets the resources.

2/15/2024 SWETA PANDEY OS Unit Number:1 31


Characteristics of Operating System
DISK/storage Management:
• Storage management is a procedure that allows users to maximize the utilization of storage devices
while also protecting data integrity on whatever media on which it lives. Network virtualization,
replication, security, compression, de duplication, traffic analysis, process automation, storage
provisioning, and memory management are some of the features that may be included.
• The operating system is in charge of storing and accessing files. The creation of files, the creation of
directories, the reading and writing of data from files and directories, as well as the copying of the
contents of files and directories from one location to another are all included in storage management.
The OS uses storage management for:
• Improving the performance of the data storage resources.
• It optimizes the use of various storage devices.
• Assists businesses in storing more data on existing hardware, speeding up the data retrieval process,
preventing data loss, meeting data retention regulations, and lowering IT costs.

2/15/2024 SWETA PANDEY OS Unit Number:1 32


Computer System Structure
• Computer structure is the way that each component is
arranged so that communication is possible.

• The structure of a computer is simple, and that can be


represented in below diagram −

2/15/2024 SWETA PANDEY OS Unit Number:1 33


Computer System Structure

2/15/2024 SWETA PANDEY OS Unit Number:1 34


Computer System Structure

Input Device
• An input device is a computer hardware which handles input receiving from outside the system. The main
function of the input device is to enter data or give commands by the user into the system.

• For example, the input devices are keyboards, mouse, joysticks, scanners, touchpad and many more.

Output devices
• Output devices are computer hardware devices which handle output activities. The function of the output
device is to display the results of data processing, as soft copy, hard copy, voice, or video.

• For example, the output devices are monitors, printers, speakers, projectors and so on.

2/15/2024 SWETA PANDEY OS Unit Number:1 35


Computer System Structure

I/O Ports
I / O Ports are called connectors which are under the
control of the processor helpful in handling input and
output activities.
This port is used to connect any device that comes from
outside the computer, like a printer, scanner, mouse, or
USB. In a computer system this port is present on the
back of the CPU while on the laptop the ports are located
on the right and left side.

2/15/2024 SWETA PANDEY OS Unit Number:1 36


Computer System Structure

CPU
• The Central Processing unit is computer hardware called the brain of the computer system. Because, the
performance of a computer is determined by the technology and quality of the CPU used.

Generally, there are three types of components in the CPU, which are given below −

 Control unit

 Register

 ALU (Arithmetic Logic Unit)

2/15/2024 SWETA PANDEY OS Unit Number:1 37


Computer System Structure

The control unit controls and regulates the course of the


program.
The register is used to serve as a temporary storage area
for data that is being processed to continue to the next
processing.
ALU performs all arithmetic and logic operations based on
the instructions given.

2/15/2024 SWETA PANDEY OS Unit Number:1 38


Computer System Structure
Memory
 It is a device that functions as a storage medium in a computer system.
 There are two types of memory which are characterized as follows −
 Volatile called as temporary storage where data is lost when the computer is turned off, and
 Non-volatile storage is called permanent storage where data is stored even if the computer is
not turned on.
 Based on the location, the memory is divided into two parts, namely internal and external
memory. This internal memory is the main memory in a computer system, such as RAM
(Random Access Memory) and ROM (Read Only Memory).
 External memory is secondary memory like hard disk, USB drive, etc.

2/15/2024 SWETA PANDEY OS Unit Number:1 39


Computer System Structure

Given below in the figure are the access times and capacities of the memory:

2/15/2024 SWETA PANDEY OS Unit Number:1 40


Computer System Structure

Parts of Computer
The computer structure in general, divided into five main parts, which are as follows −

 Input devices

 Output devices

 I / O Ports

 CPU and

 Memory

2/15/2024 SWETA PANDEY OS Unit Number:1 41


Computer System Structure

• Computer-System Operation
• I/O Structure
• Storage Structure
• Storage Hierarchy
• Hardware Protection
• General System Architecture

2/15/2024 SWETA PANDEY OS Unit Number:1 42


Computer System Operation

• A modern computer system consists of a CPU, memory, system bus and a number of
device controllers.
• I/O devices and the CPU can execute concurrently.
• Each device controller is in charge of a particular device type.
• A device controller for each device contains local buffer storage and special purpose
registers.
• A bootstrap program is required to initialize the computer system.
• CPU moves data from /to main memory and to/from local buffers.
• I/O is from the device to local buffer of controller.
• Device controller informs CPU that it has finished its operation by causing an
interrupt.

2/15/2024 SWETA PANDEY OS Unit Number:1 43


Storage Structure

• Registers
• Cache Memory
• Main Memory
• Electronic Disk
• Magnetic Disk
• Optical Disk
• Hard Disk
• Magnetic Tape

2/15/2024 SWETA PANDEY OS Unit Number:1 44


Storage Hierarchy

 Storage Systems can be organized in a hierarchy according to:


a) Speed
b) Cost
c) Capacity
d) Volatility
 Registers, Cache and Memory are constructed using semiconductor memory and are volatile.
 Electronic disks can be volatile or nonvolatile.
 All secondary storage devices(magnetic disk, optical disk, floppy disk , magnetic tapes, etc.) are non-
volatile.

2/15/2024 SWETA PANDEY OS Unit Number:1 45


Storage Device Hierarchy

2/15/2024 SWETA PANDEY OS Unit Number:1 46


Hardware Protection

• I/O Protection
• Memory Protection
• CPU Protection
I/O Protection :
a) All I/O instructions are defined as privileged instructions so users cannot issue I/O
instructions from user mode.
b) To do I/O , a user program executes a system call to request that the OS perform
I/O on its behalf and returns the control to the users after completion of I/O
operation.
Memory Protection:
Two registers are used to determine the range of legal addresses a program may access:
1. Base register: holds the smallest legal physical memory address.
2. Limit register: contains the size of the range

2/15/2024 SWETA PANDEY OS Unit Number:1 47


Hardware Protection

• CPU Protection :
 A user program may:
a) be stuck in an infinite loop
b) fail to call system services
c) fail to return control to the OS.
 Timer: Interrupts computer after specified period to ensure operating system maintains control.
 Timer is also commonly used to implement time sharing mechanism.
 Timer can be used to compute the current time.

2/15/2024 SWETA PANDEY OS Unit Number:1 48


Types of Operating Systems(CO1)
Bare Machine Approach
 Machine with no OS.
 Computer used to be programmed directly in machine language,
without any system software approach.
Program could be entered into RAM through front-panel switches.
Results of execution could be displayed on a set of LEDs mounted
on front cover itself.

2/15/2024 SWETA PANDEY OS Unit Number:1 49


Types of Operating Systems(CO1)
Serial Processing
•The programs were executed strictly in a serial manner, wherein
program source code written in assembly or high level language.

2/15/2024 SWETA PANDEY OS Unit Number:1 50


Types of Operating Systems(CO1)
Batch Processing
Batch processing is a technique in which an Operating System collects the
programs and data together in a batch before processing starts. An operating
system does the following activities related to batch processing −
•The OS defines a job which has predefined sequence of commands, programs and
data as a single unit.
•The OS keeps a number of jobs in memory and executes them without any
manual information.
•Jobs are processed in the order of submission, i.e., first come first served fashion.
•When a job completes its execution, its memory is released and the output for the
job gets copied into an output pool for later printing or processing.

2/15/2024 SWETA PANDEY OS Unit Number:1 51


Types of Operating Systems(CO1)
Batch Processing

2/15/2024 SWETA PANDEY OS Unit Number:1 52


Types of Operating Systems(CO1)
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/15/2024 SWETA PANDEY OS Unit Number:1 53


Types of Operating Systems(CO1)
Batch Processing
Advantages
•Batch processing takes much of the work of the operator to the computer.
•Increased performance as a new job get started as soon as the previous job is
finished, without any manual intervention.
Disadvantages
•Difficult to debug program.
•A job could enter an infinite loop.
•Due to lack of protection scheme, one batch job can affect pending jobs.

2/15/2024 SWETA PANDEY OS Unit Number:1 54


Types of Operating Systems(CO1)
Multi-programming:
Several jobs are kept in main memory at the same time, and the
CPU is multiplexed among them.

2/15/2024 SWETA PANDEY OS Unit Number:1 55


Features for Multiprogramming(CO1)
 An OS does the following activities related to multiprogramming.
The operating system keeps several jobs in memory at a time.
This set of jobs is a subset of the jobs kept in the main memory .
The operating system picks and begins to execute one of the jobs in the
memory.
Multiprogramming operating systems monitor the state of all active programs
and system resources using memory management programs to ensure that the
CPU is never idle, unless there are no jobs to process.
 Advantages
High and efficient CPU utilization.
User feels that many programs are allotted to CPU almost simultaneously.
 Disadvantages
CPU scheduling is required.
To accommodate many jobs in memory, memory management is required.

2/15/2024 SWETA PANDEY OS Unit Number:1 56


Types of Operating Systems(CO1)
Multitasking/Time sharing/ Fair share/ Multiprogramming with
round robin :
Multitasking is when multiple jobs are executed by the CPU simultaneously by
switching between them. Switches occur so frequently that the users may interact with
each program while it is running. An OS does the following activities related to
multitasking −
•The user gives instructions to the operating system or to a program directly, and
receives an immediate response.
•The OS handles multitasking in the way that it can handle multiple operations/executes
multiple programs at a time.
•Multitasking Operating Systems are also known as Time-sharing systems.
•These Operating Systems were developed to provide interactive use of a computer
system at a reasonable cost.
•A time-shared operating system uses the concept of CPU scheduling and
multiprogramming to provide each user with a small portion of a time-shared CPU.
•Each user has at least one separate program in memory.

2/15/2024 SWETA PANDEY OS Unit Number:1 57


2/15/2024 SWETA PANDEY OS Unit Number:1 58
2/15/2024 SWETA PANDEY OS Unit Number:1 59
Types of Operating Systems(CO1)

Multitasking
•A program that is loaded into memory and is executing is commonly
referred to as a process.
•When a process executes, it typically executes for only a very short
time before it either finishes or needs to perform I/O.
•Since interactive I/O typically runs at slower speeds, it may take a long
time to complete. During this time, a CPU can be utilized by another
process.
•The operating system allows the users to share the computer
simultaneously. Since each action or command in a time-shared system
tends to be short, only a little CPU time is needed for each user.
•As the system switches CPU rapidly from one user/program to the
next, each user is given the impression that he/she has his/her own
CPU, whereas actually one CPU is being shared among many users.

2/15/2024 SWETA PANDEY OS Unit Number:1 60


Types of Operating Systems(CO1)

Time-Sharing Systems

• The CPU is multiplexed among several jobs that are kept in memory
and on disk (the CPU is allocated to a job only if the job is in memory).
• A job is swapped in and out of memory to the disk.
• On-line communication between the user and the system is provided;
when the operating system finishes the execution of one command, it
seeks the next “control statement” not from a card reader, but rather
from the user’s keyboard.
• On-line system must be available for users to access data and code.

2/15/2024 SWETA PANDEY OS Unit Number:1 61


Types of Operating Systems(CO1)
Real-Time Systems
• Often used as a control device in a dedicated application such as controlling scientific
experiments, medical imaging systems, industrial control systems, and some display systems.
• Well-defined fixed-time constraints.
• Hard real-time system. - 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 system - 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.

2/15/2024 SWETA PANDEY OS Unit Number:1 62


Types of Operating Systems(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 63


Types of Operating Systems(CO1)
Real-Time Operating Systems
•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.

2/15/2024 SWETA PANDEY OS Unit Number:1 64


Types of Operating Systems(CO1)

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.
• This operating system consists of numerous computers, nodes, and sites joined together via
LAN/WAN lines. It enables the distribution of full systems on a couple of center processors, and it
supports many real-time products and different users. Distributed operating systems can share their
computing resources and I/O files while providing users with virtual machine abstraction.
Advantages of Distributed Operating System
• The distributed operating system provides sharing of resources.
• This type of system is fault-tolerant.

2/15/2024 SWETA PANDEY OS Unit Number:1 65


Types of Operating Systems(CO1)
Distributed Operating System:

2/15/2024 SWETA PANDEY OS Unit Number:1 66


Types of Operating Systems(CO1)
Example : Cloud computing is a prime example of a distributed operating system that provides
access to computing resources over the internet. Cloud computing services such as Amazon Web
Services, Microsoft Azure, and Google Cloud Platform are all examples of distributed operating
systems.
Types of Distributed Operating System:
Client-Server Systems
Peer-to-Peer Systems
Middlewares
Three-tier
N-tier

2/15/2024 SWETA PANDEY OS Unit Number:1 67


Types of Operating Systems(CO1)
Interactive Systems

Interactivity refers to the ability of users to interact with a computer system.


An Operating system does the following activities related to interactivity −
•Provides the user an interface to interact with the system.
•Manages input devices to take inputs from the user. For example, keyboard.
•Manages output devices to show outputs to the user. For example, Monitor.

2/15/2024 SWETA PANDEY OS Unit Number:1 68


Types of Operating Systems(CO1)

Multithreaded System
• A thread is a flow of execution through the process code, with its own program
counter that keeps track of which instruction to execute next, system registers which
hold its current working variables, and a stack which contains the execution history.
• A thread shares with its peer threads few information like code segment,
data segment and open files. When one thread alters a code segment,
memory item, all other threads see that.
• A thread is also called a lightweight process. Threads provide a way to
improve application performance through parallelism. Threads represent
a software approach to improving performance of operating system by
reducing the overhead, thread is equivalent to a classical process.

2/15/2024 SWETA PANDEY OS Unit Number:1 69


Types of Operating Systems(CO1)

Multithreaded System

•Each thread belongs to exactly one process and no thread can


exist outside a process. Each thread represents a separate
flow of control.
•Threads have been successfully used in implementing network
servers and web server.
• They also provide a suitable foundation for parallel execution of
applications on shared memory multiprocessors.

2/15/2024 SWETA PANDEY OS Unit Number:1 70


Types of Operating Systems(CO1)

Multithreaded System
• Most modern applications are multithreaded.
• Threads run within application.
• Multiple tasks within the application can be implemented by separate
threads
• Update display.
• Fetch data.
• Spell checking.
• Answer a network request.
• Process creation is heavy-weight while thread creation is light-weight.
• Can simplify code, increase efficiency.
• Kernels are generally multithreaded.

2/15/2024 SWETA PANDEY OS Unit Number:1 71


Types of Operating Systems(CO1)
MULTIPROCESSING OPERATING SYSTEM :

 A multiprocessing operating system is defined as a type of operating system that makes use of more
than one CPU to improve performance.
 Multiple processors work parallelly in multi-processing operating systems to perform the given task.
 All the available processors are connected to peripheral devices, computer buses, physical memory,
and clocks.
 The main aim of the multi-processing operating system is to increase the to increase the speed of
execution of the system.
 For example: UNIX, LINUX, and Solaris are the most widely used multi-processing operating system.

2/15/2024 SWETA PANDEY OS Unit Number:1 72


Types of Operating Systems(CO1)
Multiprocessing operating system :

2/15/2024 SWETA PANDEY OS Unit Number:1 73


Types of Operating Systems(CO1)

Diagram for Working of multi processing os:

2/15/2024 SWETA PANDEY OS Unit Number:1 74


Types of Operating Systems(CO1)

Working of Multi-Processing Operating System:


 Multi-processing operating system consists of multiple CPUs. Each CPU is connected to the main
memory.
 The task to be performed id divided among all the processors.
 For faster execution and improved performance, each processor is assigned a specific task.
 Once all the tasks of each processor are completed they are compiled together in order to
produce a single output.
 The allocation of resources for each processor is handled by the operating system. This process
results in better utilization of the available resources and improved performance.

2/15/2024 SWETA PANDEY OS Unit Number:1 75


Types of Operating Systems(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 76


Types of Operating Systems(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 77


Types of Operating Systems(CO1)
Symmetrical Multiprocessing Operating System:
• In a Symmetrical multiprocessing operating system, each processor executes the same copy of operating system
every time. Each process makes its own decisions and works according to all other process to make sure that
system works efficiently. With the help of CPU scheduling algorithms, the task is assigned to the CPU that has
least burden. Symmetrical multiprocessing operating system is also known as “Shared Everything System”
because all the processors share memory and input-output bus. Below image describes about symmetrical
multiprocessing operating system.
Advantages
• Failure of one processor does not affect the functioning of other processors.
• It divides all the workload equally to the available processors.
• Makes use of available resources efficiently.
Disadvantages
• Symmetrical multiprocessing OS are more complex.
• They are more costlier.
• Synchronization between multiple processors is difficult.

2/15/2024 SWETA PANDEY OS Unit Number:1 78


Types of Operating Systems(CO1)
Asymmetrical Multiprocessing Operating System:
• In Asymmetrical multiprocessing operating system one processor acts as a master whereas remaining all
processors act a slaves. Slave processors are assigned with ready to execute processes by the master processor.
A ready queue is being maintained by master processor to provides with processes for slaves. In multiprocessing
operating system a schedular is created by master process that assigns processes to be executed to slave
processors. Below diagram describes about the asymmetrical multiprocessing operating system.
Advantages
• Asymmetrical multiprocessing operating system are cost-effective.
• They are easy to design and manage.
• They are more scalable.
Disadvantages
• There can be uneven distribution of workload among the processors.
• The processors do not share same memory.
• Entire system goes down if one process fails.

2/15/2024 SWETA PANDEY OS Unit Number:1 79


Types of Operating Systems(CO1)

Execution of user computations in different operating systems


OS class OS overview Key execution concept
of computations
Batch Processing Job One job is executed at a time. Programs in a job
are executed sequentially.
Multiprogrammi Program Interleaved execution of programs to obtain
ng balanced utilization of resources.
Time Sharing Process Interleaved execution of processes to provide
good response to all processes.
Real Time Process Interleaved execution of processes in an
application program to meet its response
requirement.

2/15/2024 SWETA PANDEY OS Unit Number:1 80


System Calls(CO1)
System call: It is a mechanism used by programs to request services from the operating system
(OS). In simple way we can say , it is a way for a program to interact with the OS , such as accessing
hardware resources or performing privileged operations
 A system call is a way for programs to interact with the operating system.
 A computer program makes a system call when it makes a request to the operating system’s kernel.
 System call provides the services of the operating system to the user programs via Application Program
Interface(API).
 It provides an interface between a process and an operating system to allow user-level processes to
request services of the operating system.
 System calls are the only entry points into the kernel system. All programs needing resources must use
system calls.
 A user program can interact with the operating system using a system call. A number of services are
requested by the program, and the OS responds by launching a number of systems calls to fulfill the
request.
 A system call can be written in high-level languages like C or Pascal or in assembly language. If a high-
level language is used, the operating system may directly invoke system calls, which are predefined
functions.

2/15/2024 SWETA PANDEY OS Unit Number:1 81


System Calls(CO1)
System Calls
• Programming interface to the services provided by the OS .
• Typically written in a high-level language (C or C++)
• Mostly accessed by programs via a high-level Application Program
Interface (API) rather than
• Direct system call usenThree most common APIs are Win32 API for
Windows, POSIX API for POSIX_x0002_based systems (including virtually
all versions of UNIX, Linux, and Mac OS X), and Java API for the Java
virtual machine (JVM)

2/15/2024 SWETA PANDEY OS Unit Number:1 82


System Calls(CO1)

Sytem call provide the means for a user program to ask


the OS to perform tasks reserved for the OS on the user
program’s behalf.
System call provide an interface to the services made
available by an OS. These calls are generally available as
routines written in C or C++.

2/15/2024 SWETA PANDEY OS Unit Number:1 83


System Calls(CO1)

USER PROGRAM

SYSTEM CALL

KERNAL (OS)

HARDWARE

2/15/2024 SWETA PANDEY OS Unit Number:1 84


System Calls(CO1)
In short, here's how a system call works:

 First, the user application program sets up the arguments for the system call.
 After the arguments are all set up, the program executes the "system call" instruction.
 This instruction causes an exception: an event that causes the processor to jump to a new
address and start executing the code there.

 The instructions at the new address save your user program's state, figure out what system call
you want, call the function in the kernel that implements that system call, restores your user
program state, and returns control back to the user program.

2/15/2024 SWETA PANDEY OS Unit Number:1 85


System Calls(CO1)

Example of system call:


Example: A C program invoking printf() library call, which calls write() system call
 In this example suppose user has created a c program of writing
GREETING on the console or monitor.
 Here, printf() will help in displaing or writing GREETING with the help of
c compiler. So, Compiler will send a request for displaying output
that request will be accepted by system call and system call give that request to
OS.
 Now OS will help in displaying the output. write() system call
will be used and hello will be displayed on console.

2/15/2024 SWETA PANDEY OS Unit Number:1 86


System Calls(CO1)
The following different types of system calls provided by an operating system:
Process control
• end, abort
• load, execute
• create process, terminate process
• get process attributes, set process attributes
• wait for time
• wait event, signal event
• allocate and free memory
File management
• create file, delete file
• open, close
• read, write

2/15/2024 SWETA PANDEY OS Unit Number:1 87


System Calls(CO1)
Device management
• • request device, release device
• • read, write, reposition
• • get device attributes, set device attributes
• • logically attach or detach devices
Information maintenance
• • get time or date, set time or date
• • get system data, set system data
• • get process, file, or device attributes
• • set process, file, or device attributes
Communications
• • create, delete communication connection
• • send, receive messages
• • transfer status information
• • attach or detach remote devices

2/15/2024 SWETA PANDEY OS Unit Number:1 88


System Calls(CO1)
We need 2 saperate modes of opration : user mode and kernal mode. A bit called bit, is
added to the hardware of computer to indicate current mode K(0), User(1).
When computer is executing on behalf of user , the system is in user mode, However if auser
application request a service from OS , the system must repositioning from user to kernal mode to
fulfill the request.

user mode
mode bit=1

kernel mode
mode bit=0

2/15/2024 SWETA PANDEY OS Unit Number:1 89


System Program/System Software
 It offers an environment for a program to create and run.
 It fulfils the high-level request or requirement of the user program.
 It is commonly written in high-level programming languages only.It defines the user
interface (UI) of the OS.
 It transforms the user request into a set of system calls needed to fulfil the
requirement.

2/15/2024 SWETA PANDEY OS Unit Number:1 90


System Program/System Software

2/15/2024 SWETA PANDEY OS Unit Number:1 91


System Program/System Software
Status information
• Some ask the system for info - date, time, amount of available memory, disk space, number of users
• Others provide detailed performance, logging, and debugging information
• Typically, these programs format and print the output to the terminal or other output devices
• Some systems implement a registry - used to store and retrieve configuration information
File modification
• Text editors to create and modify files
• Special commands to search contents of files or perform transformations of the text
• Programming-language support - Compilers, assemblers, debuggers and interpreters sometimes provided
Program loading and execution- Absolute loaders, relocatable loaders, linkage editors, and overlay_x0002_loaders,
debugging systems for higher-level and machine language

2/15/2024 SWETA PANDEY OS Unit Number:1 92


System Boot(CO1)
The simple question "what is booting?" can be explained as the process by which a
computer starts up, initializing its hardware components and launching its operating
system (OS) from the computer's storage into its working memory.

• Whenever we press the power button of our computer system, all the devices get the
power and they are initialized.
• Our main memory which is responsible for holding the instructions will be initially
empty as RAM is volatile memory.
• So, there will be a small set of instructions present in the non-volatile memory called
ROM.
• These instructions will be passed to the CPU and the execution of instructions takes
place which will check all the hardware connected with the system.
• If there are any problems with the hardware, we will get the alert by beep sounds or
even on-screen messages.
• After the testing of the hardware is completed, the booting process continues and
loads the operating system.
2/15/2024 SWETA PANDEY OS Unit Number:1 93
System Boot(CO1)

Cold Booting/ Hard Booting: Cold booting is the process when our computer system moves from the shutdown state
to the start by pressing the power button. The system reads the BIOS from ROM and will eventually load the
Operating System.

Warm Booting/ Soft Booting: Warm booting is the process in which the computer gets restarted due to reasons like
setting the configuration for newly installed software or hardware. Warm booting is called as rebooting.
When our system gets hung and we restart the device, we are doing the Warm booting.

2/15/2024 SWETA PANDEY OS Unit Number:1 94


System Boot(CO1)
Steps In the Booting Process
• When the computer is powered on, all the hardware components receive the power and they get
initialized. After that, the computer system goes through 6 steps booting process as follows:

2/15/2024 SWETA PANDEY OS Unit Number:1 95


Interrupt Handling(CO1)

 Interrupts are generally called signals which are generated by the software or
hardware when a particular event or process requires immediate attention. So,
the signal informs the processor about a high priority and urgent information
demand causing an interruption in the current working process.
 Whenever an interruption occurs the processor finishes the current instruction
execution and starts the execution of the interrupt known as interrupt
handling. Moreover, for every interrupt handling to occur there is an Interrupt
service routine (ISR) or interrupt handler.
 The operating system preserves the state of the CPU by storing registers and
the program counter.

2/15/2024 SWETA PANDEY OS Unit Number:1 96


Interrupt Handling(CO1)

How interrupt handler work :


 The CPU saves the state of the ongoing process and shifts its attention to the interrupt generated. CPU gives
access to the interrupt handler to process the interrupt. This entire process is called interrupt handling.

 Interrupt Handler is a process that runs when an interrupt is generated by hardware or software. The interrupt
handler is also known as the Interrupt Service Routine (ISR). ISR handles the request and sends it to the CPU.
When the ISR is complete, the process gets resumed.

 Before working on the interrupt, the state of the current program which was in execution is saved. After saving
the state of the current process, the control is then given to a program to handle the interrupt. We have several
types of interrupt handlers. There is usually an interrupt handler associated with an interrupt.

2/15/2024 SWETA PANDEY OS Unit Number:1 97


Interrupt Handling(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 98


Interrupt Handling(CO1)

How To Handle Interrupt:


• An interrupt first goes to hardware known as Interrupt Controller. This controller will generate
an interrupt to the CPU. After the completion of one instruction cycle, the CPU checks whether
an interrupt is pending or not. If any interrupt is not there, then the CPU will continue with the
next instruction. But if there is some un-serviced interrupt, then the CPU will pay attention to
that interrupt.

• One thing to note here is that the state of the current program which was in execution is saved
along with its corresponding register states. After saving the state of the current process, the
control is then given to a program to handle the interrupt, and every program is known as
Interrupt Handler.

2/15/2024 SWETA PANDEY OS Unit Number:1 99


Daily Quiz
While CPU is executing a program, an interrupt exists then it
a) follows the next instruction in the program
b) jumps to instruction in other registers
c) breaks the normal sequence of execution of instructions
d) stops executing the program
Ans c
An interrupt breaks the execution of instructions and diverts its execution to
a) Interrupt service routine
b) Counter word register
c) Execution unit
d) control unit
Ans a
While executing the main program, if two or more interrupts occur, then the
sequence of appearance of interrupts is called
a) multi-interrupt
b) nested interrupt
c) interrupt within interrupt
d) nested interrupt and interrupt within interrupt
2/15/2024 SWETA PANDEY OS Unit Number:1 100
Ans d
Operating System Structure (CO1)

MS-DOS: Simple Structure


A disk operating system (DOS) is an operating system for x86 based personal computers mostly developed by
Microsoft.

 Do not have well defined structure.


 These are small, simple and linited system .
 Example - MS DOS has four layers- ROM BIOS Device drivers, MS DOS Device drivers, application programs
and system programs.

2/15/2024 SWETA PANDEY OS Unit Number:1 101


Operating System Structure (CO1)
Advantages:
• Each level can be defined independently and when necessary, can interact with one
another.
• It will be simpler to design, mange and updates. Because of this, simple structure
can be used o build constrained system that are less complex.
Disadvantage:
• When a user program fails, the OS as whole crashes.
• Layer are interconneted and in communication with one another, there is no
abstraction or data hiding.
• The OS operations are accessible to layers, which can result in data tempering and
system failure .

2/15/2024 SWETA PANDEY OS Unit Number:1 102


Monolithic kernal Structure (CO1)

What is a kernel?
It is the central component of an OS that handles system resources. It also acts as a bridge between the
computer's application and hardware. It is one of the initial programs that is loaded when the computer boots
up. When an OS is loaded, the kernel is the first component that loads into memory and rests there until the OS
is shut down. It is in charge of various activities, including task management, disk management, and memory
management.
A monolithic kernel is a large single piece of code, composed of several logically different program pieces.
It is one single large program where all the functional components of the operating system have access to all
the data and routines. (All those components reside in the kernel space.) Such a program, with the passage of
time, grows more and more complex, and becomes difficult to maintain.
To avoid these problems, modern monolithic kernels are structured in strictly functional units. One unit
cannot directly access data and routines belonging to other units. The units follow strict communication
protocols to avail services from one another.
This is though purely a programming paradigm, and whatever be the internal structure, every part of the
operating system runs in the kernel mode on behalf of the running process.

2/15/2024 SWETA PANDEY OS Unit Number:1 103


Monolithic kernel(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 104


Monolithic kernel(CO1)

Advantage:
• The execution of the monolithic kernel is quite fast as the services such as memory management, file
management, process scheduling, etc., are implemented under the same address space.
• A process runs completely in single address space in the monolithic kernel.

Disadvantage:
• If any service fails in the monolithic kernel, it leads to the failure of the entire system.
• The entire operating system needs to be modified by the user to add any new service.

2/15/2024 SWETA PANDEY OS Unit Number:1 105


Micro kernel(CO1)

The microkernel is one of the kernel's classifications. Being a kernel, it handles all system
resources. On the other hand, the user and kernel services in a microkernel are implemented
in distinct address spaces.
User services are kept in user address space, while kernel services are kept in kernel address
space. It aids to reduce the kernel and OS's size.
The minimum functionalities needed in the microkernel are as follows:

In the microkernel, processor scheduling algorithms are also required. Process and thread
schedulers are included.
Address spaces and other memory management mechanisms should be incorporated in the
microkernel.
Memory protection features are also included.
Inter-process communication (IPC) is used to manage servers that execute their own address
spaces.

2/15/2024 SWETA PANDEY OS Unit Number:1 106


Micro kernel(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 107


Micro kernel(CO1)

Advantage :
• Microkernels are secure
• Microkernels are modular, and the various modules may be swapped, reloaded, and
• modified without affecting the kernel.
• Microkernel architecture is compact and isolated, so it may perform better.
• The system expansion is more accessible, so it may be introduced to the system application without disrupting
the kernel.
• When compared to monolithic systems, microkernels have fewer system crashes. Furthermore, due to the
modular structure of microkernels, any crashes that do occur are simply handled.
Drawback
• In a microkernel system, providing services are more costly than in a traditional monolithic system.e microkernel
interface helps in enforcing a more modular system structure.

2/15/2024 SWETA PANDEY OS Unit Number:1 108


Hybrid-Kernel Structure
Hybrid-Kernel Structure
• Hybrid-kernel structure is nothing but just a combination of both monolithic-kernel structure and micro-kernel
structure. Basically, it combines properties of both monolithic and micro-kernel and make a more advance and
helpful approach. It implement speed and design of monolithic and modularity and stability of micro-kernel
structure.

Advantages of Hybrid-Kernel Structure


• It offers good performance as it implements the advantages of both structure in it.
• It supports a wide range of hardware and applications.
• It provides better isolation and security by implementing micro-kernel approach.
• It enhances overall system reliability by separating critical functions into micro-kernel for debugging and
maintenance.
Disadvantages of Hybrid-Kernel Structure
• It increases overall complexity of system by implementing both structure (monolithic and micro) and making the
system difficult to understand.

2/15/2024 SWETA PANDEY OS Unit Number:1 109


MicroKernal & Monolithic Kernel
Sr.N
Parameter MicroKernal Monolithic Kernel
o.
In microkernel, user services and kernel services are kept in In monolithic kernel, both user services and kernel services are
1 Address Space
separate address space. kept in the same address space.

2 Design and Implementation OS is complex to design. OS is easy to design and implement.

3 Size Microkernel are smaller in size. Monolithic kernel is larger than microkernel.

4 Functionality Easier to add new functionalities. Difficult to add new functionalities.

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

8 Extend It is easy to extend Microkernel. It is not easy to extend monolithic kernel.

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

10 Debugging Debugging is simple. Debugging is difficult.

11 Maintain It is simple to maintain. Extra time and resources are needed for maintenance.

Message passing and Context Message forwarding and context switching are required by the Message passing and context switching are not required while the
12
switching microkernel. kernel is working.
The kernel only offers IPC and low-level device management
13 Services The Kernel contains all of the operating system’s services.
services.
14 Example Example :Mac OS X. Example :Microsoft Windows 95.

2/15/2024 SWETA PANDEY OS Unit Number:1 110


System Components(CO1)

 Process Management
 Main Memory Management
 Secondary-Storage Management
 I/O System Management
 File Management
 Protection System
 Networking

2/15/2024 SWETA PANDEY OS Unit Number:1 111


System Components(CO1)

2/15/2024 SWETA PANDEY OS Unit Number:1 112


Process Management(CO1)
 A process is a program in execution. A process needs certain resources, including CPU
time, memory, files, and I/O devices, to accomplish its task.
 The operating system is responsible for the following activities in connection with
process management.
• Process creation and deletion.
• process suspension and resumption.

2/15/2024 SWETA PANDEY OS Unit Number:1 113


Main-Memory Management(CO1)

 Memory is a large array of words or bytes, each with its own address. It is a repository
of quickly accessible data shared by the CPU and I/O devices.
 Main memory is a volatile storage device. It loses its contents in the case of system
failure.
 The operating system is responsible for the following activities in connections with
memory management:
• Keep track of which parts of memory are currently being used and by whom.
• Decide which processes to load when memory space becomes available.
• Allocate and deallocate memory space as needed.

2/15/2024 SWETA PANDEY OS Unit Number:1 114


Secondary-Storage(CO1)

 Since main memory (primary storage) is volatile and too small to accommodate all data and
programs permanently, the computer system must provide secondary storage to back up
main memory.
 Most modern computer systems use disks as the principle on-line storage medium, for both
programs and data.
 The operating system is responsible for the following activities in connection with disk
management:
• Free space management
• Storage allocation
• Disk scheduling

2/15/2024 SWETA PANDEY OS Unit Number:1 115


I/O System Management(CO1)

 The I/O system consists of:


• A buffer-caching system
• A general device-driver interface
• Drivers for specific hardware devices

2/15/2024 SWETA PANDEY OS Unit Number:1 116


File Management(CO1)

 A file is a collection of related information defined by its creator. Commonly, files


represent programs (both source and object forms) and data.

 The operating system is responsible for the following activities in connections


with file management:
• File creation and deletion.
• Directory creation and deletion.
• Support of primitives for manipulating files and directories.
• Mapping files onto secondary storage.
• File backup on stable (nonvolatile) storage media.

2/15/2024 SWETA PANDEY OS Unit Number:1 117


Networking (Distributed Systems(CO1)

 A distributed system is a collection processors that do not share memory or a


clock. Each processor has its own local memory.
 The processors in the system are connected through a communication network.
 A distributed system provides user access to various system resources.
 Access to a shared resource allows:
• Computation speed-up
• Increased data availability
• Enhanced reliability

2/15/2024 SWETA PANDEY OS Unit Number:1 118


Operating System Services(CO1)
 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.

2/15/2024 SWETA PANDEY OS Unit Number:1 119


Case Studies: Windows, Unix and Linux

User
Interface

2/15/2024 SWETA PANDEY OS Unit Number:1 120


Case Studies: Windows, Unix and Linux

UNIX Utility Programs

2/15/2024 SWETA PANDEY OS Unit Number:1 121


Case Studies: Windows, Unix and Linux

UNIX Kernel

2/15/2024 SWETA PANDEY OS Unit Number:1 122


Faculty Video Links, Youtube & NPTEL Video Links and Online
Courses Details

Youtube/other Video Links

• https://www.youtube.com/playlist?list=PLBlnK6fEyqRiVhbXDGLXDk_OQAeuVcp2O
• https://nptel.ac.in/courses/106108101

2/15/2024 SWETA PANDEY OS Unit Number:1 123


Faculty Video Links, Youtube & NPTEL Video Links and Online
Courses Details

Youtube/other Video Links

• https://www.youtube.com/playlist?list=PLBlnK6fEyqRiVhbXDGLXDk_OQAeuVcp2O
• https://nptel.ac.in/courses/106108101

2/15/2024 SWETA PANDEY OS Unit Number:1 124


Faculty Video Links, Youtube & NPTEL Video Links and Online
Courses Details

Youtube/other Video Links

• https://www.youtube.com/playlist?list=PLBlnK6fEyqRiVhbXDGLXDk_OQAeuVcp2O
• https://nptel.ac.in/courses/106108101

2/15/2024 SWETA PANDEY OS Unit Number:1 125


Daily Quiz
1.When a computer is first turned on or restarted, a special type of absolute loader
called ____ is executed
A. Compile and Go loader
B. Boot loader
C. Bootstrap loader
D. Relating loader
2.To access the services of operating system, the interface is provided by the
___________
A. System calls
B. API
C. Library
D. Assembly instructions

2/15/2024 SWETA PANDEY OS Unit Number:1 126


Old Question Papers

2/15/2024 SWETA PANDEY OS Unit Number:1 127


Old Question Papers
)

2/15/2024 SWETA PANDEY OS Unit Number:1 128


Glossary Questions

Choose the correct


1.The multi-user Operating System is based on the concept of ____
2. Operating system_________
3. ____ systems have more than one CPU in close communication with the others.
4. On systems where there are multiple operating system, the decision to load a particular
one is done by _____________
(Multiprocessor,Provides a layer and user friendly interface, boot loader,Time-sharing, )

2/15/2024 SWETA PANDEY OS Unit Number:1 129


Old Question Papers

2/15/2024 SWETA PANDEY OS Unit Number:1 130


Old Question Papers

2/15/2024 SWETA PANDEY OS Unit Number:1 131


Old Question Papers

2/15/2024 SWETA PANDEY OS Unit Number:1 132


Old Question Papers

2/15/2024 SWETA PANDEY OS Unit Number:1 133


Expected Questions for Exam

1.Distinguish between Monolithic and Micro Kernel structure .


2. Explain Briefly Layered operating system structure with neat sketch.
3. Define multiprocessing OS. Describe differences between symmetric and asymmetric
multiprocessing.
4. List the services provided by an Operating System.
5. List the Components of Operating System.
6. Define System calls and illustrate types of system call.
7. Distinguish between batch systems and time sharing systems.
8. Differentiate between Multi programming and Multi Tasking operating system .
9. Mention the objectives and functions of OS.
10. Discuss interrupt handling as well as system program.

2/15/2024 SWETA PANDEY OS Unit Number:1 134


Summary
Summary of UNIT 1:

In this module, we have studied the following:

 Overview and Concepts of Operating system


 What is Operating system
 Types of operating system
 Layered architecture of Operating system
 System components
 OS services
 System calls and types of system calls
 Monolithic Kernel
 Micro Kernel
 Hybrid Structure

2/15/2024 SWETA PANDEY OS Unit Number:1 135


References
Books :
1. Silberschatz, Galvin and Gagne, “Operating Systems Concepts”, Wiley
2. SibsankarHalder and Alex A Aravind, “Operating Systems”, Pearson Education
3. Harvey M Dietel, “ An Introduction to Operating System”, Pearson Education
4. D M Dhamdhere, “Operating Systems : A Concept basedApproach”, McGraw Hill.
5. Charles Crowley, “Operating Systems: A Design-Oriented Approach”, Tata McGraw
Hill Education”.
6. Stuart E. Madnick & John J. Donovan, “ Operating Systems”, Tata McGraw

2/15/2024 SWETA PANDEY OS Unit Number:1 136

You might also like