SlideShare a Scribd company logo
1 of 28
OPERATING SYSTEMS
• Goals of the course
• Definitions of operating systems
• Operating system goals
• What is not an operating system
• Computer architecture
• O/S services
This lecture will cover:
This Lecture will also cover:
• O/S resource management
• O/S achievement history
• Hardware architecture
• Processes
• Interrupts
Goals of the Course
This course is to provide a combined applied/ theoretical
background in Operating Systems and Systems
Programming to improve students’ understanding:
1. Systems software design
2. Systems programming
3. Performance analysis
4. Performance tuning
Some Prerequisites
The Study of Operating Systems Relies on Many Areas:
1. Mathematics
(a) Discrete Mathematics
(b) Basic Calculus
(c)Probability (Exponential Distribution, Poisson
Processes)
2. Computer Science
(a) Computer Architecture
(b) Programming Language Design
(c) Software Design
(d) Data Structures/ Algorithms
Don’t Panic if you are not familiar
with all the topics, but it is best to be
exposed to most of them.
Other Prerequisites
Operating System Definitions
Operating System - a program that acts as an
intermediary between a user of a computer and the
computer hardware.
Resource Allocator - manages and allocates resources.
Control Program - controls the execution of user
programs and operation of I/O devices.
Kernel - the one program running at all times (all else
being application programs).
O/S Design Goals
An Operating System (O/S for short) provides the
following:
1. A run time programming interface for applications.
2. Resource management.
O/S Design goals include:
1. Convenience - Reduce Complexity for programmers/
users.
2. Efficiency - Allow “efficient” access to system
resources.
3. Flexibility - Adding new features should be easy.
What is not an O/S
1. Programming Language Compilers - Translators
2. Interpreter - Shell/ User Interface
3. Library - A set of commands/ utilities
These features are typically provided
as part of the O/S but are strictly
speaking not the O/S.
Computer Architecture
The following layers of abstraction are used (from
highest to lowest):
1. Applications Software - Custom programs to support
users.
2. Systems Software - Controls the hardware.
3. Hardware - The physical control
of the system (signals).
Web Browser Games
Data Base Word
Processor
Compiler Shell Editor
Operating System
Physical Network
Machine Language
Micro Code
Physical Devices
Application Software
Systems Software
Hardware
Figure 1: Computer Systems Architecture
O/S Services
Some O/S services for users are:
1. Program execution - Read program into memory/
run it return control when done.
2. Peripheral Access - I/O device driver interface.
3. Persistent Object Management-
File system structure.
4. Security - File System, Network.
5. Error Detection/ Handling - Hardware failure,
program errors.
6. Program Creation Tools - Debugging/ text
editing etc.
7. Accounting - Billing for computer access
Other O/S Services
O/S Resource Management
O/S controls are intrusive because they both
consume the resources which they seek to
control and mediate conflicting requests.
Resource Attributes
Resources have properties governing their use including:
1. Preemption - How expensive is it for the device/
resource?
2. Renewability - Does the resource get replenished?
3. Scheduling - Does order of allocation matter?
4. Persistence - Does it’s lifetime extend beyond that of
the process which creates it?
5. Sharing - Is it suited to be accessed by many users?
Scheduling/ Allocation Policy
The scheduled allocation of resources reflects policies
including:
1. Fairness
2. Starvation Freedom
3. Maximum Throughput
4. Maximum Utilization
5. Minimize Response time.
O/S Achievements
Denning's list of conceptual breakthroughs (1980):
Processes --- A program in execution
Memory Management
Information protection and security
Scheduling and resource management
System Structure
A Traditional Hardware Architecture
The traditional von Neumann structure consists of:
1) Processor - Also called the CPU (Central Processing
Unit) our example has the registers:
PC --- Program Counter
IR --- Instruction Register
MAR --- Memory Address Register
MBR --- Memory Buffer Register
I/O AR --- I/O Address Register
I/O BR --- I/O Buffer Register
2) Memory --- (Volatile)
3) Peripherals --- I/O Devices
4) Systems Interconnection --- Links the Other
Components (Bus)
A Traditional Hardware Architecture
(Continued)
Figure 2:
von
Neumann
Architecture
The register structure comes from Stallings; the names
mean:
1) PC --- Program Counter --- Address of next instruction
2) IR --- Instruction Register --- Current OpCode to
execute
3) MAR --- Memory Address Register --- Memory Pointer
4) MBR --- Memory Buffer Register --- Buffer for memory
access
5) I/O AR --- I/O Address Register --- I/O Pointer
6) I/O BR --- I/O Buffer Register --- Buffer for I/O access
User registers are not shown here.
Process Context
The context of a process consists of:
1) The Current Instruction Pointer (the IP)
2) Register Contents
3) Memory used by that process
This is the machine's current state
used to determine the machines
next state when running a particular
program.
The Model of Execution
Traditionally called the fetch/
execute cycle, in its simplest
form: (figure 3)
Time- Sharing Systems- Interactive
Computing
•The CPU is multiplexed among several jobs that are
kept in memory and on disk (the CPU is allocated to a
job only if the job is in memory).
•A job is swapped in and out of memory to the disk.
•On-line communication between the user and the
system is provided; when the operating system finishes
the execution of one command, it seeks the next “control
statement” not from a card reader, but rather from the
user’s keyboard.
•On line file system must be available for users to
access data and code.
Motivation for Interrupts
An interrupt is an external asynchronous event changing
the flow of control of a process (my definition). It is also
refers to triggering such an event.
14.1 - The Problem
Peripherals tend to have slow
response time (especially if waiting
on human supplied input).
The Solution
To improve CPU utilization we want to allow the CPU to
continue to execute while awaiting I/O as seen in Figure.
When an interrupt is detected an interrupt handling
routine is typically invoked. There are times (such as
interrupt processing) where it may be desirable to
disallow further interrupts.
Interrupting the Fetch/Execute Cycle
The fetch/
execute cycle is
adjusted to
support interrupts.
(figure 4)
Interrupt Processing
Processing an interrupt on most architectures involves
the following steps:
1. Finish the current instruction
2. Push the IP on the stack
3. Set the IP to the interrupt handler's address.
4. Preserve the process context
(i.e. push registers).
5. Executing the interrupt handling
routine.
6. Restore the process context
(i.e. pop registers).
7. Pop the IP from the stack

