SlideShare a Scribd company logo
1 of 13
TOPIC
TYPES OF OPERATING SYSTEM &CPU
SCHEDULING ALGORITHM
Name:-Aman patra
Subject:-Operating system
Roll;-16
Lecturer:-sudha madam
College:-Sr degree and pg college
WHAT IS AN OPERATINGSYSTEM

Aprogramthatactsasanintermediarybetweenau
serofacomputerandthecomputerhardware.
 AnoperatingSystemisacollectionofsystemprogramst
hattogethercontroltheoperationsofacomputer
system.
 Some examples of operating systems are UNIX,
Mach, MS-DOS, MS-Windows, Windows/NT,
Chicago, OS/2,MacOS, VMS, MVS, and VM
TYPES OF OPERATING SYSTEM
 MainframeSystems
 Reduce setup time by batching similar jobs Automatic job sequencing – automatically
transfers control from one job to another. First rudimentary
 operatingsystem.
 BatchProcessingOperatingSystem:
 This type of OS accepts more than one jobs and these jobs are batched/ grouped
together according to their similar requirements. This is done by computer operator.
Whenever the computer becomes available, the batched jobs are sent for execution
and gradually the output is sent back to the user.
 Itallowedonlyoneprogramatatime.
 MultiprogrammingOperatingSystem:
 This type of OS is used to execute more than one jobs simultaneously by a single
processor. it increases CPU utilization by organizing jobs so that the CPU always
has one job to execute.
 Theconceptofmultiprogrammingisdescribedasfollows:
 Allthe jobsthatenter the systemarestoredinthe job pool( indisc).The
operatingsystemloadsaset of jobs from job pool into main memory and begins to
execute.
TYPES OF OPERATING SYSTEM
 Time-Sharing/multitaskingOperatingSystems
 Timesharing(ormultitasking)OSisalogicalextensionofmultiprogram
ming.Itprovidesextrafacilitiessuch as:
 Fasterswitchingbetweenmultiplejobstomakeprocessingfaster.
 Allowsmultipleuserstosharecomputersystemsimultaneously.
 Theuserscaninteractwitheachjobwhileitisrunning.
 These systems use a concept of virtual memory for effective
utilization of memory space. Hence, in this OS, no jobs are
discarded. Each one is executed using virtual memory concept. It
uses CPU scheduling, memory management, disc management
and security management. Examples: CTSS, MULTICS, CAL,
UNIX etc.
 MultiprocessorOperatingSystems
 Multiprocessor operating systems are also known as parallel OS
or tightly coupled OS. Such operating systems have more than
one processor in close communication that sharing the computer
bus, the clock and sometimes memory and peripheral devices. It
executes multiple jobs at same time and makes the processing
faster.
TYPES OF OPERATING SYSTEM
 DistributedOperatingSystems
 Indistributedsystem,thedifferentmachinesareconnectedinanet
workandeachmachinehasitsown processor and own local
memory.
 In this system, the operating systems on all the machines
work together to manage the collective network resource.
 DesktopSystems/PersonalComputerSystems
 ThePCoperatingsystemisdesignedformaximizinguserconvenie
nceandresponsiveness.Thissystemis neither multi-user nor
multitasking.
 ThesesystemsincludePCsrunningMicrosoftWindowsandtheAp
pleMacintosh.TheMS-DOSoperating system from Microsoft
has been superseded by multiple flavors of Microsoft
Windows and IBM hasupgraded MS-DOS to the OS/2
multitasking system.
CPU SCHEDULING
 Selects from among the processes in memory that are ready to
execute, and allocates the CPU to one of them
 CPU scheduling decisions may take place when a process:
1. Switches from running to waiting state
2. Switches from running to ready state
3. Switches from waiting to ready
4. Terminates
FIRST-COME, FIRST SERVED
 ( FCFS) same as FIFO
 Simple, fair, but poor performance. Average queueing
time may be long.
 What are the average queueing and residence times
for this scenario?
 How do average queueing and residence times
