SlideShare a Scribd company logo
1 of 30
FIRST COME FIRST SERVE
SUBMITTED BY:
Harmanjit Dhillon(B130010121)
Manav Khurana (B130010122)
Leepika Kapoor (B130010123)
Priyanka (B130010125)
Kanav Sood (B130010126)
INTRODUCTION :
• First-Come First-Serve (FCFS)
– One ready queue;
– OS runs the process at head of the queue;
– New processes come in at the end of the queue;
– Running process does not give up the CPU until it
terminates or it performs IO.
• Round Robin
– Process runs for one time slice, then moved to back of the
queue;
– Each process gets equal share of the CPU.
• Shortest Time to Completion (STCF)
– Process with shortest computation time left is picked;
– Varianted by preemption;
– Requires knowledge of the future.
• Exponential Queue (Multi-level Feedback)
– Gives newly runnable processes a high priority and a very
short time slice;
– If process uses up the time slice without blocking then
decrease priority by one and double time slice for next time;
– Solves both efficiency and response time problems.
Scheduling Algorithms
First-Come First-Serve
• Non-preemptive FCFS (no priority scheme)
– Simplest implementation of scheduling
algorithms
– Used on timeshared systems (with timer
interruption)
• Non-preemptive FCFS (with priority scheme)
– Next highest priority process is picked
when CPU is yielded
 Once process grabs CPU,
former keeps latter until
completion
Rarely used in real-time
 Preemptive FCFS (with
priority scheme)
Scheduling Algorithms
Round Robin
• Used mostly on timeshared
systems
• Allows multiple users slices
of the CPU on a “round
robin” basis
• Majority of users have the
same priority
• Not a popular scheme with
dynamic priority systems
Scheduling Algorithms
Shortest Time to Completion
• Priorities are assigned in inverse order of time needed for completion
of the entire job
• Minimizes average turnaround time
• Exponential averaging is used to estimate the process’ burst duration
• A job exceeding the resource estimation is aborted
• A job exceeding the time estimation is preempted
• Store estimated value in PCB for the current burst, and compare with
actual value
Scheduling Algorithms
Exponential Queues
• Popular in interactive systems
• A single queue is maintained for each
priority level
• A new process is added at the end of the
highest priority queue
– It is alloted a single time quantum when
it reaches the front
• If it yields the CPU within the time
quantum, it is moved to the rear
• If not, it is placed at the rear of the next
queue down
• Dispatcher selects the head of the
highest priority queue
– A job that “succeeds” moves up
– A job that “fails” moves down
EXPLANATION WITH EXAMPLE
Evaluated Program And
Parameters
The Program helps us find the total
time a person has worked on to set
up his career and waited to work at
the position he desired to in his
life.
Parameters:
1.Number Of Processes: The total number of
tasks he has performed to achieve his job and
his job as well
2.Process Name: The process he has worked on
in his entire life.
3.Process Time: The time he has spent on one
process.
4.Waiting Time: The time he has waited to
enter every task.
5. Total Waiting Time:The Total amount of
time waited for this event, in hundredths of
a second.
6. Average Waiting Time:The total amount of
waiting time divided by the number of
incoming calls answered.
Program Worked On
• #include<stdio.h>
• #include<conio.h>
• int main()
• {
• char p[100][100];
• int tot=0,wt[10],pt[10],z,n,i;
• float avg=0;
• printf("n enter number of process :");
• scanf("%d",&n);
• wt[0]=0;
• for(i=1;i<=n;i++)
• {
• printf("n enter process %d name : ",i);
• scanf("%s",&p[i-1]);
• printf("enter process time : ");
• scanf("%d",&pt[i-1]);
• wt[i]=wt[i-1]+pt[i-1];
• tot=tot+wt[i];
• }
• avg=(float)tot/n;
• printf("n p-nametp-timetw-time n");
• for (i=0;i<n;i++)
• printf("%st%dt%dn",p[i],pt[i],wt[i]);
• printf("n total waiting time : %d n avg
wating time : %f nn ",tot ,avg);
• getch();
• }
Output To The Program
Scheduling Algorithms
Implementation - Analysis
• Direct analysis
– Pick a task set and observe results
• Apply queuing theory to obtain results
– Multi-level feedback queue scheme
• Simulations of scheme implementations
– FCFS, RR, STCF
• Innovations and projections
– “Lottery” scheduling and “own” algorithm
Scheduling Algorithms
References
1) Cooling, J.E. Software Design for Real-Time Systems. Chapman &
Hall, London, UK: 1995.
2) Stallings, William. Operating Systems: Internals and Design
Principles. Upper Saddle River, NJ: Prentice Hall, 1998.
3) http://www.cs.wisc.edu/~bart/537/lecturenotes/s11.html - viewed on
03/24/2000
4) Savitzky, Stephen. Real-Time Microprocessor Systems. Van Nostrand
Reinhold Company, N.Y.: 1985.
5) Undergraduate Operating System Course Notes (Ottawa University,
1998)
THANK YOU

