SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Operating System Overview
Introduction of different types of Operating
System
Scheduling
Memory Management
Operating System Support
Objectives and Functions
Convenience
 Making the computer easier to use
Efficiency
 Allowing better use of computer resources
Layers and Views of a Computer System
Operating System Services
Program creation
Program execution
Access to I/O devices
Controlled access to files
System access
Error detection and response
Accounting
O/S as a Resource Manager
Types of Operating System
Interactive
Batch
Single program (Uni-programming)
Multi-programming (Multi-tasking)
Early Systems
Late 1940s to mid 1950s
No Operating System
Programs interact directly with hardware
Two main problems:
 Scheduling
 Setup time
Simple Batch Systems
Resident Monitor program
Users submit jobs to operator
Operator batches jobs
Monitor controls sequence of events to process batch
When one job is finished, control returns to Monitor
which reads next job
Monitor handles scheduling
Memory Layout for Resident Monitor
Job Control Language
Instructions to Monitor
Usually denoted by $
e.g.
 $JOB
 $FTN
 ... Some Fortran instructions
 $LOAD
 $RUN
 ... Some data
 $END
Other Desirable Hardware Features
Memory protection
 To protect the Monitor
Timer
 To prevent a job monopolizing the system
Privileged instructions
 Only executed by Monitor
 e.g. I/O
Interrupts
 Allows for relinquishing and regaining control
Multi-programmed Batch Systems
I/O devices very slow
When one program is waiting for I/O, another can
use the CPU
Single Program
Multi-Programming with
Two Programs
Multi-Programming with
Three Programs
Effects of Multiprogramming
on Resource Utilization
Time Sharing Systems
Allow users to interact directly with the computer
 i.e. Interactive
Multi-programming allows a number of users to
interact with the computer
Scheduling
Key to multi-programming
Long term
Medium term
Short term
I/O
Long Term Scheduling
Determines which programs are submitted for
processing
i.e. controls the degree of multi-programming
Once submitted, a job becomes a process for the
short term scheduler
(or it becomes a swapped out job for the medium
term scheduler)
Medium Term Scheduling
Part of the swapping function (more later…)
Usually based on the need to manage multi-
programming
If no virtual memory, memory management is also
an issue
Short Term Scheduler
Dispatcher
Fine grained decisions of which job to execute next
i.e. which job actually gets to use the processor in the
next time slot
Five-State Process Model
Waiting
Halted
Process Control Block
Identifier
State
Priority
Program counter
Memory pointers
Context data
I/O status
Accounting information
PCB Diagram
Key Elements of O/S
Process Scheduling
Memory Management
Uni-program
 Memory split into two
 One for Operating System (monitor)
 One for currently executing program
Multi-program
 “User” part is sub-divided and shared among active processes
Swapping
Problem: I/O is so slow compared with CPU that
even in multi-programming system, CPU can be idle
most of the time
Solutions:
 Increase main memory
 Expensive
 Leads to larger programs
 Swapping
What is Swapping?
Long term queue of processes stored on disk
Processes “swapped” in as space becomes available
As a process completes it is moved out of main
memory
If none of the processes in memory are ready (i.e. all
I/O blocked)
 Swap out a blocked process to intermediate queue
 Swap in a ready process or a new process
 But swapping is an I/O process...
Partitioning
Splitting memory into sections to allocate to
processes (including Operating System)
Fixed-sized partitions
 May not be equal size
 Process is fitted into smallest hole that will take it (best fit)
 Some wasted memory
 Leads to variable sized partitions
Fixed Partitioning
Variable Sized Partitions (1)
Allocate exactly the required memory to a process
This leads to a hole at the end of memory, too small
to use
 Only one small hole - less waste
When all processes are blocked, swap out a process
and bring in another
New process may be smaller than swapped out
process
Another hole
Variable Sized Partitions (2)
Eventually have lots of holes (fragmentation)
Solutions:
 Coalesce - Join adjacent holes into one large hole
 Compaction - From time to time go through memory and move
