SlideShare a Scribd company logo
Chapter 1: Introduction
Operating System Concepts
What happens when a program runs?
Operating System Concepts
Well, a running program does one very simple thing: it executes instructions. Many
millions (and these days, even billions) of times every second, the processor fetches
an instruction from memory, decodes it (i.e., figures out which instruction this is),
and executes it (i.e., it does the thing that it is supposed to do, like add two numbers
together, access memory, check a condition, jump to a function, and so forth). After
it is done with this instruction, the processor moves on to the next instruction, and
so on, and so on, until the program finally completes.
While a program runs, a lot of other wild things are going on with the primary goal of
making the system easy to use.
There is a body of software, in fact, that is responsible for making it easy to run
programs, allowing programs to share memory, enabling programs to interact with
devices.
This body is operating system (OS)
What is an Operating System?
 A program that acts as an intermediary between a user of
a computer and the computer hardware.
 A program that virtualize resources
 Operating system goals:
 Make the computer system convenient to use.
 Efficient use of the computer system’s resources
 Prevention of interference with users’ activities.
Operating System Concepts
Virtualization: That is, the OS takes a physical resource (such as the processor,
or memory, or a disk) and transforms it into a more general, powerful, and easy-
to-use virtual form of itself. Thus, sometimes operating system refer to as a virtual
machine.
Right Combination while Designing OS
Efficient use is more important when a computer system
is dedicated to specific app Like Main Frame
User convenience is more important in personal
computers
While both are equally important when a computer
system is shared by several users
Hence, the designer aims for the right combination of
efficient use and user convenience for the operating
system’s environment.
Operating System Concepts
Prevention of interference is mandatory in all environments.
HOW TO VIRTUALIZE RESOURCES
Operating System Concepts
Why the OS does this is not the main question, as the answer is obvious:
it makes the system easier to use.
The objective of the subject is to find the answer of HOW ?
How does the operating system virtualize resources? This is the crux of
our Subject.
Thus, focus on the how: what mechanisms and policies are implemented by
the OS to attain virtualization? How does the OS do so efficiently? What
hardware support is needed?
Computer System Components
1. Hardware – provides basic computing resources (CPU,
memory, I/O devices).
2.Operating system – controls and coordinates the use of
the hardware among the various application programs
for the various users.
3.Applications programs – define the ways in which the
system resources are used to solve the computing
problems of the users (compilers, database systems,
video games, business programs).
4.Users (people, machines, other computers).
Operating System Concepts
Abstract View of System
Components
Operating System Concepts
User View:
Operating System Concepts
Different Abstract Views
The user's view of the computer varies according to the
interface being used.
Users sitting in front of a PC
Mostly for Ease of Use
Some attention to performance
None to Resource Utilisation
Terminal connected to a
Mainframe or Minicomputer
Some to Ease of Use,
Some attention to performance
Maximum to Resource Utilisation
Workstation connected to
other workstations and Server
Designed to compromise between
individual usability and resource utilization
Handheld computers
Designed mostly for individual usability,
but performance per unit of battery life is
important
Embedded computers
Designed primarily to run without user
intervention
System View
Operating System Concepts
A computer system has many resources that may be required to solve a problem:
CPU time, memory space, file-storage space, I/0 devices, and so on
From the computer's point of view, the operating system is the program most
intimately involved with the hardware. In this context, it view an operating system as
a Resource Allocator or more specific Resource Manager
The operating system acts as the manager of these resources.
Manages the Resources so that it can operate
the computer system efficiently and fairly.
A slightly different view of an operating system emphasizes the need to control the
various I/0 devices and user programs. An operating system is a Control Program. A
Control Program manages the execution of user programs to prevent errors and
improper use of the computer.
Operating System Definitions
 Resource allocator – manages and allocates
resources.
 Control program – controls the execution of
user programs and operations of devices .
 Kernel – The program that executes forever