depend on ordering of these processes in the queue
CPU SCHEDULING
5:
CPU-Scheduling
8
EXAMPLE DATA:
Process Arrival Service
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
0 8 12 21 26
P1 P2 P3 P4
FCFS
Average wait = ( (8-0) + (12-1) + (21-2) + (26-3) )/4 = 61/4 = 15.25
Scheduling
Algorithms
Residence Time
at the CPU
CPU SCHEDULING
5:
CPU-Scheduling
9
PRIORITY BASED SCHEDULING:
 Assign each process a priority. Schedule highest priority first. All
processes within same priority are FCFS.
 Priority may be determined by user or by some default mechanism. The
system may determine the priority based on memory requirements, time
limits, or other resource usage.
 Starvation occurs if a low priority process never runs. Solution: build
aging into a variable priority.
 Delicate balance between giving favorable response for interactive jobs,
but not starving batch jobs.
Scheduling
Algorithms
ROUND ROBIN:
 Use a timer to cause an interrupt after a predetermined time. Preempts if task
exceeds it’s quantum.
 Train of events
Dispatch
Time slice occurs OR process suspends on event
Put process on some queue and dispatch next
 Use numbers in last example to find queueing and residence times. (Use quantum
= 4 sec.)
 Definitions:
 Context Switch Changing the processor from running one task (or process)
to another. Implies changing memory.
 Processor Sharing Use of a small quantum such that each process runs
frequently at speed 1/n.
 Reschedule latency How long it takes from when a process requests to
run, until it finally gets control of the CPU.
10
CPU SCHEDULING Scheduling
Algorithms
CPU SCHEDULING
5:
CPU-Scheduling
11
EXAMPLE DATA:
Process Arrival Service
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
0 8 12 16 26
P2 P3 P4 P1
Round Robin, quantum = 4, no priority-based preemption
Average wait = ( (20-0) + (8-1) + (26-2) + (25-3) )/4 = 74/4 = 18.5
P1
4
P3 P4
20 24 25
P3
Scheduling
Algorithms
Note:
Example violates rules for
quantum size since most
processes don’t finish in
one quantum.
SHORTEST-JOB-FIRSTSCHEDULING

 A different approach to CPU scheduling is the shortest-
job-first (SJF) scheduling algorithm. This algorithm
associates with each process the length of the latter's
next CPU burst.When the CPU is available, it is
assigned to the process that has the smallest next CPU
burst. If two processes have the same length next CPU
burst, FCFS scheduling is used to break the tie. Note
that a more appropriate term would be the shortest next
CPU burst,becausetheschedulingis
donebyexaminingthelengthof thenextCPUburstof
aprocess,ratherthanits total length. We use the term SJF
because most people and textbooks refer to this type of
scheduling discipline as SJF.
THANKYOU

More Related Content

Similar to Aman 16 os sheduling algorithm methods.pptx

CPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationCPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationAnitaSofiaKeyser
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2) rohassanie
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsmanideepakc
 
Types of Operating System-converted.pdf
Types of Operating System-converted.pdfTypes of Operating System-converted.pdf
Types of Operating System-converted.pdfOmid695066
 
Cs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratoryCs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratoryPreeja Ravishankar
 
Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentationTalha Shaikh
 
Components of Computer PARALLEL-PROCESSING.pptx
Components of Computer PARALLEL-PROCESSING.pptxComponents of Computer PARALLEL-PROCESSING.pptx
Components of Computer PARALLEL-PROCESSING.pptxDaveEstonilo
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating systemAshikur Rahman
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1New Era University
 
Unit1typesofos.pptx
Unit1typesofos.pptxUnit1typesofos.pptx
Unit1typesofos.pptxdudoo1
 

Similar to Aman 16 os sheduling algorithm methods.pptx (20)

CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
CPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationCPU scheduling in Operating System Explanation
CPU scheduling in Operating System Explanation
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2)
 
100-E
100-E100-E
100-E
 
Cp usched 2
Cp usched  2Cp usched  2
Cp usched 2
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
LM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system callsLM1 - Computer System Overview, system calls
LM1 - Computer System Overview, system calls
 
