SlideShare a Scribd company logo
CSC351-Operating System
Week-1 Lecture-2
Semester 05
Prepared by:
Dr. M. Abubakar Qazi
Agenda for today
► Single-user systems
► Batch systems
► Multiprogram systems
► Time-sharing systems
► Distributed systems
► Real-time systems
► Mobile OS
► Interrupts, traps, and signals
► CPU, I/O, and memory protection Interactive
Lahore Garrison University
2
Single user systems
► Personal computers – computer system dedicated to a
single user.(many but 1 at a time)
► Interactive(Accepting input from a human. Interactive
computer systems are programs that allow users to enter
data or commands. Most popular programs, such as
word processors and spreadsheet applications, are
interactive.
► A non interactive program is one that, when started,
continues without requiring human contact. A compiler
is a non interactive program)
► User convenience and responsiveness.
Lahore Garrison University
3
Batch systems
► First Fundamental system.
► User  operator
► Reduce setup time by batching similar jobs
► Automatic job sequencing – automatically transfers control from one job to another.
► Resident monitor :
► initial control in monitor
► control transfers to job
► when job completes
► control transfers back to monitor
Lahore Garrison University
4
Memory layout of batch systems
Lahore Garrison University
5
Batch system (conti…)
Lahore Garrison University
6
Multiprogrammed systems
 Sharing the processor, when two or more programs reside in memory at the same
time, is referred as multiprogramming
 Multiprogramming increases CPU utilization by organizing jobs so that the CPU
always has one to execute.
 Several jobs are kept in main memory at the same time, and the CPU is
multiplexed among them.
 Multiprogramming operating systems monitor the state of all active programs and
system resources using memory management programs to ensures that the CPU
is never idle, unless there are no jobs to process.
Lahore Garrison University
7
Multiprogrammed Systems
 Example: Two processes P1 and P2 with CPU and I/O
bursts of one time unit each
Lahore Garrison University
8
P1
P2
…
CPU
Burst
I/O
Burst
P1
P2
Os features needed for
Multiprogramming
► Spooling (Simultaneous Peripheral
Operation On-Line)(put job in
buffer)
► Memory management
► CPU scheduling
Lahore Garrison University
9
Time sharing systems
► A multi user and multi process system.
► An interactive system with multiprogramming
► To obtain a reasonable response time, jobs may have
to be swapped in and out of main memory.
► UNIX, Linux, Widows NT server, and Windows 2000
server
Lahore Garrison University
10
Distributed Operating System
 Distributed systems use many central processors to serve multiple real-time applications and
users. As a result, data processing jobs are distributed between the processors.
 It connects multiple computers via a single communication channel. Furthermore, each of these
systems has its own processor and memory.
 Additionally, these CPUs communicate via high-speed buses or telephone lines. Individual
systems that communicate via a single channel are regarded as a single entity. They're also
known as loosely coupled systems.
Real Time systems
► 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
► A real-time operating system must have well-defined, fixed time constraints, otherwise the system
will fail such as controlling scientific experiments, medical imaging systems, industrial control
systems, and some display systems. Plane landing. Ventilators.
► Real-Time systems may be either hard or soft real-time.
Lahore Garrison University
12
Real Time systems
Hard real-time systems:
► Secondary storage limited are absent, data stored in short term memory, or
read-only memory (ROM).coz time is short
► No virtual memory—time cannot be “wasted” on translation of logical to
physical addresses.
► OS code structured for efficiency
► Plane landing systems, process control in nuclear power plants, ventilators, etc.
Lahore Garrison University
13
Real time systems (Cont..)
Soft real-time systems
► Output should be produced within the given time constraints but if it is not, the result is
not life threatening.
► Useful in applications (Live Video Streaming) requiring advanced operating-system
features
 Mobile Communication
 Music Playing Robots
 Weather Station
Lahore Garrison University
14
Mobile OS
 OS for smartphones, tablets, and PDA’s. It is a platform on which other applications can run
on mobile devices.
 Examples of the Mobile OS: Android OS, ios, Symbian OS, and windows mobile OS
Interrupts
 Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell the
CPU to stop its current activities and execute the appropriate part of the operating system
 After the interrupt signal is sensed, the computer either resumes running the current program
or begins running another program.
 An operating system usually has some code that is called an interrupt handler. The interrupt
handler prioritizes the interrupts and saves them in a queue if more than one is waiting to be
handled.
Interrupts, Traps and Signals
 Interrupt---an event generated by a device in a computer to get attention of the CPU(from
hardware devices)
 Trap—an event by the CPU itself as it executes a program
 Signal—an event generated by a user
