SlideShare una empresa de Scribd logo
1 de 23
Principles of Operating Systems -
Lecture 1 1
Principles of
Operating Systems
Principles of Operating Systems -
Lecture 1 2
Introduction
What is an operating system?
Early Operating Systems
Simple Batch Systems
Multiprogrammed Batch Systems
Time-sharing Systems
Personal Computer Systems
Parallel and Distributed Systems
Real-time Systems
Principles of Operating Systems -
Lecture 1 3
What is an Operating System?
An OS is a program that acts an intermediary
between the user of a computer and computer
hardware.
Major cost of general purpose computing is
software.
OS simplifies and manages the complexity of running
application programs efficiently.
Principles of Operating Systems -
Lecture 1 4
Goals of an Operating System
Simplify the execution of user programs and
make solving user problems easier.
Use computer hardware efficiently.
Allow sharing of hardware and software resources.
Make application software portable and versatile.
Provide isolation, security and protection among
user programs.
Improve overall system reliability
error confinement, fault tolerance, reconfiguration.
Principles of Operating Systems -
Lecture 1 5
Why should I study Operating
Systems?
Need to understand interaction between the hardware
and applications
New applications, new hardware..
Need to understand basic principles in the design of
computer systems
efficient resource management, security, flexibility
Increasing need for specialized operating systems
e.g. embedded operating systems for devices - cell phones,
sensors and controllers
real-time operating systems - aircraft control, multimedia
services
Principles of Operating Systems -
Lecture 1 6
Principles of Operating Systems -
Lecture 1 7
Computer System
Components
Hardware
Provides basic computing resources (CPU, memory, I/O devices).
Operating System
Controls and coordinates the use of hardware among application programs.
Application Programs
Solve computing problems of users (compilers, database systems, video games,
business programs such as banking software).
Users
People, machines, other computers
Principles of Operating Systems -
Lecture 1 8
Abstract View of System
System and Application ProgramsSystem and Application Programs
Operating SystemOperating System
Computer
Hardware
Computer
Hardware
User
1
User
1 User
2
User
2
User
3
User
3
User
n
User
n
compiler assembler Text editor Database
system
...
Principles of Operating Systems -
Lecture 1 9
Operating System Views
Resource allocator
to allocate resources (software and hardware) of the
computer system and manage them efficiently.
Control program
Controls execution of user programs and operation of I/O
devices.
Kernel
The program that executes forever (everything else is an
application with respect to the kernel).
Principles of Operating Systems -
Lecture 1 10
Operating System Spectrum
Monitors and Small Kernels
special purpose and embedded systems, real-time systems
Batch and multiprogramming
Timesharing
workstations, servers, minicomputers, timeframes
Transaction systems
Principles of Operating Systems -
Lecture 1 11
Early Systems - Bare Machine
(1950s)
Structure
Large machines run from console
Single user system, Programmer/User as operator
Paper tape or punched cards
Early software
Assemblers, compilers, linkers, loaders, device drivers,
libraries of common subroutines.
Secure execution
Inefficient use of expensive resources
Low CPU utilization, high setup time.
Principles of Operating Systems -
Lecture 1 12
Simple Batch Systems
(1960’s)
Reduce setup time by batching jobs with similar
requirements.
Add a card reader, Hire an operator
User is NOT the operator
Automatic job sequencing
Forms a rudimentary OS.
Resident Monitor
Holds initial control, control transfers to job and then back to
monitor.
Problem
Need to distinguish job from job and data from program.
Principles of Operating Systems -
Lecture 1 13
Supervisor/Operator Control
Secure monitor that controls job processing
Special cards indicate what to do.
User program prevented from performing I/O
Separate user from computer
User submits card deck
cards put on tape
tape processed by operator
output written to tape
tape printed on printer
Problems:
Long turnaround time - up to 2 DAYS!!!
Low CPU utilization
• I/O and CPU could not overlap.
• slow mechanical devices.
Principles of Operating Systems -
Lecture 1 14
Batch Systems - Issues
Solutions to speed up I/O:
Offline Processing
load jobs into memory from tapes, card reading and line printing are done
offline.
Spooling
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.
Introduces notion of a job pool that allows OS choose next job to run so as to
increase CPU utilization.
Principles of Operating Systems -
Lecture 1 15
Speeding up I/O
Principles of Operating Systems -
Lecture 1 16
Batch Systems - I/O
completion
How do we know that I/O is complete?
Polling:
Device sets a flag when it is busy.
Program tests the flag in a loop waiting for completion of I/O.
Interrupts:
On completion of I/O, device forces CPU to jump to a specific
instruction address that contains the interrupt service routine.
After the interrupt has been processed, CPU returns to code
it was executing prior to servicing the interrupt.
Principles of Operating Systems -
Lecture 1 17
Multiprogramming
Use interrupts to run multiple programs
simultaneously
When a program performs I/O, instead of polling, execute
another program till interrupt is received.
Requires secure memory, I/O for each program.
Requires intervention if program loops
indefinitely.
Requires CPU scheduling to choose the next job
to run.
Principles of Operating Systems -
Lecture 1 18
Timesharing
Programs queued for execution in FIFO order.
Like multiprogramming, but timer device
interrupts after a quantum (timeslice).
Interrupted program is returned to end of FIFO
Next program is taken from head of FIFO
Control card interpreter replaced by command
language interpreter.
Principles of Operating Systems -
Lecture 1 19
Timesharing (cont.)
Interactive (action/response)
when OS finishes execution of one command, it seeks
the next control statement from user.
File systems
online filesystem is required for users to access data and
code.
Virtual memory
Job is swapped in and out of memory to disk.
Principles of Operating Systems -
Lecture 1 20
Personal Computing Systems
Single user systems, portable.
I/O devices - keyboards, mice, display screens,
small printers.
Laptops and palmtops, Smart cards, Wireless
devices.
Single user systems may not need advanced
CPU utilization or protection features.
Advantages:
user convenience, responsiveness, ubiquitous
Principles of Operating Systems -
Lecture 1 21
Parallel Systems
Multiprocessor systems with more than one CPU
in close communication.
Improved Throughput, economical, increased
reliability.
Kinds:
• Vector and pipelined
• Symmetric and asymmetric multiprocessing
• Distributed memory vs. shared memory
Programming models:
• Tightly coupled vs. loosely coupled ,message-based vs. shared
variable
Principles of Operating Systems -
Lecture 1 22
Distributed Systems
Distribute computation among many processors.
Loosely coupled -
• no shared memory, various communication lines
client/server architectures
Advantages:
• resource sharing
• computation speed-up
• reliability
• communication - e.g. email
Applications - digital libraries, digital multimedia
Principles of Operating Systems -
Lecture 1 23
Real-time systems
Correct system function depends on timeliness
Feedback/control loops
Sensors and actuators
Hard real-time systems -
Failure if response time too long.
Secondary storage is limited
Soft real-time systems -
Less accurate if response time is too long.
Useful in applications such as multimedia, virtual reality.