(everything else is an application with respect
to the kernel) with shell.
Operating System Concepts
Components of Operating System
Operating System Concepts
Protection and Security
Process Management
Operating System Concepts
The operating system is responsible for the following activities in
connection with process management:
• Scheduling processes and threads on the CPUs
• Creating and deleting both user and system processes
• Suspending and resuming processes
• Providing mechanisms for process synchronization
• Providing mechanisms for process communication
Memory Management
Operating System Concepts
• Keeping track of which parts of memory are currently
being used and by whom
• Deciding which processes and data to move into and out
of memory
• Allocating and deallocating memory space as needed
File-System Management
Operating System Concepts
• Creating and deleting files
• Creating and deleting directories to organize files
• Supporting primitives for manipulating files and
directories
• Mapping files onto secondary storage
• Backing up files on stable (nonvolatile) storage media
Mass-Storage Management
(Secondary Storage)
Operating System Concepts
• Free-space management
• Storage allocation
• Disk scheduling
I/O Devices
Operating System Concepts
OS hides the peculiarities of specific hardware devices from the user
•Hide the details of H/W devices
• Manage main memory for the devices using
cache, buffer, and spooling
•Maintain and provide custom drivers for each
device.
Network Management
Operating System Concepts
Network management is the process of keeping your network healthy for an
efficient communication between different computers.
•Network administration
•Network maintenance
•Network operation
•Network provisioning
•Network security
Protection and Security
Operating System Concepts
Mechanisms ensure that files, memory segments, CPU, and other resources can
be operated on by only those processes that have gained proper authorization
from the operating system
For example, memory-addressing hardware ensures that a process can execute
only within its own address space.
Device-control registers are not accessible to users, so the integrity of the various
peripheral devices is protected
while security measures are focused on external threats to a system,
protection is concerned with those that are internal.
Authentication information is stolen
Attacks spread across a huge range and include viruses and worms
denial-of service attacks (which use all of a system's resources and so keep
legitimate users out of the system), identity theft, and theft of service
(unauthorized use of a system).
Operating System Services to User
and Programs
Operating System Concepts
Services
Operating System Concepts
User Interfaces - Means by which users can issue commands to the system.
Program Execution - The OS must be able to load a program into RAM, run the program,
and terminate the program, either normally or abnormally.
I/O Operations - The OS is responsible for transferring data to and from I/O devices,
including keyboards, terminals, printers, and storage devices. For efficiency and protection,
users usually cannot control I/0 devices directly. Therefore, the operating system must
provide a means to do I/0
File-System Manipulation - In addition to raw data storage, the OS is also responsible for
maintaining directory and subdirectory structures, mapping file names to specific blocks of
data storage, and providing tools for navigating and utilizing the file system.
Communications - Inter-process communications, IPC, either between processes running on
the same processor, or between processes running on separate processors or separate
machines. May be implemented as either shared memory or message passing.
Error Detection - Both hardware and software errors must be detected and handled
appropriately, with a minimum of harmful repercussions.
Errors may occur in the CPU and memory hardware: such as a memory error or a power
failure. I/0 devices: such as a parity error on tape, a connection failure on a network, or lack of
paper in the printer. User program :such as an arithmetic overflow, an attempt to access an
illegal memory location, or a too-great use of CPU time.
Debugging and diagnostic tools aid users and administrators in tracing down the cause of problems.
Another set of operating-system functions exists not for helping the
user but rather for ensuring the efficient operation of the system itself
Operating System Concepts
Resource allocation: When there are Multiple users or multiple jobs running at the
same time, resources must be allocated to each of them CPU Memory I/O Devices
etc..
Accounting: We want to keep track of which users use how much and what kinds of
computer resources. This record keeping may be used for accounting, Billing and
usage statistics which may be useful to researchers who wish to reconfigure the
system to improve computing services.
Protection and Security: Protection involves ensuring that all access to system
resources is controlled. Security of the system from outsiders is also important. Such
security starts with requiring each user to authenticate himself or herself to the
system, usually by means of a password, to gain access to system resources.
System Calls
Operating System Concepts
•System calls provide a means for user or application programs to call upon the services of the
operating system.
•Generally written in C or C++, although some are written in assembly for optimal
performance.
The sequence of system calls required to copy a file:
The use of APIs instead of direct system calls provides for greater program portability
between different systems. The API then makes the appropriate system calls through
the system call interface, using a table lookup to access specific numbered system calls
Operating System Concepts
Types Of System Calls
Operating System Concepts
Operating System Concepts
Types Of OS/Evolution Of OS
Operating System Concepts
Memory Layout
Operating System Concepts
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.
Simple Batch Operating System
● Single user system Programmer/User as
operator
● Paper tape or punched cards
● Reduce setup time by batching jobs
with similar requirements.
● Add a card reader, Hire an operator
● User is NOT the operator
● Automatic job sequencing
How to speed up
Operating System Concepts
●Use disk (random access device) as large storage for reading as many input files
as possible and storing output files until output devices are ready to accept
them.
●Allows overlap - I/O of one job with computation of another.
● Job pool that allows OS choose next job to run so as to increase CPU utilization.
Spooling
Multiprogrammed Batch Systems
Operating System Concepts
Several jobs are kept in main memory at the same time, and the CPU is
multiplexed among them.
OS Features Needed for Multiprogramming
 I/O routine supplied by the system.
 Memory management – the system must