More Related Content

What's hot

Critical Section Problem - Ramakrishna Reddy Bijjam
Critical Section Problem - Ramakrishna Reddy BijjamCritical Section Problem - Ramakrishna Reddy Bijjam
Critical Section Problem - Ramakrishna Reddy BijjamRamakrishna Reddy Bijjam
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithmssathish sak
 
cpu scheduling
cpu schedulingcpu scheduling
cpu schedulinghashim102
 
17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria myrajendra
 
FCFS scheduling OS
FCFS scheduling OSFCFS scheduling OS
FCFS scheduling OSTotan Banik
 
Round Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmRound Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmAdeel Rasheed
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First ServeEdwin Makeu
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin schedulingRaghav S
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process SchedulingDamian T. Gordon
 
Classical problem of synchronization
Classical problem of synchronizationClassical problem of synchronization
Classical problem of synchronizationShakshi Ranawat
 
Free space managment46
Free space managment46Free space managment46
Free space managment46myrajendra
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentationusmankiyani1
 
Np completeness
Np completenessNp completeness
Np completenessRajendran
 

What's hot (20)

Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Critical Section Problem - Ramakrishna Reddy Bijjam
Critical Section Problem - Ramakrishna Reddy BijjamCritical Section Problem - Ramakrishna Reddy Bijjam
Critical Section Problem - Ramakrishna Reddy Bijjam
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Operating System Scheduling Algorithms
Operating System Scheduling AlgorithmsOperating System Scheduling Algorithms
Operating System Scheduling Algorithms
 
17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria 17 cpu scheduling and scheduling criteria
17 cpu scheduling and scheduling criteria
 
FCFS scheduling OS
FCFS scheduling OSFCFS scheduling OS
FCFS scheduling OS
 
Round Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmRound Robin Scheduling Algorithm
Round Robin Scheduling Algorithm
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
 
Round robin scheduling
Round robin schedulingRound robin scheduling
Round robin scheduling
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
Classical problem of synchronization
Classical problem of synchronizationClassical problem of synchronization
Classical problem of synchronization
 
Free space managment46
Free space managment46Free space managment46
Free space managment46
 
Merge sort algorithm
Merge sort algorithmMerge sort algorithm
Merge sort algorithm
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Np completeness
Np completenessNp completeness
Np completeness
 

Viewers also liked

Continuos and batch process
Continuos and batch processContinuos and batch process
Continuos and batch processSadiq Rahim
 
Continuous improvement and tqm [short version]
Continuous improvement and tqm [short version]Continuous improvement and tqm [short version]
Continuous improvement and tqm [short version]JonRobinsonConsultancy
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithmsShanu Kumar
 
Java EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldJava EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldRoberto Cortez
 
What is disruptive innovation?
What is disruptive innovation?What is disruptive innovation?
What is disruptive innovation?Nei Grando
 
Disruptive Innovation
Disruptive InnovationDisruptive Innovation
Disruptive InnovationAcquate
 
Continuous improvement presentation 2014
Continuous improvement presentation 2014Continuous improvement presentation 2014
Continuous improvement presentation 2014mrppittman
 
Continuous process improvement
Continuous process improvementContinuous process improvement
Continuous process improvementNaeem Hassan
 
Computer Aided Design
Computer Aided DesignComputer Aided Design
Computer Aided Designillpa
 
Continuous Improvement Strategy
Continuous Improvement StrategyContinuous Improvement Strategy
Continuous Improvement StrategyCraig Marton
 
Operations Management CHAPTER 1
Operations Management CHAPTER 1Operations Management CHAPTER 1
Operations Management CHAPTER 1Alvaro Alvarez
 
10 disruptive innovation
10 disruptive innovation10 disruptive innovation
10 disruptive innovationWesley Shu
 

Viewers also liked (20)

Fcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt ChartFcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt Chart
 
C8 scheduling
C8 schedulingC8 scheduling
C8 scheduling
 