Operating system
Operating systemOperating system
Operating system
 
Types of Operating System-converted.pdf
Types of Operating System-converted.pdfTypes of Operating System-converted.pdf
Types of Operating System-converted.pdf
 
Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Cs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratoryCs6413 operating-systems-laboratory
Cs6413 operating-systems-laboratory
 
Windows process scheduling presentation
Windows process scheduling presentationWindows process scheduling presentation
Windows process scheduling presentation
 
Components of Computer PARALLEL-PROCESSING.pptx
Components of Computer PARALLEL-PROCESSING.pptxComponents of Computer PARALLEL-PROCESSING.pptx
Components of Computer PARALLEL-PROCESSING.pptx
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
Section05 scheduling
Section05 schedulingSection05 scheduling
Section05 scheduling
 
Types of operating system
Types of operating systemTypes of operating system
Types of operating system
 
15. Computer Systems Basic Software 1
15. Computer Systems   Basic Software 115. Computer Systems   Basic Software 1
15. Computer Systems Basic Software 1
 
Unit1typesofos.pptx
Unit1typesofos.pptxUnit1typesofos.pptx
Unit1typesofos.pptx
 
rtos by mohit
rtos by mohitrtos by mohit
rtos by mohit
 
Process management
Process managementProcess management
Process management
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
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
 
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
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Recently uploaded (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
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 🔝✔️✔️
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
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
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Aman 16 os sheduling algorithm methods.pptx

  • 1. TOPIC TYPES OF OPERATING SYSTEM &CPU SCHEDULING ALGORITHM Name:-Aman patra Subject:-Operating system Roll;-16 Lecturer:-sudha madam College:-Sr degree and pg college
  • 2. WHAT IS AN OPERATINGSYSTEM  Aprogramthatactsasanintermediarybetweenau serofacomputerandthecomputerhardware.  AnoperatingSystemisacollectionofsystemprogramst hattogethercontroltheoperationsofacomputer system.  Some examples of operating systems are UNIX, Mach, MS-DOS, MS-Windows, Windows/NT, Chicago, OS/2,MacOS, VMS, MVS, and VM
  • 3. TYPES OF OPERATING SYSTEM  MainframeSystems  Reduce setup time by batching similar jobs Automatic job sequencing – automatically transfers control from one job to another. First rudimentary  operatingsystem.  BatchProcessingOperatingSystem:  This type of OS accepts more than one jobs and these jobs are batched/ grouped together according to their similar requirements. This is done by computer operator. Whenever the computer becomes available, the batched jobs are sent for execution and gradually the output is sent back to the user.  Itallowedonlyoneprogramatatime.  MultiprogrammingOperatingSystem:  This type of OS is used to execute more than one jobs simultaneously by a single processor. it increases CPU utilization by organizing jobs so that the CPU always has one job to execute.  Theconceptofmultiprogrammingisdescribedasfollows:  Allthe jobsthatenter the systemarestoredinthe job pool( indisc).The operatingsystemloadsaset of jobs from job pool into main memory and begins to execute.
  • 4. TYPES OF OPERATING SYSTEM  Time-Sharing/multitaskingOperatingSystems  Timesharing(ormultitasking)OSisalogicalextensionofmultiprogram ming.Itprovidesextrafacilitiessuch as:  Fasterswitchingbetweenmultiplejobstomakeprocessingfaster.  Allowsmultipleuserstosharecomputersystemsimultaneously.  Theuserscaninteractwitheachjobwhileitisrunning.  These systems use a concept of virtual memory for effective utilization of memory space. Hence, in this OS, no jobs are discarded. Each one is executed using virtual memory concept. It uses CPU scheduling, memory management, disc management and security management. Examples: CTSS, MULTICS, CAL, UNIX etc.  MultiprocessorOperatingSystems  Multiprocessor operating systems are also known as parallel OS or tightly coupled OS. Such operating systems have more than one processor in close communication that sharing the computer bus, the clock and sometimes memory and peripheral devices. It executes multiple jobs at same time and makes the processing faster.
  • 5. TYPES OF OPERATING SYSTEM  DistributedOperatingSystems  Indistributedsystem,thedifferentmachinesareconnectedinanet workandeachmachinehasitsown processor and own local memory.  In this system, the operating systems on all the machines work together to manage the collective network resource.  DesktopSystems/PersonalComputerSystems  ThePCoperatingsystemisdesignedformaximizinguserconvenie nceandresponsiveness.Thissystemis neither multi-user nor multitasking.  ThesesystemsincludePCsrunningMicrosoftWindowsandtheAp pleMacintosh.TheMS-DOSoperating system from Microsoft has been superseded by multiple flavors of Microsoft Windows and IBM hasupgraded MS-DOS to the OS/2 multitasking system.
  • 6. CPU SCHEDULING  Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them  CPU scheduling decisions may take place when a process: 1. Switches from running to waiting state 2. Switches from running to ready state 3. Switches from waiting to ready 4. Terminates
  • 7. FIRST-COME, FIRST SERVED  ( FCFS) same as FIFO  Simple, fair, but poor performance. Average queueing time may be long.  What are the average queueing and residence times for this scenario?  How do average queueing and residence times depend on ordering of these processes in the queue
  • 8. CPU SCHEDULING 5: CPU-Scheduling 8 EXAMPLE DATA: Process Arrival Service Time Time 1 0 8 2 1 4 3 2 9 4 3 5 0 8 12 21 26 P1 P2 P3 P4 FCFS Average wait = ( (8-0) + (12-1) + (21-2) + (26-3) )/4 = 61/4 = 15.25 Scheduling Algorithms Residence Time at the CPU
  • 9. CPU SCHEDULING 5: CPU-Scheduling 9 PRIORITY BASED SCHEDULING:  Assign each process a priority. Schedule highest priority first. All processes within same priority are FCFS.  Priority may be determined by user or by some default mechanism. The system may determine the priority based on memory requirements, time limits, or other resource usage.  Starvation occurs if a low priority process never runs. Solution: build aging into a variable priority.  Delicate balance between giving favorable response for interactive jobs, but not starving batch jobs. Scheduling Algorithms
  • 10. ROUND ROBIN:  Use a timer to cause an interrupt after a predetermined time. Preempts if task exceeds it’s quantum.  Train of events Dispatch Time slice occurs OR process suspends on event Put process on some queue and dispatch next  Use numbers in last example to find queueing and residence times. (Use quantum = 4 sec.)  Definitions:  Context Switch Changing the processor from running one task (or process) to another. Implies changing memory.  Processor Sharing Use of a small quantum such that each process runs frequently at speed 1/n.  Reschedule latency How long it takes from when a process requests to run, until it finally gets control of the CPU. 10 CPU SCHEDULING Scheduling Algorithms
  • 11. CPU SCHEDULING 5: CPU-Scheduling 11 EXAMPLE DATA: Process Arrival Service Time Time 1 0 8 2 1 4 3 2 9 4 3 5 0 8 12 16 26 P2 P3 P4 P1 Round Robin, quantum = 4, no priority-based preemption Average wait = ( (20-0) + (8-1) + (26-2) + (25-3) )/4 = 74/4 = 18.5 P1 4 P3 P4 20 24 25 P3 Scheduling Algorithms Note: Example violates rules for quantum size since most processes don’t finish in one quantum.
  • 12. SHORTEST-JOB-FIRSTSCHEDULING   A different approach to CPU scheduling is the shortest- job-first (SJF) scheduling algorithm. This algorithm associates with each process the length of the latter's next CPU burst.When the CPU is available, it is assigned to the process that has the smallest next CPU burst. If two processes have the same length next CPU burst, FCFS scheduling is used to break the tie. Note that a more appropriate term would be the shortest next CPU burst,becausetheschedulingis donebyexaminingthelengthof thenextCPUburstof aprocess,ratherthanits total length. We use the term SJF because most people and textbooks refer to this type of scheduling discipline as SJF.