Más contenido relacionado

La actualidad más candente (20)

introduction to operating system
introduction to operating systemintroduction to operating system
introduction to operating system
 
Operating system
Operating systemOperating system
Operating system
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1
 
Ch1
Ch1Ch1
Ch1
 
OSCh2
OSCh2OSCh2
OSCh2
 
Opearating System
Opearating  SystemOpearating  System
Opearating System
 
Chapter02 new
Chapter02 newChapter02 new
Chapter02 new
 
SYNCHRONIZATION
SYNCHRONIZATIONSYNCHRONIZATION
SYNCHRONIZATION
 
Ch13 (1)
Ch13 (1)Ch13 (1)
Ch13 (1)
 
operating system
operating systemoperating system
operating system
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
operating system
operating systemoperating system
operating system
 
Ch1 OS
Ch1 OSCh1 OS
Ch1 OS
 
OS_Ch1
OS_Ch1OS_Ch1
OS_Ch1
 
Operating System
Operating SystemOperating System
Operating System
 
Co notes3 sem
Co notes3 semCo notes3 sem
Co notes3 sem
 
Operating system notes ch1
Operating system notes ch1Operating system notes ch1
Operating system notes ch1
 
Operating System
Operating System Operating System
Operating System
 
Silberschatz / OS Concepts
Silberschatz /  OS Concepts Silberschatz /  OS Concepts
Silberschatz / OS Concepts
 