More Related Content

Similar to OSLecture1.ppt

COMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptx
COMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptxCOMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptx
COMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptxPannaBushratul
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)Sohaib Danish
 
Operating system notes ch1
Operating system notes ch1Operating system notes ch1
Operating system notes ch1Emmanuel Damka
 
Lecture_01 Operating System Course Introduction
Lecture_01 Operating System Course IntroductionLecture_01 Operating System Course Introduction
Lecture_01 Operating System Course IntroductionArnoyKhan
 
operating system over view.ppt operating sysyems
operating system over view.ppt operating sysyemsoperating system over view.ppt operating sysyems
operating system over view.ppt operating sysyemsJyoReddy9
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsmanideepakc
 
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
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfAyushBaiswar1
 
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 usesSurya Vishnuram
 
1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptxAishwarya .
 
Principles of operating system
Principles of operating systemPrinciples of operating system
Principles of operating systemAnil Dharmapuri
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1sphs
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - IntroductionWayne Jones Jnr
 
Operating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chaptersOperating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chapterssphs
 

Similar to OSLecture1.ppt (20)

Operating system notes pdf
Operating system notes pdfOperating system notes pdf
Operating system notes pdf
 
COMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptx
COMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptxCOMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptx
COMPUTER BASIC AND FUNDAMENTAL AND ITS ORGANISATION.pptx
 
