SlideShare a Scribd company logo
First Come First
Serve
Shortest Job First

BY: Adeel Rasheed

 FCFS is very simple - Just a FIFO queue
 Like customers waiting in line at the bank or the
post office.
FCFS (Non- Preemptive)
Process Burst Time Arrival Time
P1 24 0
P2 3 0
P3 3 0
Gantt Chart:
Turn Around Time:
T.A.T=Termination Time – Arrival Time
Process T.T – A.T T.A.T
P1 24 – 0 24
P2 27 – 0 27
P3 30 – 0 30
Avg T.A.T =
𝟐𝟒+𝟐𝟕+𝟑𝟎
𝟑
= 27
Waiting Time:
That’s time who process wait for start execution
Process Waiting Time
P1 0
P2 24
P3 27
Avg W.T =
𝟎+𝟐𝟒+𝟐𝟕
𝟑
= 17

Example

 Low priority running process anytime when a high
priority process enters into a ready state.
 Pick a little job first.
FCFS (Preemptive)
Process Burst Time Arrival Time
P1 24 0
P2 3 0
P3 3 0
Gantt Chart:
Turn Around Time:
T.A.T=Termination Time – Arrival Time
Process T.T – A.T T.A.T
P1 30 – 0 30
P2 3 – 0 3
P3 6 – 0 6
Avg T.A.T =
𝟑𝟎+𝟑+𝟔
𝟑
= 13
Waiting Time:
That’s time who process wait for start execution
Process Waiting Time
P1 6
P2 0
P3 3
Avg W.T =
𝟔+𝟎+𝟑
𝟑
= 3

 Idea behind the SJF algorithm is to pick the quickest
fastest little job that needs to be done, get it out of the
way first, and then pick the next smallest fastest job
to do next.
SJF
Process Burst Time Arrival Time
P1 6 0
P2 8 0
P3 7 0
P4 3 0
Gantt Chart:
 Turn Around Time:
T.A.T=Termination Time – Arrival Time
Process T.T – A.T T.A.T
P1 9 – 0 9
P2 24 – 0 24
P3 16 – 0 16
P4 3 – 0 3
Avg T.A.T =
𝟗+𝟐𝟒+𝟏𝟔+𝟑
𝟒
= 13
Waiting Time:
That’s time who process wait for start execution
Process Waiting Time
P1 3
P2 16
P3 9
P4 0
Avg W.T =
𝟑+𝟏𝟔+𝟗+𝟎
𝟒
= 7


More Related Content

What's hot

16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMSkoolkampus
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
sathish sak
 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
Dhananjaysinh Jhala
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its types
Rameesha Sadaqat
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
03446940736
 
Round Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmRound Robin Scheduling Algorithm
Round Robin Scheduling Algorithm
Adeel Rasheed
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
usmankiyani1
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithmsPiyush Rochwani
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
Balwant Gorad
 
Dbms 4NF & 5NF
Dbms 4NF & 5NFDbms 4NF & 5NF
Dbms 4NF & 5NF
Soham Kansodaria
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
FarihaHabib123
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
Shubham Dwivedi
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
Janki Shah
 
Processes and threads
Processes and threadsProcesses and threads
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
InteX Research Lab
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
hashim102
 
FCFS scheduling OS
FCFS scheduling OSFCFS scheduling OS
FCFS scheduling OS
Totan Banik
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
Ganesh Solanke
 
RAID LEVELS
RAID LEVELSRAID LEVELS
RAID LEVELS
Uzair Khan
 

What's hot (20)

16. Concurrency Control in DBMS
16. Concurrency Control in DBMS16. Concurrency Control in DBMS
16. Concurrency Control in DBMS
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
2 phase locking protocol DBMS
2 phase locking protocol DBMS2 phase locking protocol DBMS
2 phase locking protocol DBMS
 
Data structure & its types
Data structure & its typesData structure & its types
Data structure & its types
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
 
Round Robin Scheduling Algorithm
Round Robin Scheduling AlgorithmRound Robin Scheduling Algorithm
Round Robin Scheduling Algorithm
 
CPU Scheduling in OS Presentation
CPU Scheduling in OS  PresentationCPU Scheduling in OS  Presentation
CPU Scheduling in OS Presentation
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
 
Dbms 4NF & 5NF
Dbms 4NF & 5NFDbms 4NF & 5NF
Dbms 4NF & 5NF
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
Concurrency Control in Database Management System
Concurrency Control in Database Management SystemConcurrency Control in Database Management System
Concurrency Control in Database Management System
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
FCFS scheduling OS
FCFS scheduling OSFCFS scheduling OS
FCFS scheduling OS
 
Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
RAID LEVELS
RAID LEVELSRAID LEVELS
RAID LEVELS
 
Recursion
RecursionRecursion
Recursion
 

More from Adeel Rasheed

Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)
Adeel Rasheed
 
Religious Conflict
Religious ConflictReligious Conflict
Religious Conflict
Adeel Rasheed
 
R Studio (Report)
R Studio (Report)R Studio (Report)
R Studio (Report)
Adeel Rasheed
 
History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)
Adeel Rasheed
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
Adeel Rasheed
 
Zooming and Its Types
Zooming and Its TypesZooming and Its Types
Zooming and Its Types
Adeel Rasheed
 
User Interface & Its Types
User Interface & Its TypesUser Interface & Its Types
User Interface & Its Types
Adeel Rasheed
 
Questions About Android Application Development
Questions About Android Application DevelopmentQuestions About Android Application Development
Questions About Android Application Development
Adeel Rasheed
 
Human and Machine Learning
Human and Machine LearningHuman and Machine Learning
Human and Machine Learning
Adeel Rasheed
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
Adeel Rasheed
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
Adeel Rasheed
 