Lahore Garrison University
17
Interrupts, trap, signals
 If you press any key(keyboard) or moving the
mouse…..Example of interrupt
 Hardware may trigger an interrupt at any time by sending
a signal to the CPU usually by way of the system bus.
 Software may trigger an interrupt by executing a special
operation called a system call
Lahore Garrison University
18
Answer
the Phone
.
.
.
Resume
Interrupts, trap, signals
► A process can generate a trap, for example, by dividing a number by zero.
► caused either by an error (division by zero or invalid memory access) or by a user request
for an operating system service.
► A user or a process may generate a signal (an interrupt to a process)
Lahore Garrison University
19
Interrupt handling
► In case of interrupt or trap, the CPU invokes a piece of code in the OS to service it,
known as interrupt service routine(ISR) or trap service routine(TSR)
► In case of signal, the process can take one of the three possible actions , default action
as defined by OS, ignore signal, or take a programmer specified action
Lahore Garrison University
20
Interrupt handling (Cont..)
► Interrupt transfers control to the interrupt service routine, generally, through the interrupt
vector, which contains addresses of all the interrupt service routines.
► Interrupt architecture must save the address of the instruction after the interrupted instruction
and the CPU state so that execution of the interrupted process may continue after the
interrupt has been serviced.
Lahore Garrison University
21
 As we have time sharing system so multiple user may be there. Here comes
the issue of protection
 One user may delete the files of others.
 Or may overwrite program in memory
Hardware protection
► Dual-Mode Operation
► I/O Protection
► Memory Protection
► CPU Protection
Lahore Garrison University
23
Dual Mode Operation
► Sharing system resources requires operating system to ensure that an incorrect program
cannot cause other programs to execute incorrectly.
► Provide hardware support to differentiate between at least two modes of operations.
► User mode – execution done on behalf of a user.
► Monitor mode (also kernel mode or system mode) – execution done on
behalf of operating system.
Lahore Garrison University
24
Dual Mode Operation
► Mode bit added to computer hardware to indicate the current mode: monitor (0) or
user (1).
► When an interrupt or fault occurs hardware switches to monitor mode.
► Privileged instructions can be issued only in monitor mode.
Lahore Garrison University
25
monitor user
Interrupt/fault
set user mode
Reference
 To cover this topics , different reference material has been used for consultation.
 Operating systems concept by Abraham siberchatz edition 9
 Tutorialspoint.com
 Google.com
26
Lahore Garrison University

More Related Content

PDF
CS311-Lec2_Operating SytemCS311-Lec2_Operating Sytem
sibiga2664
 
PDF
CS311-Lec2_Operating SytemCS311-Lec2_Operating Sytem
sibiga2664
 
PPT
Operating system lecture 2. batch system.memory layout
fahim shahzad
 
PPT
Operating system lecture 2. batch system.memory layout
fahim shahzad
 
PPTX
OS UNIT1.pptx
DHANABALSUBRAMANIAN
 
PPTX
OS UNIT1.pptx
DHANABALSUBRAMANIAN
 
DOC
OPERATING SYSTEM - SHORT NOTES
suthi
 
DOC
OPERATING SYSTEM - SHORT NOTES
suthi
 
CS311-Lec2_Operating SytemCS311-Lec2_Operating Sytem
sibiga2664
 
CS311-Lec2_Operating SytemCS311-Lec2_Operating Sytem
sibiga2664
 
Operating system lecture 2. batch system.memory layout
fahim shahzad
 
Operating system lecture 2. batch system.memory layout
fahim shahzad
 
OS UNIT1.pptx
DHANABALSUBRAMANIAN
 
OS UNIT1.pptx
DHANABALSUBRAMANIAN
 
OPERATING SYSTEM - SHORT NOTES
suthi
 
OPERATING SYSTEM - SHORT NOTES
suthi
 

Similar to Types of Operating Systems for Computer Science.pptx (20)

PPT
Operating Systems with Storage and Process Management
SasiBhushan22
 
PPT
Operating Systems _ Process & Storage Management
SasiBhushan22
 
PPT
Operating Systems Storage & Process Management
SasiBhushan22
 
PPT
Operating Systems with Storage and Process Management
SasiBhushan22
 
PPT
Operating Systems _ Process & Storage Management
SasiBhushan22
 
PPT
Operating Systems Storage & Process Management
SasiBhushan22
 
PPTX
Computer system architecture
jeetesh036
 
PPTX
Computer system architecture
jeetesh036
 
PDF
Operating System and related questions
imdurgesh
 
PDF
Operating System and related questions
imdurgesh
 