Continuos and batch process
Continuos and batch processContinuos and batch process
Continuos and batch process
 
Continuous improvement and tqm [short version]
Continuous improvement and tqm [short version]Continuous improvement and tqm [short version]
Continuous improvement and tqm [short version]
 
Disruptive Innovation
Disruptive InnovationDisruptive Innovation
Disruptive Innovation
 
Cad
CadCad
Cad
 
CPU Scheduling algorithms
CPU Scheduling algorithmsCPU Scheduling algorithms
CPU Scheduling algorithms
 
Disruptive innovation
Disruptive innovationDisruptive innovation
Disruptive innovation
 
Java EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real WorldJava EE 7 Batch processing in the Real World
Java EE 7 Batch processing in the Real World
 
What is disruptive innovation?
What is disruptive innovation?What is disruptive innovation?
What is disruptive innovation?
 
Disruptive Innovation
Disruptive InnovationDisruptive Innovation
Disruptive Innovation
 
Continuous improvement presentation 2014
Continuous improvement presentation 2014Continuous improvement presentation 2014
Continuous improvement presentation 2014
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
Sequencing
SequencingSequencing
Sequencing
 
Continuous process improvement
Continuous process improvementContinuous process improvement
Continuous process improvement
 
Computer Aided Design
Computer Aided DesignComputer Aided Design
Computer Aided Design
 
Continuous Improvement Strategy
Continuous Improvement StrategyContinuous Improvement Strategy
Continuous Improvement Strategy
 
Operations Management CHAPTER 1
Operations Management CHAPTER 1Operations Management CHAPTER 1
Operations Management CHAPTER 1
 
10 disruptive innovation
10 disruptive innovation10 disruptive innovation
10 disruptive innovation
 
Vertical Integration
Vertical IntegrationVertical Integration
Vertical Integration
 

Similar to First Come First Serve

scheduling Uni processor Long-term .ppt
scheduling  Uni processor Long-term .pptscheduling  Uni processor Long-term .ppt
scheduling Uni processor Long-term .pptSaba651353
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-schedulingNazir Ahmed
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxansariparveen06
 
Cpu scheduling algorithm on windows
Cpu scheduling algorithm on windowsCpu scheduling algorithm on windows
Cpu scheduling algorithm on windowssiddhartha pande
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptxSHUJEHASSAN
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Shreya Kumar
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfSonaliAjankar
 
OS Process Chapter 3.pdf
OS Process Chapter 3.pdfOS Process Chapter 3.pdf
OS Process Chapter 3.pdfKp Sharma
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.pptKeyreSebre
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithmBinal Parekh
 
Process management in os
Process management in osProcess management in os
Process management in osMiong Lazaro
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)Harshit Jain
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdfAliyanAbbas1
 
dataprocess using different technology.ppt
dataprocess using different technology.pptdataprocess using different technology.ppt
dataprocess using different technology.pptssuserf6eb9b
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptxyashu23
 

Similar to First Come First Serve (20)

ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
scheduling Uni processor Long-term .ppt
scheduling  Uni processor Long-term .pptscheduling  Uni processor Long-term .ppt
scheduling Uni processor Long-term .ppt
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 
UNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptxUNIPROCESS SCHEDULING.pptx
UNIPROCESS SCHEDULING.pptx
 
Cpu scheduling algorithm on windows
Cpu scheduling algorithm on windowsCpu scheduling algorithm on windows
Cpu scheduling algorithm on windows
 
programming .pptx
programming .pptxprogramming .pptx
programming .pptx
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.
 
Os2
Os2Os2
Os2
 
ch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdfch5_CPU Scheduling_part1.pdf
ch5_CPU Scheduling_part1.pdf
 
OS Process Chapter 3.pdf
OS Process Chapter 3.pdfOS Process Chapter 3.pdf
OS Process Chapter 3.pdf
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithm
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Fcfs and sjf
Fcfs and sjfFcfs and sjf
Fcfs and sjf
 
Cpu Scheduling Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
dataprocess using different technology.ppt
dataprocess using different technology.pptdataprocess using different technology.ppt
dataprocess using different technology.ppt
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptx
 

Recently uploaded

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 

Recently uploaded (20)

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 