all hole into one free block (c.f. disk de-fragmentation)
Effect of Dynamic Partitioning
Paging
Split memory into equal sized, small chunks -page
frames
Split programs (processes) into equal sized small
chunks - pages
Allocate the required number page frames to a
process
Operating System maintains list of free frames
A process does not require contiguous page frames
Use page table to keep track
Logical and Physical Addresses - Paging
Virtual Memory
Demand paging
 Do not require all pages of a process in memory
 Bring in pages as required
Page fault
 Required page is not in memory
 Operating System must swap in required page
 May need to swap out a page to make space
 Select page to throw out based on recent history
Thrashing
Too many processes in too little memory
Operating System spends all its time swapping
Little or no real work is done
Solutions
 Good page replacement algorithms
 Reduce number of processes running
 Fit more memory
Segmentation
Paging is not (usually) visible to the programmer
Segmentation is visible to the programmer
Usually different segments allocated to program and
data
May be a number of program and data segments
Advantages of Segmentation
Simplifies handling of growing data structures
Allows programs to be altered and recompiled
independently, without re-linking and re-loading
Lends itself to sharing among processes
Lends itself to protection
Some systems combine segmentation with paging

Weitere ähnliche Inhalte

Was ist angesagt?

ITFT_Device management in Operating System
ITFT_Device management in Operating SystemITFT_Device management in Operating System
ITFT_Device management in Operating SystemSneh Prabha
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Gaurav Kakade
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating systemMohammad Alam
 
operating system question bank
operating system question bankoperating system question bank
operating system question bankrajatdeep kaur
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management Shashank Asthana
 
Operating system || Chapter 1: Introduction
Operating system || Chapter 1: IntroductionOperating system || Chapter 1: Introduction
Operating system || Chapter 1: IntroductionAnkonGopalBanik
 
Operating system introducton and tyes
Operating system introducton and tyesOperating system introducton and tyes
Operating system introducton and tyesNancy Verma
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)Imdad Ullah
 
Operating System 3
Operating System 3Operating System 3
Operating System 3tech2click
 
Operating system interview question
Operating system interview questionOperating system interview question
Operating system interview questionsriram saravanan
 
Operating System
Operating SystemOperating System
Operating Systemguest8b0942
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systemsPradeep Kumar TS
 
Ch1: Operating System- Introduction
Ch1: Operating System- IntroductionCh1: Operating System- Introduction
Ch1: Operating System- IntroductionAhmar Hashmi
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)Vaibhav Bajaj
 

Was ist angesagt? (20)

Unit 4
Unit  4Unit  4
Unit 4
 
ITFT_Device management in Operating System
ITFT_Device management in Operating SystemITFT_Device management in Operating System
ITFT_Device management in Operating System
 
Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)Introduction to Operating System (Important Notes)
Introduction to Operating System (Important Notes)
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
 
Operating system
Operating systemOperating system
Operating system
 
operating system question bank
operating system question bankoperating system question bank
operating system question bank
 
Operating system Memory management
Operating system Memory management Operating system Memory management
Operating system Memory management
 
Operating system
Operating systemOperating system
Operating system
 
Operating system || Chapter 1: Introduction
Operating system || Chapter 1: IntroductionOperating system || Chapter 1: Introduction
Operating system || Chapter 1: Introduction
 
Operating system introducton and tyes
Operating system introducton and tyesOperating system introducton and tyes
Operating system introducton and tyes
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Processes Control Block (Operating System)
Processes Control Block (Operating System)Processes Control Block (Operating System)
Processes Control Block (Operating System)
 
Operating System 3
Operating System 3Operating System 3
Operating System 3
 
Operating system interview question
Operating system interview questionOperating system interview question
Operating system interview question
 
Operating System
Operating SystemOperating System
Operating System
 
Lecture 3,4 operating systems
Lecture 3,4   operating systemsLecture 3,4   operating systems
Lecture 3,4 operating systems
 
08 Operating System Support
08  Operating  System  Support08  Operating  System  Support
08 Operating System Support
 
Ch1: Operating System- Introduction
Ch1: Operating System- IntroductionCh1: Operating System- Introduction
Ch1: Operating System- Introduction
 