allocate the secure memory to several jobs.
 CPU scheduling – the system must choose
among several jobs ready to run.
 Processor's time is shared among multiple
users simultaneously
Operating System Concepts
Multiprogramming operating systems were developed to provide efficient
resource utilization in a noninteractive environment.
Architectural Support for Multiprogramming
Operating System Concepts
Feature Description
DMA The CPU initiates an I/O operation when
an I/O instruction is executed. The DMA
implements the data transfer involved in
the I/O operation without involving the CPU
and raises an I/O interrupt when the data
transfer completes.
Memory protection A program can access only the part of
memory defined by contents of the base
register and size .
Kernel and user modes of CPU Certain instructions, called privileged
instructions, can be performed only when
the CPU is in the kernel mode. A program
interrupt is raised if a program tries to
execute a privileged instruction when the
CPU is in the user mode.
Time-Sharing Operating Systems–Interactive Computing
● Interactive (action/response) Highly responsive
 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 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” from the user’s
keyboard.
Operating System Concepts
Desktop Systems
 Personal computers – computer system
dedicated to a single user.
 I/O devices – keyboards, mice, display
screens, small printers.
 User convenience and responsiveness.
 Sole use of computer and do not need
advanced CPU utilization or protection
features.
 May run several different types of operating
systems (Windows, MacOS, UNIX, Linux)
Operating System Concepts
Parallel Computing Systems
 Multiprocessor systems with more than on CPU in
close communication.
 Advantages of parallel system:
 Increased throughput
 Economical
 Increased reliability
 graceful degradation
 fail-soft systems
Operating System Concepts
Symmetric Multiprocessing Architecture
Operating System Concepts
In these types of systems, each processor contains a similar copy of the
operating system and they all communicate with each other. All the processors
are in a peer to peer relationship i.e. no master - slave relationship exists
between them.
Asymmetric Multiprocessors Architecture
In asymmetric systems, each processor is given a predefined task. There is a
master processor that gives instruction to all the other processors. Asymmetric
multiprocessor system contains a master slave relationship.
Distributed Systems
 Distribute the computation among several
physical processors.
 Loosely coupled system – each processor has its
own local memory; processors communicate with
one another through various communications
lines, such as high-speed buses or telephone lines.
 Advantages of distributed systems.
 Resources Sharing
 Computation speed up – load sharing
 Reliability
 Communications
Operating System Concepts
Distributed Systems (cont)
 Requires networking infrastructure.
 Local area networks (LAN) or Wide area
networks (WAN)
 May be either client-server or peer-to-peer
systems.
Operating System Concepts
1. Client-Server
Operating System Concepts
Client
Read File
Request Server
Take
Action
Sends
Content
1.2 The provides a file-system interface where clients can create, update, read, and
delete files
1.1
Peer To Peer
Operating System Concepts
• Clients and servers are not distinguished from one another.
• All nodes within the system are considered peers, and each may act as either a
client or a server, depending on whether it is requesting or providing a service.
• Once a node has joined the network, it can begin providing services to-and
requesting services from -other nodes in the network:
1. When a node joins a network, it registers its service with a centralized
lookup service on the network. Any node desiring a specific service first
contacts this centralized lookup service to determine which node provides
the service. The remainder of the communication takes place between the
client and the service provider.
2. A peer acting as a client must first discover what node provides a
desired service by broadcasting a request for the service to all other
nodes in the network.
Clustered Systems
 Clustering allows two or more systems to share
storage.
 Provides high reliability.
 Asymmetric clustering: one server runs the application
while other servers standby.
 Symmetric clustering: all N hosts are running the
application.
Operating System Concepts
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.
 Real-Time systems may be either hard or soft
real-time.
Operating System Concepts
Real-Time Systems (Cont.)
 Hard real-time:
 Secondary storage limited or absent, data stored in
short term memory, or read-only memory (ROM)
 Conflicts with time-sharing systems, not supported