Operating system concepts (notes)
Operating system concepts (notes)Operating system concepts (notes)
Operating system concepts (notes)
 
Operating system notes ch1
Operating system notes ch1Operating system notes ch1
Operating system notes ch1
 
OS Content.pdf
OS Content.pdfOS Content.pdf
OS Content.pdf
 
Lecture_01 Operating System Course Introduction
Lecture_01 Operating System Course IntroductionLecture_01 Operating System Course Introduction
Lecture_01 Operating System Course Introduction
 
operating system over view.ppt operating sysyems
operating system over view.ppt operating sysyemsoperating system over view.ppt operating sysyems
operating system over view.ppt operating sysyems
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system calls
 
Ch3
Ch3Ch3
Ch3
 
installing and optimizing operating system software
installing and optimizing operating system software   installing and optimizing operating system software
installing and optimizing operating system software
 
Bedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.pdfBedtime Stories on Operating Systems.pdf
Bedtime Stories on Operating Systems.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
 
Os
OsOs
Os
 
Os
OsOs
Os
 
computer Unit 7
computer Unit 7computer Unit 7
computer Unit 7
 
1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx
 
Principles of operating system
Principles of operating systemPrinciples of operating system
Principles of operating system
 
OS - Ch1
OS - Ch1OS - Ch1
OS - Ch1
 
Chapter 1 - Introduction
Chapter 1 - IntroductionChapter 1 - Introduction
Chapter 1 - Introduction
 
Operating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chaptersOperating systems. replace ch1 with numbers for next chapters
Operating systems. replace ch1 with numbers for next chapters
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 