Basic os-concepts
Basic os-conceptsBasic os-concepts
Basic os-concepts
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 

Andere mochten auch

Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory managementrprajat007
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory ManagementAkmal Cikmat
 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chipsAnuj Modi
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating SystemLuka M G
 
Memory Management | Computer Science
Memory Management | Computer ScienceMemory Management | Computer Science
Memory Management | Computer ScienceTransweb Global Inc
 
Memory Management
Memory ManagementMemory Management
Memory ManagementVisakh V
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architectureKumar
 
Introduction to operating syatem
Introduction to operating syatemIntroduction to operating syatem
Introduction to operating syatemRafi Dar
 
Lecture 1
Lecture 1Lecture 1
Lecture 1GIKI
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitKamal Acharya
 
Ch8 (1) morris mano
Ch8 (1) morris manoCh8 (1) morris mano
Ch8 (1) morris manoKIRTI89
 
Operating system introduction to operating system
Operating system   introduction to operating systemOperating system   introduction to operating system
Operating system introduction to operating systemjaydeesa17
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control UnitKamal Acharya
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its conceptsKaran Thakkar
 

Andere mochten auch (20)

Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Operating System-Memory Management
Operating System-Memory ManagementOperating System-Memory Management
Operating System-Memory Management
 
Memory management
Memory managementMemory management
Memory management
 
Memory management
Memory managementMemory management
Memory management
 
Dos final ppt
Dos final pptDos final ppt
Dos final ppt
 
Network Layer
Network LayerNetwork Layer
Network Layer
 
Ram and-rom-chips
Ram and-rom-chipsRam and-rom-chips
Ram and-rom-chips
 
introduction To Operating System
introduction To Operating Systemintroduction To Operating System
introduction To Operating System
 
Memory Management | Computer Science
Memory Management | Computer ScienceMemory Management | Computer Science
Memory Management | Computer Science
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
Introduction to operating syatem
Introduction to operating syatemIntroduction to operating syatem
Introduction to operating syatem
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
Ch8 (1) morris mano
Ch8 (1) morris manoCh8 (1) morris mano
Ch8 (1) morris mano
 
Operating system introduction to operating system
Operating system   introduction to operating systemOperating system   introduction to operating system
Operating system introduction to operating system
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
 
inheritance c++
inheritance c++inheritance c++
inheritance c++
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
Operating system - Process and its concepts
Operating system - Process and its conceptsOperating system - Process and its concepts
Operating system - Process and its concepts
 

Ähnlich wie Operating System

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
 
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
 
Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2Ismail Mukiibi
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportdilip kumar
 
08 operating system support
08 operating system support08 operating system support
08 operating system supportBitta_man
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating SystemSoumit Ghosh
 
OS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of osOS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of osTahaShahid18
 

Ähnlich wie Operating System (20)

operating system
operating systemoperating system
operating system
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Memory comp
Memory compMemory comp
Memory comp
 
Os
OsOs
Os
 
Os
OsOs
Os
 
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
 
Introduction of operating system
Introduction of operating systemIntroduction of operating system
Introduction of operating system
 
Ch1
Ch1Ch1
Ch1
 
Chapter 2 operating systems
Chapter 2 operating systemsChapter 2 operating systems
Chapter 2 operating systems
 
Chapter02 new
Chapter02 newChapter02 new
Chapter02 new
 
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
 
Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2Advanced computer architecture lesson 1 and 2
Advanced computer architecture lesson 1 and 2
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
Operating system
Operating systemOperating system
Operating system
 
Basics of Operating System
Basics of Operating SystemBasics of Operating System
Basics of Operating System
 
Ch03- PROCESSES.ppt
Ch03- PROCESSES.pptCh03- PROCESSES.ppt
Ch03- PROCESSES.ppt
 
OS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of osOS - Chapter # 3 for the development of os
OS - Chapter # 3 for the development of os
 

Mehr von Kamal Acharya

Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computerKamal Acharya
 
Introduction to Computer Security
Introduction to Computer SecurityIntroduction to Computer Security
Introduction to Computer SecurityKamal Acharya
 