Operating System Overview
Operating System OverviewOperating System Overview
Operating System Overview
 

Destacado

Acl 11 q4_bctc_hn
Acl 11 q4_bctc_hnAcl 11 q4_bctc_hn
Acl 11 q4_bctc_hnQuoc Tu Tu
 
φυτά και βότανα!
φυτά και βότανα!φυτά και βότανα!
φυτά και βότανα!stellabl
 
презентація1
презентація1презентація1
презентація1vasyacv
 
AMA Seminars
AMA SeminarsAMA Seminars
AMA Seminarscarac009
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Destacado (7)

Process management
Process managementProcess management
Process management
 
Acl 11 q4_bctc_hn
Acl 11 q4_bctc_hnAcl 11 q4_bctc_hn
Acl 11 q4_bctc_hn
 
φυτά και βότανα!
φυτά και βότανα!φυτά και βότανα!
φυτά και βότανα!
 
The Technology Talk
The Technology TalkThe Technology Talk
The Technology Talk
 
презентація1
презентація1презентація1
презентація1
 
AMA Seminars
AMA SeminarsAMA Seminars
AMA Seminars
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similar a Oslecture1

Operating system lecture1
Operating system lecture1Operating system lecture1
Operating system lecture1AhalyaSri
 
Unit 1os processes and threads
Unit 1os processes and threadsUnit 1os processes and threads
Unit 1os processes and threadsdonny101
 
Operating System Lecture Notes
Operating System Lecture NotesOperating System Lecture Notes
Operating System Lecture NotesFellowBuddy.com
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsmanideepakc
 
Operting system
Operting systemOperting system
Operting systemKAnurag2
 
CS403: Operating System : Unit I _merged.pdf
CS403: Operating System :  Unit I _merged.pdfCS403: Operating System :  Unit I _merged.pdf
CS403: Operating System : Unit I _merged.pdfAsst.prof M.Gokilavani
 
Lecture1423726024
Lecture1423726024Lecture1423726024
Lecture1423726024deepakjeetu
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfAyushBaiswar1
 
Operating Systems
Operating SystemsOperating Systems
Operating Systemsachal02
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptKirti Verma
 
NE223_chapter 1_Overview of operating systems.ppt
NE223_chapter 1_Overview of operating systems.pptNE223_chapter 1_Overview of operating systems.ppt
NE223_chapter 1_Overview of operating systems.pptMemMem25
 

Similar a Oslecture1 (20)

Operating system lecture1
Operating system lecture1Operating system lecture1
Operating system lecture1
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
Unit 1os processes and threads
Unit 1os processes and threadsUnit 1os processes and threads
Unit 1os processes and threads
 
OSCh1
OSCh1OSCh1
OSCh1
 
Operating System Lecture Notes
Operating System Lecture NotesOperating System Lecture Notes
Operating System Lecture Notes
 
ch1(Introduction).ppt
ch1(Introduction).pptch1(Introduction).ppt
ch1(Introduction).ppt
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system calls
 
Os unit 1
Os unit 1Os unit 1
Os unit 1
 
Operting system
Operting systemOperting system
Operting system
 
CS403: Operating System : Unit I _merged.pdf
CS403: Operating System :  Unit I _merged.pdfCS403: Operating System :  Unit I _merged.pdf
CS403: Operating System : Unit I _merged.pdf
 