by general-purpose operating systems.
 Soft real-time
 Limited utility in industrial control of robotics
 Useful in applications (multimedia, virtual reality)
requiring advanced operating-system features.
Operating System Concepts
Handheld Systems
 Personal Digital Assistants (PDAs)
 Cellular telephones
 Issues:
 Limited memory
 Slow processors
 Small display screens.
Operating System Concepts

More Related Content

Similar to ch1.ppt

Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
Soumit Ghosh
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
Jaleto Sunkemo
 
Operating system
Operating systemOperating system
Operating system
Ibrahim MH
 
Operating system Concepts
Operating system Concepts Operating system Concepts
Operating system Concepts
RANVIJAY GAUR
 
Operating system notes pdf
Operating system notes pdfOperating system notes pdf
Operating system notes pdf
Jasleen Kaur (Chandigarh University)
 
Introduction of operating system
Introduction of operating systemIntroduction of operating system
Introduction of operating system
Jitendrakumar Upadhyay
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1-Operating Systems Overview .pptx
Unit 1-Operating Systems Overview .pptxUnit 1-Operating Systems Overview .pptx
Unit 1-Operating Systems Overview .pptx
ThamaraiselviAvinuty
 
operating system notes by madhavi.pdf
operating system notes by madhavi.pdfoperating system notes by madhavi.pdf
operating system notes by madhavi.pdf
MadhaviAvhankar1
 
Basic operating systems in computer and it's uses
Basic operating systems in computer and it's usesBasic operating systems in computer and it's uses
Basic operating systems in computer and it's uses
Surya Vishnuram
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)Sohaib Danish
 
Operating system
Operating systemOperating system
Operating system
marar hina
 
Introduction and Types of Operating System.pptx
Introduction and Types of Operating System.pptxIntroduction and Types of Operating System.pptx
Introduction and Types of Operating System.pptx
aparna14patil
 
Overview Of Operating System and its Basics
Overview Of Operating System and its BasicsOverview Of Operating System and its Basics
Overview Of Operating System and its Basics
Chandrakant Divate
 
Overview Of Operating Systems and its Basics
Overview Of Operating Systems and its BasicsOverview Of Operating Systems and its Basics
Overview Of Operating Systems and its Basics
Chandrakant Divate
 
Operating System Introduction
Operating System IntroductionOperating System Introduction
Operating System Introduction
Sravani Kommuri
 
Ch1 - OS.pdf
Ch1 - OS.pdfCh1 - OS.pdf
Ch1 - OS.pdf
OmarKamil1
 
lecture 1 (Introduction to Operating System.)
lecture 1 (Introduction to Operating System.)lecture 1 (Introduction to Operating System.)
lecture 1 (Introduction to Operating System.)
WajeehaBaig
 

Similar to ch1.ppt (20)

Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
 
Operating system
Operating systemOperating system
Operating system
 
Operating system Concepts
Operating system Concepts Operating system Concepts
Operating system Concepts
 
Operating system notes pdf
Operating system notes pdfOperating system notes pdf
Operating system notes pdf
 
Operating systems
Operating systemsOperating systems
Operating systems
 
Introduction of operating system
Introduction of operating systemIntroduction of operating system
Introduction of operating system
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
Unit 1-Operating Systems Overview .pptx
Unit 1-Operating Systems Overview .pptxUnit 1-Operating Systems Overview .pptx
Unit 1-Operating Systems Overview .pptx
 
Operating systems1[1]
Operating systems1[1]Operating systems1[1]
Operating systems1[1]
 
operating system notes by madhavi.pdf
operating system notes by madhavi.pdfoperating system notes by madhavi.pdf
operating system notes by madhavi.pdf
 
Basic operating systems in computer and it's uses
Basic operating systems in computer and it's usesBasic operating systems in computer and it's uses
Basic operating systems in computer and it's uses
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)
 
Operating system
Operating systemOperating system
Operating system
 
Introduction and Types of Operating System.pptx
Introduction and Types of Operating System.pptxIntroduction and Types of Operating System.pptx
Introduction and Types of Operating System.pptx
 
Overview Of Operating System and its Basics
Overview Of Operating System and its BasicsOverview Of Operating System and its Basics
Overview Of Operating System and its Basics
 
Overview Of Operating Systems and its Basics
Overview Of Operating Systems and its BasicsOverview Of Operating Systems and its Basics
Overview Of Operating Systems and its Basics
 