Making decision and repeating in PHP
Making decision and repeating  in PHPMaking decision and repeating  in PHP
Making decision and repeating in PHPKamal Acharya
 
Working with arrays in php
Working with arrays in phpWorking with arrays in php
Working with arrays in phpKamal Acharya
 
Text and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHPText and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHPKamal Acharya
 
Capacity Planning of Data Warehousing
Capacity Planning of Data WarehousingCapacity Planning of Data Warehousing
Capacity Planning of Data WarehousingKamal Acharya
 
Information Privacy and Data Mining
Information Privacy and Data MiningInformation Privacy and Data Mining
Information Privacy and Data MiningKamal Acharya
 
Association Analysis in Data Mining
Association Analysis in Data MiningAssociation Analysis in Data Mining
Association Analysis in Data MiningKamal Acharya
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data miningKamal Acharya
 
Introduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data WarehousingIntroduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data WarehousingKamal Acharya
 

Mehr von Kamal Acharya (20)

Programming the basic computer
Programming the basic computerProgramming the basic computer
Programming the basic computer
 
Computer Arithmetic
Computer ArithmeticComputer Arithmetic
Computer Arithmetic
 
Introduction to Computer Security
Introduction to Computer SecurityIntroduction to Computer Security
Introduction to Computer Security
 
Session and Cookies
Session and CookiesSession and Cookies
Session and Cookies
 
Functions in php
Functions in phpFunctions in php
Functions in php
 
Web forms in php
Web forms in phpWeb forms in php
Web forms in php
 
Making decision and repeating in PHP
Making decision and repeating  in PHPMaking decision and repeating  in PHP
Making decision and repeating in PHP
 
Working with arrays in php
Working with arrays in phpWorking with arrays in php
Working with arrays in php
 
Text and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHPText and Numbers (Data Types)in PHP
Text and Numbers (Data Types)in PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Capacity Planning of Data Warehousing
Capacity Planning of Data WarehousingCapacity Planning of Data Warehousing
Capacity Planning of Data Warehousing
 
Data Warehousing
Data WarehousingData Warehousing
Data Warehousing
 
Search Engines
Search EnginesSearch Engines
Search Engines
 
Web Mining
Web MiningWeb Mining
Web Mining
 
Information Privacy and Data Mining
Information Privacy and Data MiningInformation Privacy and Data Mining
Information Privacy and Data Mining
 
Cluster Analysis
Cluster AnalysisCluster Analysis
Cluster Analysis
 
Association Analysis in Data Mining
Association Analysis in Data MiningAssociation Analysis in Data Mining
Association Analysis in Data Mining
 
Classification techniques in data mining
Classification techniques in data miningClassification techniques in data mining
Classification techniques in data mining
 
Data Preprocessing
Data PreprocessingData Preprocessing
Data Preprocessing
 
Introduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data WarehousingIntroduction to Data Mining and Data Warehousing
Introduction to Data Mining and Data Warehousing
 

Kürzlich hochgeladen

How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptxAneriPatwari
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Kürzlich hochgeladen (20)

How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
ARTERIAL BLOOD GAS ANALYSIS........pptx
ARTERIAL BLOOD  GAS ANALYSIS........pptxARTERIAL BLOOD  GAS ANALYSIS........pptx
ARTERIAL BLOOD GAS ANALYSIS........pptx
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