PPTX
Advanced computer architecture lesson 1 and 2
Ismail Mukiibi
 
PPTX
Advanced computer architecture lesson 1 and 2
Ismail Mukiibi
 
PPTX
opearating system notes mumbai university.pptx
ssuser3dfcef
 
PPTX
opearating system notes mumbai university.pptx
ssuser3dfcef
 
PPTX
OPERATING SYSTEM UNIT-1 [Autosaved].pptx
NiharikaGuptas
 
PPTX
OPERATING SYSTEM UNIT-1 [Autosaved].pptx
NiharikaGuptas
 
PPTX
Computer Science, Operating System - Lecture 1 slides
luqmanshahzad93
 
PPTX
Computer Science, Operating System - Lecture 1 slides
luqmanshahzad93
 
DOCX
Firo
Firaol Motuma
 
DOCX
Firo
Firaol Motuma
 
Operating Systems with Storage and Process Management
SasiBhushan22
 
Operating Systems _ Process & Storage Management
SasiBhushan22
 
Operating Systems Storage & Process Management
SasiBhushan22
 
Operating Systems with Storage and Process Management
SasiBhushan22
 
Operating Systems _ Process & Storage Management
SasiBhushan22
 
Operating Systems Storage & Process Management
SasiBhushan22
 
Computer system architecture
jeetesh036
 
Computer system architecture
jeetesh036
 
Operating System and related questions
imdurgesh
 
Operating System and related questions
imdurgesh
 
Advanced computer architecture lesson 1 and 2
Ismail Mukiibi
 
Advanced computer architecture lesson 1 and 2
Ismail Mukiibi
 
opearating system notes mumbai university.pptx
ssuser3dfcef
 
opearating system notes mumbai university.pptx
ssuser3dfcef
 
OPERATING SYSTEM UNIT-1 [Autosaved].pptx
NiharikaGuptas
 
OPERATING SYSTEM UNIT-1 [Autosaved].pptx
NiharikaGuptas
 
Computer Science, Operating System - Lecture 1 slides
luqmanshahzad93
 
Computer Science, Operating System - Lecture 1 slides
luqmanshahzad93
 
Ad

Recently uploaded (20)

PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PPTX
CDH. pptx
AneetaSharma15
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
CDH. pptx
AneetaSharma15
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Virus sequence retrieval from NCBI database
yamunaK13
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
Ad