OSLecture1.ppt

  • 1. OPERATING SYSTEMS • Goals of the course • Definitions of operating systems • Operating system goals • What is not an operating system • Computer architecture • O/S services This lecture will cover:
  • 2. This Lecture will also cover: • O/S resource management • O/S achievement history • Hardware architecture • Processes • Interrupts
  • 3. Goals of the Course This course is to provide a combined applied/ theoretical background in Operating Systems and Systems Programming to improve students’ understanding: 1. Systems software design 2. Systems programming 3. Performance analysis 4. Performance tuning
  • 4. Some Prerequisites The Study of Operating Systems Relies on Many Areas: 1. Mathematics (a) Discrete Mathematics (b) Basic Calculus (c)Probability (Exponential Distribution, Poisson Processes)
  • 5. 2. Computer Science (a) Computer Architecture (b) Programming Language Design (c) Software Design (d) Data Structures/ Algorithms Don’t Panic if you are not familiar with all the topics, but it is best to be exposed to most of them. Other Prerequisites
  • 6. Operating System Definitions Operating System - a program that acts as an intermediary between a user of a computer and the computer hardware. Resource Allocator - manages and allocates resources. Control Program - controls the execution of user programs and operation of I/O devices. Kernel - the one program running at all times (all else being application programs).
  • 7. O/S Design Goals An Operating System (O/S for short) provides the following: 1. A run time programming interface for applications. 2. Resource management.
  • 8. O/S Design goals include: 1. Convenience - Reduce Complexity for programmers/ users. 2. Efficiency - Allow “efficient” access to system resources. 3. Flexibility - Adding new features should be easy.
  • 9. What is not an O/S 1. Programming Language Compilers - Translators 2. Interpreter - Shell/ User Interface 3. Library - A set of commands/ utilities These features are typically provided as part of the O/S but are strictly speaking not the O/S.
  • 10. Computer Architecture The following layers of abstraction are used (from highest to lowest): 1. Applications Software - Custom programs to support users. 2. Systems Software - Controls the hardware. 3. Hardware - The physical control of the system (signals).
  • 11. Web Browser Games Data Base Word Processor Compiler Shell Editor Operating System Physical Network Machine Language Micro Code Physical Devices Application Software Systems Software Hardware Figure 1: Computer Systems Architecture
  • 12. O/S Services Some O/S services for users are: 1. Program execution - Read program into memory/ run it return control when done. 2. Peripheral Access - I/O device driver interface. 3. Persistent Object Management- File system structure. 4. Security - File System, Network.
  • 13. 5. Error Detection/ Handling - Hardware failure, program errors. 6. Program Creation Tools - Debugging/ text editing etc. 7. Accounting - Billing for computer access Other O/S Services
  • 14. O/S Resource Management O/S controls are intrusive because they both consume the resources which they seek to control and mediate conflicting requests.
  • 15. Resource Attributes Resources have properties governing their use including: 1. Preemption - How expensive is it for the device/ resource? 2. Renewability - Does the resource get replenished? 3. Scheduling - Does order of allocation matter? 4. Persistence - Does it’s lifetime extend beyond that of the process which creates it? 5. Sharing - Is it suited to be accessed by many users?
  • 16. Scheduling/ Allocation Policy The scheduled allocation of resources reflects policies including: 1. Fairness 2. Starvation Freedom 3. Maximum Throughput 4. Maximum Utilization 5. Minimize Response time.
  • 17. O/S Achievements Denning's list of conceptual breakthroughs (1980): Processes --- A program in execution Memory Management Information protection and security Scheduling and resource management System Structure
  • 18. A Traditional Hardware Architecture The traditional von Neumann structure consists of: 1) Processor - Also called the CPU (Central Processing Unit) our example has the registers: PC --- Program Counter IR --- Instruction Register MAR --- Memory Address Register MBR --- Memory Buffer Register I/O AR --- I/O Address Register I/O BR --- I/O Buffer Register
  • 19. 2) Memory --- (Volatile) 3) Peripherals --- I/O Devices 4) Systems Interconnection --- Links the Other Components (Bus) A Traditional Hardware Architecture (Continued)
  • 21. The register structure comes from Stallings; the names mean: 1) PC --- Program Counter --- Address of next instruction 2) IR --- Instruction Register --- Current OpCode to execute 3) MAR --- Memory Address Register --- Memory Pointer 4) MBR --- Memory Buffer Register --- Buffer for memory access 5) I/O AR --- I/O Address Register --- I/O Pointer 6) I/O BR --- I/O Buffer Register --- Buffer for I/O access User registers are not shown here.
  • 22. Process Context The context of a process consists of: 1) The Current Instruction Pointer (the IP) 2) Register Contents 3) Memory used by that process This is the machine's current state used to determine the machines next state when running a particular program.
  • 23. The Model of Execution Traditionally called the fetch/ execute cycle, in its simplest form: (figure 3)
  • 24. Time- Sharing Systems- Interactive Computing •The CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job only if the job is in memory). •A job is swapped in and out of memory to the disk. •On-line communication between the user and the system is provided; when the operating system finishes the execution of one command, it seeks the next “control statement” not from a card reader, but rather from the user’s keyboard. •On line file system must be available for users to access data and code.
  • 25. Motivation for Interrupts An interrupt is an external asynchronous event changing the flow of control of a process (my definition). It is also refers to triggering such an event. 14.1 - The Problem Peripherals tend to have slow response time (especially if waiting on human supplied input).
  • 26. The Solution To improve CPU utilization we want to allow the CPU to continue to execute while awaiting I/O as seen in Figure. When an interrupt is detected an interrupt handling routine is typically invoked. There are times (such as interrupt processing) where it may be desirable to disallow further interrupts.
  • 27. Interrupting the Fetch/Execute Cycle The fetch/ execute cycle is adjusted to support interrupts. (figure 4)
  • 28. Interrupt Processing Processing an interrupt on most architectures involves the following steps: 1. Finish the current instruction 2. Push the IP on the stack 3. Set the IP to the interrupt handler's address. 4. Preserve the process context (i.e. push registers). 5. Executing the interrupt handling routine. 6. Restore the process context (i.e. pop registers). 7. Pop the IP from the stack