Operating System Introduction
Operating System IntroductionOperating System Introduction
Operating System Introduction
 
Ch1 - OS.pdf
Ch1 - OS.pdfCh1 - OS.pdf
Ch1 - OS.pdf
 
lecture 1 (Introduction to Operating System.)
lecture 1 (Introduction to Operating System.)lecture 1 (Introduction to Operating System.)
lecture 1 (Introduction to Operating System.)
 

Recently uploaded

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 

Recently uploaded (20)

一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 

ch1.ppt

  • 2. What happens when a program runs? Operating System Concepts Well, a running program does one very simple thing: it executes instructions. Many millions (and these days, even billions) of times every second, the processor fetches an instruction from memory, decodes it (i.e., figures out which instruction this is), and executes it (i.e., it does the thing that it is supposed to do, like add two numbers together, access memory, check a condition, jump to a function, and so forth). After it is done with this instruction, the processor moves on to the next instruction, and so on, and so on, until the program finally completes. While a program runs, a lot of other wild things are going on with the primary goal of making the system easy to use. There is a body of software, in fact, that is responsible for making it easy to run programs, allowing programs to share memory, enabling programs to interact with devices. This body is operating system (OS)
  • 3. What is an Operating System?  A program that acts as an intermediary between a user of a computer and the computer hardware.  A program that virtualize resources  Operating system goals:  Make the computer system convenient to use.  Efficient use of the computer system’s resources  Prevention of interference with users’ activities. Operating System Concepts Virtualization: That is, the OS takes a physical resource (such as the processor, or memory, or a disk) and transforms it into a more general, powerful, and easy- to-use virtual form of itself. Thus, sometimes operating system refer to as a virtual machine.
  • 4. Right Combination while Designing OS Efficient use is more important when a computer system is dedicated to specific app Like Main Frame User convenience is more important in personal computers While both are equally important when a computer system is shared by several users Hence, the designer aims for the right combination of efficient use and user convenience for the operating system’s environment. Operating System Concepts Prevention of interference is mandatory in all environments.
  • 5. HOW TO VIRTUALIZE RESOURCES Operating System Concepts Why the OS does this is not the main question, as the answer is obvious: it makes the system easier to use. The objective of the subject is to find the answer of HOW ? How does the operating system virtualize resources? This is the crux of our Subject. Thus, focus on the how: what mechanisms and policies are implemented by the OS to attain virtualization? How does the OS do so efficiently? What hardware support is needed?
  • 6. Computer System Components 1. Hardware – provides basic computing resources (CPU, memory, I/O devices). 2.Operating system – controls and coordinates the use of the hardware among the various application programs for the various users. 3.Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). 4.Users (people, machines, other computers). Operating System Concepts
  • 7. Abstract View of System Components Operating System Concepts
  • 8. User View: Operating System Concepts Different Abstract Views The user's view of the computer varies according to the interface being used. Users sitting in front of a PC Mostly for Ease of Use Some attention to performance None to Resource Utilisation Terminal connected to a Mainframe or Minicomputer Some to Ease of Use, Some attention to performance Maximum to Resource Utilisation Workstation connected to other workstations and Server Designed to compromise between individual usability and resource utilization Handheld computers Designed mostly for individual usability, but performance per unit of battery life is important Embedded computers Designed primarily to run without user intervention
  • 9. System View Operating System Concepts A computer system has many resources that may be required to solve a problem: CPU time, memory space, file-storage space, I/0 devices, and so on From the computer's point of view, the operating system is the program most intimately involved with the hardware. In this context, it view an operating system as a Resource Allocator or more specific Resource Manager The operating system acts as the manager of these resources. Manages the Resources so that it can operate the computer system efficiently and fairly. A slightly different view of an operating system emphasizes the need to control the various I/0 devices and user programs. An operating system is a Control Program. A Control Program manages the execution of user programs to prevent errors and improper use of the computer.
  • 10. Operating System Definitions  Resource allocator – manages and allocates resources.  Control program – controls the execution of user programs and operations of devices .  Kernel – The program that executes forever (everything else is an application with respect to the kernel) with shell. Operating System Concepts
  • 11. Components of Operating System Operating System Concepts Protection and Security
  • 12. Process Management Operating System Concepts The operating system is responsible for the following activities in connection with process management: • Scheduling processes and threads on the CPUs • Creating and deleting both user and system processes • Suspending and resuming processes • Providing mechanisms for process synchronization • Providing mechanisms for process communication
  • 13. Memory Management Operating System Concepts • Keeping track of which parts of memory are currently being used and by whom • Deciding which processes and data to move into and out of memory • Allocating and deallocating memory space as needed
  • 14. File-System Management Operating System Concepts • Creating and deleting files • Creating and deleting directories to organize files • Supporting primitives for manipulating files and directories • Mapping files onto secondary storage • Backing up files on stable (nonvolatile) storage media
  • 15. Mass-Storage Management (Secondary Storage) Operating System Concepts • Free-space management • Storage allocation • Disk scheduling
  • 16. I/O Devices Operating System Concepts OS hides the peculiarities of specific hardware devices from the user •Hide the details of H/W devices • Manage main memory for the devices using cache, buffer, and spooling •Maintain and provide custom drivers for each device.
  • 17. Network Management Operating System Concepts Network management is the process of keeping your network healthy for an efficient communication between different computers. •Network administration •Network maintenance •Network operation •Network provisioning •Network security
  • 18. Protection and Security Operating System Concepts Mechanisms ensure that files, memory segments, CPU, and other resources can be operated on by only those processes that have gained proper authorization from the operating system For example, memory-addressing hardware ensures that a process can execute only within its own address space. Device-control registers are not accessible to users, so the integrity of the various peripheral devices is protected while security measures are focused on external threats to a system, protection is concerned with those that are internal. Authentication information is stolen Attacks spread across a huge range and include viruses and worms denial-of service attacks (which use all of a system's resources and so keep legitimate users out of the system), identity theft, and theft of service (unauthorized use of a system).
  • 19. Operating System Services to User and Programs Operating System Concepts
  • 20. Services Operating System Concepts User Interfaces - Means by which users can issue commands to the system. Program Execution - The OS must be able to load a program into RAM, run the program, and terminate the program, either normally or abnormally. I/O Operations - The OS is responsible for transferring data to and from I/O devices, including keyboards, terminals, printers, and storage devices. For efficiency and protection, users usually cannot control I/0 devices directly. Therefore, the operating system must provide a means to do I/0 File-System Manipulation - In addition to raw data storage, the OS is also responsible for maintaining directory and subdirectory structures, mapping file names to specific blocks of data storage, and providing tools for navigating and utilizing the file system. Communications - Inter-process communications, IPC, either between processes running on the same processor, or between processes running on separate processors or separate machines. May be implemented as either shared memory or message passing. Error Detection - Both hardware and software errors must be detected and handled appropriately, with a minimum of harmful repercussions. Errors may occur in the CPU and memory hardware: such as a memory error or a power failure. I/0 devices: such as a parity error on tape, a connection failure on a network, or lack of paper in the printer. User program :such as an arithmetic overflow, an attempt to access an illegal memory location, or a too-great use of CPU time. Debugging and diagnostic tools aid users and administrators in tracing down the cause of problems.
  • 21. Another set of operating-system functions exists not for helping the user but rather for ensuring the efficient operation of the system itself Operating System Concepts Resource allocation: When there are Multiple users or multiple jobs running at the same time, resources must be allocated to each of them CPU Memory I/O Devices etc.. Accounting: We want to keep track of which users use how much and what kinds of computer resources. This record keeping may be used for accounting, Billing and usage statistics which may be useful to researchers who wish to reconfigure the system to improve computing services. Protection and Security: Protection involves ensuring that all access to system resources is controlled. Security of the system from outsiders is also important. Such security starts with requiring each user to authenticate himself or herself to the system, usually by means of a password, to gain access to system resources.
  • 22. System Calls Operating System Concepts •System calls provide a means for user or application programs to call upon the services of the operating system. •Generally written in C or C++, although some are written in assembly for optimal performance. The sequence of system calls required to copy a file:
  • 23. The use of APIs instead of direct system calls provides for greater program portability between different systems. The API then makes the appropriate system calls through the system call interface, using a table lookup to access specific numbered system calls Operating System Concepts
  • 24. Types Of System Calls Operating System Concepts
  • 26. Types Of OS/Evolution Of OS Operating System Concepts
  • 27. Memory Layout Operating System Concepts 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. Simple Batch Operating System ● Single user system Programmer/User as operator ● Paper tape or punched cards ● Reduce setup time by batching jobs with similar requirements. ● Add a card reader, Hire an operator ● User is NOT the operator ● Automatic job sequencing
  • 28. How to speed up Operating System Concepts ●Use disk (random access device) as large storage for reading as many input files as possible and storing output files until output devices are ready to accept them. ●Allows overlap - I/O of one job with computation of another. ● Job pool that allows OS choose next job to run so as to increase CPU utilization. Spooling
  • 29. Multiprogrammed Batch Systems Operating System Concepts Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.
  • 30. OS Features Needed for Multiprogramming  I/O routine supplied by the system.  Memory management – the system must allocate the secure memory to several jobs.  CPU scheduling – the system must choose among several jobs ready to run.  Processor's time is shared among multiple users simultaneously Operating System Concepts Multiprogramming operating systems were developed to provide efficient resource utilization in a noninteractive environment.
  • 31. Architectural Support for Multiprogramming Operating System Concepts Feature Description DMA The CPU initiates an I/O operation when an I/O instruction is executed. The DMA implements the data transfer involved in the I/O operation without involving the CPU and raises an I/O interrupt when the data transfer completes. Memory protection A program can access only the part of memory defined by contents of the base register and size . Kernel and user modes of CPU Certain instructions, called privileged instructions, can be performed only when the CPU is in the kernel mode. A program interrupt is raised if a program tries to execute a privileged instruction when the CPU is in the user mode.
  • 32. Time-Sharing Operating Systems–Interactive Computing ● Interactive (action/response) Highly responsive  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 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” from the user’s keyboard. Operating System Concepts
  • 33. Desktop Systems  Personal computers – computer system dedicated to a single user.  I/O devices – keyboards, mice, display screens, small printers.  User convenience and responsiveness.  Sole use of computer and do not need advanced CPU utilization or protection features.  May run several different types of operating systems (Windows, MacOS, UNIX, Linux) Operating System Concepts
  • 34. Parallel Computing Systems  Multiprocessor systems with more than on CPU in close communication.  Advantages of parallel system:  Increased throughput  Economical  Increased reliability  graceful degradation  fail-soft systems Operating System Concepts
  • 35. Symmetric Multiprocessing Architecture Operating System Concepts In these types of systems, each processor contains a similar copy of the operating system and they all communicate with each other. All the processors are in a peer to peer relationship i.e. no master - slave relationship exists between them. Asymmetric Multiprocessors Architecture In asymmetric systems, each processor is given a predefined task. There is a master processor that gives instruction to all the other processors. Asymmetric multiprocessor system contains a master slave relationship.
  • 36. Distributed Systems  Distribute the computation among several physical processors.  Loosely coupled system – each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines.  Advantages of distributed systems.  Resources Sharing  Computation speed up – load sharing  Reliability  Communications Operating System Concepts
  • 37. Distributed Systems (cont)  Requires networking infrastructure.  Local area networks (LAN) or Wide area networks (WAN)  May be either client-server or peer-to-peer systems. Operating System Concepts
  • 38. 1. Client-Server Operating System Concepts Client Read File Request Server Take Action Sends Content 1.2 The provides a file-system interface where clients can create, update, read, and delete files 1.1
  • 39. Peer To Peer Operating System Concepts • Clients and servers are not distinguished from one another. • All nodes within the system are considered peers, and each may act as either a client or a server, depending on whether it is requesting or providing a service. • Once a node has joined the network, it can begin providing services to-and requesting services from -other nodes in the network: 1. When a node joins a network, it registers its service with a centralized lookup service on the network. Any node desiring a specific service first contacts this centralized lookup service to determine which node provides the service. The remainder of the communication takes place between the client and the service provider. 2. A peer acting as a client must first discover what node provides a desired service by broadcasting a request for the service to all other nodes in the network.
  • 40. Clustered Systems  Clustering allows two or more systems to share storage.  Provides high reliability.  Asymmetric clustering: one server runs the application while other servers standby.  Symmetric clustering: all N hosts are running the application. Operating System Concepts
  • 41. 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.  Real-Time systems may be either hard or soft real-time. Operating System Concepts
  • 42. Real-Time Systems (Cont.)  Hard real-time:  Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM)  Conflicts with time-sharing systems, not supported by general-purpose operating systems.  Soft real-time  Limited utility in industrial control of robotics  Useful in applications (multimedia, virtual reality) requiring advanced operating-system features. Operating System Concepts
  • 43. Handheld Systems  Personal Digital Assistants (PDAs)  Cellular telephones  Issues:  Limited memory  Slow processors  Small display screens. Operating System Concepts