Types of Operating Systems for Computer Science.pptx

  • 1. CSC351-Operating System Week-1 Lecture-2 Semester 05 Prepared by: Dr. M. Abubakar Qazi
  • 2. Agenda for today ► Single-user systems ► Batch systems ► Multiprogram systems ► Time-sharing systems ► Distributed systems ► Real-time systems ► Mobile OS ► Interrupts, traps, and signals ► CPU, I/O, and memory protection Interactive Lahore Garrison University 2
  • 3. Single user systems ► Personal computers – computer system dedicated to a single user.(many but 1 at a time) ► Interactive(Accepting input from a human. Interactive computer systems are programs that allow users to enter data or commands. Most popular programs, such as word processors and spreadsheet applications, are interactive. ► A non interactive program is one that, when started, continues without requiring human contact. A compiler is a non interactive program) ► User convenience and responsiveness. Lahore Garrison University 3
  • 4. Batch systems ► First Fundamental system. ► User  operator ► Reduce setup time by batching similar jobs ► Automatic job sequencing – automatically transfers control from one job to another. ► Resident monitor : ► initial control in monitor ► control transfers to job ► when job completes ► control transfers back to monitor Lahore Garrison University 4
  • 5. Memory layout of batch systems Lahore Garrison University 5
  • 6. Batch system (conti…) Lahore Garrison University 6
  • 7. Multiprogrammed systems  Sharing the processor, when two or more programs reside in memory at the same time, is referred as multiprogramming  Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has one to execute.  Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.  Multiprogramming operating systems monitor the state of all active programs and system resources using memory management programs to ensures that the CPU is never idle, unless there are no jobs to process. Lahore Garrison University 7
  • 8. Multiprogrammed Systems  Example: Two processes P1 and P2 with CPU and I/O bursts of one time unit each Lahore Garrison University 8 P1 P2 … CPU Burst I/O Burst P1 P2
  • 9. Os features needed for Multiprogramming ► Spooling (Simultaneous Peripheral Operation On-Line)(put job in buffer) ► Memory management ► CPU scheduling Lahore Garrison University 9
  • 10. Time sharing systems ► A multi user and multi process system. ► An interactive system with multiprogramming ► To obtain a reasonable response time, jobs may have to be swapped in and out of main memory. ► UNIX, Linux, Widows NT server, and Windows 2000 server Lahore Garrison University 10
  • 11. Distributed Operating System  Distributed systems use many central processors to serve multiple real-time applications and users. As a result, data processing jobs are distributed between the processors.  It connects multiple computers via a single communication channel. Furthermore, each of these systems has its own processor and memory.  Additionally, these CPUs communicate via high-speed buses or telephone lines. Individual systems that communicate via a single channel are regarded as a single entity. They're also known as loosely coupled systems.
  • 12. Real Time systems ► 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 ► A real-time operating system must have well-defined, fixed time constraints, otherwise the system will fail such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Plane landing. Ventilators. ► Real-Time systems may be either hard or soft real-time. Lahore Garrison University 12
  • 13. Real Time systems Hard real-time systems: ► Secondary storage limited are absent, data stored in short term memory, or read-only memory (ROM).coz time is short ► No virtual memory—time cannot be “wasted” on translation of logical to physical addresses. ► OS code structured for efficiency ► Plane landing systems, process control in nuclear power plants, ventilators, etc. Lahore Garrison University 13
  • 14. Real time systems (Cont..) Soft real-time systems ► Output should be produced within the given time constraints but if it is not, the result is not life threatening. ► Useful in applications (Live Video Streaming) requiring advanced operating-system features  Mobile Communication  Music Playing Robots  Weather Station Lahore Garrison University 14
  • 15. Mobile OS  OS for smartphones, tablets, and PDA’s. It is a platform on which other applications can run on mobile devices.  Examples of the Mobile OS: Android OS, ios, Symbian OS, and windows mobile OS
  • 16. Interrupts  Interrupts are signals sent to the CPU by external devices, normally I/O devices. They tell the CPU to stop its current activities and execute the appropriate part of the operating system  After the interrupt signal is sensed, the computer either resumes running the current program or begins running another program.  An operating system usually has some code that is called an interrupt handler. The interrupt handler prioritizes the interrupts and saves them in a queue if more than one is waiting to be handled.
  • 17. Interrupts, Traps and Signals  Interrupt---an event generated by a device in a computer to get attention of the CPU(from hardware devices)  Trap—an event by the CPU itself as it executes a program  Signal—an event generated by a user Lahore Garrison University 17
  • 18. Interrupts, trap, signals  If you press any key(keyboard) or moving the mouse…..Example of interrupt  Hardware may trigger an interrupt at any time by sending a signal to the CPU usually by way of the system bus.  Software may trigger an interrupt by executing a special operation called a system call Lahore Garrison University 18 Answer the Phone . . . Resume
  • 19. Interrupts, trap, signals ► A process can generate a trap, for example, by dividing a number by zero. ► caused either by an error (division by zero or invalid memory access) or by a user request for an operating system service. ► A user or a process may generate a signal (an interrupt to a process) Lahore Garrison University 19
  • 20. Interrupt handling ► In case of interrupt or trap, the CPU invokes a piece of code in the OS to service it, known as interrupt service routine(ISR) or trap service routine(TSR) ► In case of signal, the process can take one of the three possible actions , default action as defined by OS, ignore signal, or take a programmer specified action Lahore Garrison University 20
  • 21. Interrupt handling (Cont..) ► Interrupt transfers control to the interrupt service routine, generally, through the interrupt vector, which contains addresses of all the interrupt service routines. ► Interrupt architecture must save the address of the instruction after the interrupted instruction and the CPU state so that execution of the interrupted process may continue after the interrupt has been serviced. Lahore Garrison University 21
  • 22.  As we have time sharing system so multiple user may be there. Here comes the issue of protection  One user may delete the files of others.  Or may overwrite program in memory
  • 23. Hardware protection ► Dual-Mode Operation ► I/O Protection ► Memory Protection ► CPU Protection Lahore Garrison University 23
  • 24. Dual Mode Operation ► Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly. ► Provide hardware support to differentiate between at least two modes of operations. ► User mode – execution done on behalf of a user. ► Monitor mode (also kernel mode or system mode) – execution done on behalf of operating system. Lahore Garrison University 24
  • 25. Dual Mode Operation ► Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1). ► When an interrupt or fault occurs hardware switches to monitor mode. ► Privileged instructions can be issued only in monitor mode. Lahore Garrison University 25 monitor user Interrupt/fault set user mode
  • 26. Reference  To cover this topics , different reference material has been used for consultation.  Operating systems concept by Abraham siberchatz edition 9  Tutorialspoint.com  Google.com 26 Lahore Garrison University

Editor's Notes

  • #4: Examples of Batch OS: payroll system, bank statements, data entry, etc.