Operating System

  • 1. Operating System Overview Introduction of different types of Operating System Scheduling Memory Management Operating System Support
  • 2. Objectives and Functions Convenience  Making the computer easier to use Efficiency  Allowing better use of computer resources
  • 3. Layers and Views of a Computer System
  • 4. Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System access Error detection and response Accounting
  • 5. O/S as a Resource Manager
  • 6. Types of Operating System Interactive Batch Single program (Uni-programming) Multi-programming (Multi-tasking)
  • 7. Early Systems Late 1940s to mid 1950s No Operating System Programs interact directly with hardware Two main problems:  Scheduling  Setup time
  • 8. Simple Batch Systems Resident Monitor program Users submit jobs to operator Operator batches jobs Monitor controls sequence of events to process batch When one job is finished, control returns to Monitor which reads next job Monitor handles scheduling
  • 9. Memory Layout for Resident Monitor
  • 10. Job Control Language Instructions to Monitor Usually denoted by $ e.g.  $JOB  $FTN  ... Some Fortran instructions  $LOAD  $RUN  ... Some data  $END
  • 11. Other Desirable Hardware Features Memory protection  To protect the Monitor Timer  To prevent a job monopolizing the system Privileged instructions  Only executed by Monitor  e.g. I/O Interrupts  Allows for relinquishing and regaining control
  • 12. Multi-programmed Batch Systems I/O devices very slow When one program is waiting for I/O, another can use the CPU
  • 16. Effects of Multiprogramming on Resource Utilization
  • 17. Time Sharing Systems Allow users to interact directly with the computer  i.e. Interactive Multi-programming allows a number of users to interact with the computer
  • 18.
  • 19. Scheduling Key to multi-programming Long term Medium term Short term I/O
  • 20.
  • 21. Long Term Scheduling Determines which programs are submitted for processing i.e. controls the degree of multi-programming Once submitted, a job becomes a process for the short term scheduler (or it becomes a swapped out job for the medium term scheduler)
  • 22. Medium Term Scheduling Part of the swapping function (more later…) Usually based on the need to manage multi- programming If no virtual memory, memory management is also an issue
  • 23. Short Term Scheduler Dispatcher Fine grained decisions of which job to execute next i.e. which job actually gets to use the processor in the next time slot
  • 25. Process Control Block Identifier State Priority Program counter Memory pointers Context data I/O status Accounting information
  • 27.
  • 30. Memory Management Uni-program  Memory split into two  One for Operating System (monitor)  One for currently executing program Multi-program  “User” part is sub-divided and shared among active processes
  • 31. Swapping Problem: I/O is so slow compared with CPU that even in multi-programming system, CPU can be idle most of the time Solutions:  Increase main memory  Expensive  Leads to larger programs  Swapping
  • 32. What is Swapping? Long term queue of processes stored on disk Processes “swapped” in as space becomes available As a process completes it is moved out of main memory If none of the processes in memory are ready (i.e. all I/O blocked)  Swap out a blocked process to intermediate queue  Swap in a ready process or a new process  But swapping is an I/O process...
  • 33. Partitioning Splitting memory into sections to allocate to processes (including Operating System) Fixed-sized partitions  May not be equal size  Process is fitted into smallest hole that will take it (best fit)  Some wasted memory  Leads to variable sized partitions
  • 35. Variable Sized Partitions (1) Allocate exactly the required memory to a process This leads to a hole at the end of memory, too small to use  Only one small hole - less waste When all processes are blocked, swap out a process and bring in another New process may be smaller than swapped out process Another hole
  • 36. Variable Sized Partitions (2) Eventually have lots of holes (fragmentation) Solutions:  Coalesce - Join adjacent holes into one large hole  Compaction - From time to time go through memory and move all hole into one free block (c.f. disk de-fragmentation)
  • 37. Effect of Dynamic Partitioning
  • 38. Paging Split memory into equal sized, small chunks -page frames Split programs (processes) into equal sized small chunks - pages Allocate the required number page frames to a process Operating System maintains list of free frames A process does not require contiguous page frames Use page table to keep track
  • 39. Logical and Physical Addresses - Paging
  • 40. Virtual Memory Demand paging  Do not require all pages of a process in memory  Bring in pages as required Page fault  Required page is not in memory  Operating System must swap in required page  May need to swap out a page to make space  Select page to throw out based on recent history
  • 41. Thrashing Too many processes in too little memory Operating System spends all its time swapping Little or no real work is done Solutions  Good page replacement algorithms  Reduce number of processes running  Fit more memory
  • 42. Segmentation Paging is not (usually) visible to the programmer Segmentation is visible to the programmer Usually different segments allocated to program and data May be a number of program and data segments
  • 43. Advantages of Segmentation Simplifies handling of growing data structures Allows programs to be altered and recompiled independently, without re-linking and re-loading Lends itself to sharing among processes Lends itself to protection Some systems combine segmentation with paging