Introduction to OS 1.ppt
Introduction to OS 1.pptIntroduction to OS 1.ppt
Introduction to OS 1.ppt
 
Lecture1423726024
Lecture1423726024Lecture1423726024
Lecture1423726024
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdf
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Ch1 - OS.pdf
Ch1 - OS.pdfCh1 - OS.pdf
Ch1 - OS.pdf
 
L-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.pptL-3 BCE OS FINAL.ppt
L-3 BCE OS FINAL.ppt
 
Types of os
Types of osTypes of os
Types of os
 
OS-ch01-2024.ppt
OS-ch01-2024.pptOS-ch01-2024.ppt
OS-ch01-2024.ppt
 
Operating System
Operating SystemOperating System
Operating System
 
NE223_chapter 1_Overview of operating systems.ppt
NE223_chapter 1_Overview of operating systems.pptNE223_chapter 1_Overview of operating systems.ppt
NE223_chapter 1_Overview of operating systems.ppt
 

Último

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

Oslecture1

  • 1. Principles of Operating Systems - Lecture 1 1 Principles of Operating Systems
  • 2. Principles of Operating Systems - Lecture 1 2 Introduction What is an operating system? Early Operating Systems Simple Batch Systems Multiprogrammed Batch Systems Time-sharing Systems Personal Computer Systems Parallel and Distributed Systems Real-time Systems
  • 3. Principles of Operating Systems - Lecture 1 3 What is an Operating System? An OS is a program that acts an intermediary between the user of a computer and computer hardware. Major cost of general purpose computing is software. OS simplifies and manages the complexity of running application programs efficiently.
  • 4. Principles of Operating Systems - Lecture 1 4 Goals of an Operating System Simplify the execution of user programs and make solving user problems easier. Use computer hardware efficiently. Allow sharing of hardware and software resources. Make application software portable and versatile. Provide isolation, security and protection among user programs. Improve overall system reliability error confinement, fault tolerance, reconfiguration.
  • 5. Principles of Operating Systems - Lecture 1 5 Why should I study Operating Systems? Need to understand interaction between the hardware and applications New applications, new hardware.. Need to understand basic principles in the design of computer systems efficient resource management, security, flexibility Increasing need for specialized operating systems e.g. embedded operating systems for devices - cell phones, sensors and controllers real-time operating systems - aircraft control, multimedia services
  • 6. Principles of Operating Systems - Lecture 1 6
  • 7. Principles of Operating Systems - Lecture 1 7 Computer System Components Hardware Provides basic computing resources (CPU, memory, I/O devices). Operating System Controls and coordinates the use of hardware among application programs. Application Programs Solve computing problems of users (compilers, database systems, video games, business programs such as banking software). Users People, machines, other computers
  • 8. Principles of Operating Systems - Lecture 1 8 Abstract View of System System and Application ProgramsSystem and Application Programs Operating SystemOperating System Computer Hardware Computer Hardware User 1 User 1 User 2 User 2 User 3 User 3 User n User n compiler assembler Text editor Database system ...
  • 9. Principles of Operating Systems - Lecture 1 9 Operating System Views Resource allocator to allocate resources (software and hardware) of the computer system and manage them efficiently. Control program Controls execution of user programs and operation of I/O devices. Kernel The program that executes forever (everything else is an application with respect to the kernel).
  • 10. Principles of Operating Systems - Lecture 1 10 Operating System Spectrum Monitors and Small Kernels special purpose and embedded systems, real-time systems Batch and multiprogramming Timesharing workstations, servers, minicomputers, timeframes Transaction systems
  • 11. Principles of Operating Systems - Lecture 1 11 Early Systems - Bare Machine (1950s) Structure Large machines run from console Single user system, Programmer/User as operator Paper tape or punched cards Early software Assemblers, compilers, linkers, loaders, device drivers, libraries of common subroutines. Secure execution Inefficient use of expensive resources Low CPU utilization, high setup time.
  • 12. Principles of Operating Systems - Lecture 1 12 Simple Batch Systems (1960’s) Reduce setup time by batching jobs with similar requirements. Add a card reader, Hire an operator User is NOT the operator Automatic job sequencing Forms a rudimentary OS. Resident Monitor Holds initial control, control transfers to job and then back to monitor. Problem Need to distinguish job from job and data from program.
  • 13. Principles of Operating Systems - Lecture 1 13 Supervisor/Operator Control Secure monitor that controls job processing Special cards indicate what to do. User program prevented from performing I/O Separate user from computer User submits card deck cards put on tape tape processed by operator output written to tape tape printed on printer Problems: Long turnaround time - up to 2 DAYS!!! Low CPU utilization • I/O and CPU could not overlap. • slow mechanical devices.
  • 14. Principles of Operating Systems - Lecture 1 14 Batch Systems - Issues Solutions to speed up I/O: Offline Processing load jobs into memory from tapes, card reading and line printing are done offline. Spooling 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. Introduces notion of a job pool that allows OS choose next job to run so as to increase CPU utilization.
  • 15. Principles of Operating Systems - Lecture 1 15 Speeding up I/O
  • 16. Principles of Operating Systems - Lecture 1 16 Batch Systems - I/O completion How do we know that I/O is complete? Polling: Device sets a flag when it is busy. Program tests the flag in a loop waiting for completion of I/O. Interrupts: On completion of I/O, device forces CPU to jump to a specific instruction address that contains the interrupt service routine. After the interrupt has been processed, CPU returns to code it was executing prior to servicing the interrupt.
  • 17. Principles of Operating Systems - Lecture 1 17 Multiprogramming Use interrupts to run multiple programs simultaneously When a program performs I/O, instead of polling, execute another program till interrupt is received. Requires secure memory, I/O for each program. Requires intervention if program loops indefinitely. Requires CPU scheduling to choose the next job to run.
  • 18. Principles of Operating Systems - Lecture 1 18 Timesharing Programs queued for execution in FIFO order. Like multiprogramming, but timer device interrupts after a quantum (timeslice). Interrupted program is returned to end of FIFO Next program is taken from head of FIFO Control card interpreter replaced by command language interpreter.
  • 19. Principles of Operating Systems - Lecture 1 19 Timesharing (cont.) Interactive (action/response) when OS finishes execution of one command, it seeks the next control statement from user. File systems online filesystem is required for users to access data and code. Virtual memory Job is swapped in and out of memory to disk.
  • 20. Principles of Operating Systems - Lecture 1 20 Personal Computing Systems Single user systems, portable. I/O devices - keyboards, mice, display screens, small printers. Laptops and palmtops, Smart cards, Wireless devices. Single user systems may not need advanced CPU utilization or protection features. Advantages: user convenience, responsiveness, ubiquitous
  • 21. Principles of Operating Systems - Lecture 1 21 Parallel Systems Multiprocessor systems with more than one CPU in close communication. Improved Throughput, economical, increased reliability. Kinds: • Vector and pipelined • Symmetric and asymmetric multiprocessing • Distributed memory vs. shared memory Programming models: • Tightly coupled vs. loosely coupled ,message-based vs. shared variable
  • 22. Principles of Operating Systems - Lecture 1 22 Distributed Systems Distribute computation among many processors. Loosely coupled - • no shared memory, various communication lines client/server architectures Advantages: • resource sharing • computation speed-up • reliability • communication - e.g. email Applications - digital libraries, digital multimedia
  • 23. Principles of Operating Systems - Lecture 1 23 Real-time systems Correct system function depends on timeliness Feedback/control loops Sensors and actuators Hard real-time systems - Failure if response time too long. Secondary storage is limited Soft real-time systems - Less accurate if response time is too long. Useful in applications such as multimedia, virtual reality.