First Come First Serve

  • 1. FIRST COME FIRST SERVE SUBMITTED BY: Harmanjit Dhillon(B130010121) Manav Khurana (B130010122) Leepika Kapoor (B130010123) Priyanka (B130010125) Kanav Sood (B130010126)
  • 2. INTRODUCTION : • First-Come First-Serve (FCFS) – One ready queue; – OS runs the process at head of the queue; – New processes come in at the end of the queue; – Running process does not give up the CPU until it terminates or it performs IO. • Round Robin – Process runs for one time slice, then moved to back of the queue; – Each process gets equal share of the CPU.
  • 3. • Shortest Time to Completion (STCF) – Process with shortest computation time left is picked; – Varianted by preemption; – Requires knowledge of the future. • Exponential Queue (Multi-level Feedback) – Gives newly runnable processes a high priority and a very short time slice; – If process uses up the time slice without blocking then decrease priority by one and double time slice for next time; – Solves both efficiency and response time problems.
  • 4. Scheduling Algorithms First-Come First-Serve • Non-preemptive FCFS (no priority scheme) – Simplest implementation of scheduling algorithms – Used on timeshared systems (with timer interruption) • Non-preemptive FCFS (with priority scheme) – Next highest priority process is picked when CPU is yielded
  • 5.  Once process grabs CPU, former keeps latter until completion Rarely used in real-time  Preemptive FCFS (with priority scheme)
  • 6. Scheduling Algorithms Round Robin • Used mostly on timeshared systems • Allows multiple users slices of the CPU on a “round robin” basis • Majority of users have the same priority • Not a popular scheme with dynamic priority systems
  • 7. Scheduling Algorithms Shortest Time to Completion • Priorities are assigned in inverse order of time needed for completion of the entire job • Minimizes average turnaround time • Exponential averaging is used to estimate the process’ burst duration • A job exceeding the resource estimation is aborted • A job exceeding the time estimation is preempted • Store estimated value in PCB for the current burst, and compare with actual value
  • 8. Scheduling Algorithms Exponential Queues • Popular in interactive systems • A single queue is maintained for each priority level • A new process is added at the end of the highest priority queue – It is alloted a single time quantum when it reaches the front • If it yields the CPU within the time quantum, it is moved to the rear • If not, it is placed at the rear of the next queue down • Dispatcher selects the head of the highest priority queue – A job that “succeeds” moves up – A job that “fails” moves down
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Evaluated Program And Parameters The Program helps us find the total time a person has worked on to set up his career and waited to work at the position he desired to in his life.
  • 22. Parameters: 1.Number Of Processes: The total number of tasks he has performed to achieve his job and his job as well 2.Process Name: The process he has worked on in his entire life. 3.Process Time: The time he has spent on one process. 4.Waiting Time: The time he has waited to enter every task.
  • 23. 5. Total Waiting Time:The Total amount of time waited for this event, in hundredths of a second. 6. Average Waiting Time:The total amount of waiting time divided by the number of incoming calls answered.
  • 24. Program Worked On • #include<stdio.h> • #include<conio.h> • int main() • { • char p[100][100]; • int tot=0,wt[10],pt[10],z,n,i; • float avg=0; • printf("n enter number of process :"); • scanf("%d",&n); • wt[0]=0;
  • 25. • for(i=1;i<=n;i++) • { • printf("n enter process %d name : ",i); • scanf("%s",&p[i-1]); • printf("enter process time : "); • scanf("%d",&pt[i-1]); • wt[i]=wt[i-1]+pt[i-1]; • tot=tot+wt[i]; • } • avg=(float)tot/n; • printf("n p-nametp-timetw-time n");
  • 26. • for (i=0;i<n;i++) • printf("%st%dt%dn",p[i],pt[i],wt[i]); • printf("n total waiting time : %d n avg wating time : %f nn ",tot ,avg); • getch(); • }
  • 27. Output To The Program
  • 28. Scheduling Algorithms Implementation - Analysis • Direct analysis – Pick a task set and observe results • Apply queuing theory to obtain results – Multi-level feedback queue scheme • Simulations of scheme implementations – FCFS, RR, STCF • Innovations and projections – “Lottery” scheduling and “own” algorithm
  • 29. Scheduling Algorithms References 1) Cooling, J.E. Software Design for Real-Time Systems. Chapman & Hall, London, UK: 1995. 2) Stallings, William. Operating Systems: Internals and Design Principles. Upper Saddle River, NJ: Prentice Hall, 1998. 3) http://www.cs.wisc.edu/~bart/537/lecturenotes/s11.html - viewed on 03/24/2000 4) Savitzky, Stephen. Real-Time Microprocessor Systems. Van Nostrand Reinhold Company, N.Y.: 1985. 5) Undergraduate Operating System Course Notes (Ottawa University, 1998)