Computer Crime
Computer CrimeComputer Crime
Computer Crime
Adeel Rasheed
 
Privacy and Security Information
Privacy and Security InformationPrivacy and Security Information
Privacy and Security Information
Adeel Rasheed
 
Code of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & StandardsCode of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & Standards
Adeel Rasheed
 
Self Adaptive Systems
Self Adaptive SystemsSelf Adaptive Systems
Self Adaptive Systems
Adeel Rasheed
 
Ethernet - LAN
Ethernet - LANEthernet - LAN
Ethernet - LAN
Adeel Rasheed
 
Synchronous and Asynchronous Transmission
Synchronous and Asynchronous TransmissionSynchronous and Asynchronous Transmission
Synchronous and Asynchronous Transmission
Adeel Rasheed
 
Classes and Objects in C#
Classes and Objects in C#Classes and Objects in C#
Classes and Objects in C#
Adeel Rasheed
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
Adeel Rasheed
 
Applications of Computer
Applications of ComputerApplications of Computer
Applications of Computer
Adeel Rasheed
 

More from Adeel Rasheed (20)

Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)Multan to Sukkur Motorway (M5)
Multan to Sukkur Motorway (M5)
 
Religious Conflict
Religious ConflictReligious Conflict
Religious Conflict
 
R Studio (Report)
R Studio (Report)R Studio (Report)
R Studio (Report)
 
History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)History of computer (1st to 5th Generations)
History of computer (1st to 5th Generations)
 
CSS Cascade Style Sheet
CSS Cascade Style SheetCSS Cascade Style Sheet
CSS Cascade Style Sheet
 
Zooming and Its Types
Zooming and Its TypesZooming and Its Types
Zooming and Its Types
 
User Interface & Its Types
User Interface & Its TypesUser Interface & Its Types
User Interface & Its Types
 
Questions About Android Application Development
Questions About Android Application DevelopmentQuestions About Android Application Development
Questions About Android Application Development
 
Human and Machine Learning
Human and Machine LearningHuman and Machine Learning
Human and Machine Learning
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
 
IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6IP Address - IPv4 & IPv6
IP Address - IPv4 & IPv6
 
Computer Crime
Computer CrimeComputer Crime
Computer Crime
 
Privacy and Security Information
Privacy and Security InformationPrivacy and Security Information
Privacy and Security Information
 
Code of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & StandardsCode of Conduct - Code of Practice & Standards
Code of Conduct - Code of Practice & Standards
 
Self Adaptive Systems
Self Adaptive SystemsSelf Adaptive Systems
Self Adaptive Systems
 
Ethernet - LAN
Ethernet - LANEthernet - LAN
Ethernet - LAN
 
Synchronous and Asynchronous Transmission
Synchronous and Asynchronous TransmissionSynchronous and Asynchronous Transmission
Synchronous and Asynchronous Transmission
 
Classes and Objects in C#
Classes and Objects in C#Classes and Objects in C#
Classes and Objects in C#
 
Intel Microprocessors 8086 Documentation
Intel Microprocessors 8086 DocumentationIntel Microprocessors 8086 Documentation
Intel Microprocessors 8086 Documentation
 
Applications of Computer
Applications of ComputerApplications of Computer
Applications of Computer
 

Recently uploaded

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

First Come First Serve & Shortest Job First-(FCFS & SJF)

  • 3.   FCFS is very simple - Just a FIFO queue  Like customers waiting in line at the bank or the post office. FCFS (Non- Preemptive) Process Burst Time Arrival Time P1 24 0 P2 3 0 P3 3 0
  • 4. Gantt Chart: Turn Around Time: T.A.T=Termination Time – Arrival Time Process T.T – A.T T.A.T P1 24 – 0 24 P2 27 – 0 27 P3 30 – 0 30 Avg T.A.T = 𝟐𝟒+𝟐𝟕+𝟑𝟎 𝟑 = 27
  • 5. Waiting Time: That’s time who process wait for start execution Process Waiting Time P1 0 P2 24 P3 27 Avg W.T = 𝟎+𝟐𝟒+𝟐𝟕 𝟑 = 17
  • 7.   Low priority running process anytime when a high priority process enters into a ready state.  Pick a little job first. FCFS (Preemptive) Process Burst Time Arrival Time P1 24 0 P2 3 0 P3 3 0
  • 8. Gantt Chart: Turn Around Time: T.A.T=Termination Time – Arrival Time Process T.T – A.T T.A.T P1 30 – 0 30 P2 3 – 0 3 P3 6 – 0 6 Avg T.A.T = 𝟑𝟎+𝟑+𝟔 𝟑 = 13
  • 9. Waiting Time: That’s time who process wait for start execution Process Waiting Time P1 6 P2 0 P3 3 Avg W.T = 𝟔+𝟎+𝟑 𝟑 = 3
  • 10.   Idea behind the SJF algorithm is to pick the quickest fastest little job that needs to be done, get it out of the way first, and then pick the next smallest fastest job to do next. SJF Process Burst Time Arrival Time P1 6 0 P2 8 0 P3 7 0 P4 3 0
  • 11. Gantt Chart:  Turn Around Time: T.A.T=Termination Time – Arrival Time Process T.T – A.T T.A.T P1 9 – 0 9 P2 24 – 0 24 P3 16 – 0 16 P4 3 – 0 3 Avg T.A.T = 𝟗+𝟐𝟒+𝟏𝟔+𝟑 𝟒 = 13
  • 12. Waiting Time: That’s time who process wait for start execution Process Waiting Time P1 3 P2 16 P3 9 P4 0 Avg W.T = 𝟑+𝟏𝟔+𝟗+𝟎 𝟒 = 7
  • 13.