SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
Operating System
Lecture 05
Mohammad Ashraful Islam
Lecturer
Department of Computer Science and Engineering,
Jahangirnagar University
Scheduling Criteria
 CPU utilization – keep the CPU as busy as possible
 Throughput – # of processes that complete their execution per time
unit
 Turnaround time – amount of time to execute a particular process
 TAT = CT - AT
 Waiting time – amount of time a process has been waiting in the ready
queue
 TAT - BT
 Response time – amount of time it takes from when a request was
submitted until the first response is produced, not output (for time-
sharing environment)
Scheduling Algorithm Optimization Criteria
 Max CPU utilization
 Max throughput
 Min turnaround time
 Min waiting time
 Min response time
OS Scheduling Algorithms
 First-Come, First-Served (FCFS) Scheduling
 Shortest-Job-Next (SJN) Scheduling
 Priority Scheduling
 Shortest Remaining Time
 Round Robin(RR) Scheduling
 Multiple-Level Queues Scheduling
First-Come, First-Served (FCFS) Scheduling
 Jobs are executed on first come, first serve basis.
 It is a non-preemptive, pre-emptive scheduling algorithm.
 Easy to understand and implement.
 Its implementation is based on FIFO queue.
 Poor in performance as average wait time is high.
 Implemented in early batch systems.
First-Come, First-Served (FCFS) Scheduling
Process Burst Time
P1 24
P2 3
P3 3
 Suppose that the processes arrive in the order: P1 , P2 , P3
The Gantt Chart for the schedule is:
 Waiting time for P1 = 0; P2 = 24; P3 = 27
 Average waiting time: (0 + 24 + 27)/3 = 17
P P P
1 2 3
0 24 30
27
First-Come, First-Served (FCFS) Scheduling
EXAMPLE DATA:
Process Arrival Burst
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
 Waiting time for P1 = ?; P2 = ?; P3 = ?; P4 = ?
 Average waiting time = ?
 Calculate TAT for each process.
 Average TAT = ?
Shortest-Job-First (SJF) Scheduling
 Associate with each process the length of its next CPU burst
 Use these lengths to schedule the process with the shortest time
 SJF is optimal – gives minimum average waiting time for a given set of
processes
 The difficulty is knowing the length of the next CPU request
 Could ask the user
Shortest-Job-First (SJF) Scheduling

Process Arrival Time Burst Time
P1 0 6
P2 0 8
P3 0 7
P4 0 3
Consider the below processes available in the ready queue for execution, with arrival
time as 0 for all and given burst times.
 SJF scheduling chart
 Average waiting time = (3 + 16 + 9 + 0) / 4 = 7
P3
0 3 24
P4
P1
16
9
P2
Shortest-Job-First (SJF) Scheduling

Process Arrival Time Burst Time
P1 0.0 6
P2 2.0 8
P3 4.0 7
P4 5.0 3
 Determine SJF scheduling chart
 Determine AWT, ATAT
Preemptive Shortest-Job-First (SJF) Scheduling
EXAMPLE DATA:
Process Arrival Service
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
1. Determine Wait Time for each process,
2. Average Waiting Time,
3. TAT for each process,
4. Average TAT.
Preemptive Shortest-Job-First (SJF) Scheduling
EXAMPLE DATA:
Process Arrival Service
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
Determine Wait Time, Average Waiting Time, TAT,
Average TAT.
Shortest Running Time Scheduling
EXAMPLE DATA:
Process Arrival Service
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
Determine Wait Time, Average Waiting Time, TAT,
Average TAT.
Round Robin Scheduling
Round Robin(RR) scheduling algorithm is mainly designed for time-sharing
systems. This algorithm is similar to FCFS scheduling, but in Round
Robin(RR) scheduling, preemption is added which enables the system to
switch between processes.
➢ A fixed time is allotted to each process, called a quantum, for execution.
➢ Once a process is executed for the given time period that process is
preempted and another process executes for the given time period.
➢ Context switching is used to save states of preempted processes.
Round Robin Scheduling
EXAMPLE DATA: Quantum=3
Process Arrival Service
Time Time
1 0 8
2 0 4
3 0 9
4 0 5
Determine Wait Time, Average Waiting Time, TAT,
Average TAT.
Round Robin Scheduling
EXAMPLE DATA:
Process Arrival Service
Time Time
1 0 8
2 1 4
3 2 9
4 3 5
Determine Wait Time, Average Waiting Time, TAT,
Average TAT.
Time Sharing vs Parallel System
 Parallel Processing Systems are designed to speed up the execution of
programs by dividing the program into multiple fragments and processing
these fragments simultaneously. Such systems are multiprocessor systems
also known as tightly coupled systems. Parallel systems deal with the
simultaneous use of multiple computer resources that can include a single
computer with multiple processors, several computers connected by a
network to form a parallel processing cluster or a combination of both.
 Parallel computing is an evolution of serial computing where the jobs are
broken into discrete parts that can be executed concurrently. Each part is
further broken down into a series of instructions. Instructions from each part
execute simultaneously on different CPUs.
Time Sharing vs Parallel System
 Time-sharing is a technique that enables many people, located at various
terminals, to use a particular computer system at the same time. Time-
sharing or multitasking is a logical extension of multi-programming.
Processor's time which is shared among multiple users simultaneously is
termed time-sharing.
 Multiple jobs are executed by the CPU by switching between them, but the
switches occur so frequently. Thus, the user can receive an immediate
response. For example, in transaction processing, the processor executes
each user program in a short burst or quantum of computation. That is,
if n users are present, then each user can get a time quantum. When the user
submits the command, the response time is in few seconds at most.
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Classical problem of synchronization
Classical problem of synchronizationClassical problem of synchronization
Classical problem of synchronization
Shakshi Ranawat
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
Piyush Rochwani
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
hodcsencet
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
Mohd Arif
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
Nitish Gulati
 

Was ist angesagt? (20)

Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
operating system lecture notes
operating system lecture notesoperating system lecture notes
operating system lecture notes
 
Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Pipes in Windows and Linux.
Pipes in Windows and Linux.Pipes in Windows and Linux.
Pipes in Windows and Linux.
 
Linked List
Linked ListLinked List
Linked List
 
Classical problem of synchronization
Classical problem of synchronizationClassical problem of synchronization
Classical problem of synchronization
 
Allocation of Frames & Thrashing
Allocation of Frames & ThrashingAllocation of Frames & Thrashing
Allocation of Frames & Thrashing
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
Deadlock
DeadlockDeadlock
Deadlock
 
Page replacement algorithms
Page replacement algorithmsPage replacement algorithms
Page replacement algorithms
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
 
Mutual exclusion and sync
Mutual exclusion and syncMutual exclusion and sync
Mutual exclusion and sync
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Code generation in Compiler Design
Code generation in Compiler DesignCode generation in Compiler Design
Code generation in Compiler Design
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
OS UNIT – 2 - Process Management
OS UNIT – 2 - Process ManagementOS UNIT – 2 - Process Management
OS UNIT – 2 - Process Management
 
Dinive conquer algorithm
Dinive conquer algorithmDinive conquer algorithm
Dinive conquer algorithm
 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
 
Searching
SearchingSearching
Searching
 
Universal turing coastus
Universal turing coastusUniversal turing coastus
Universal turing coastus
 

Ähnlich wie Process Scheduling Algorithms.pdf

Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
Yogesh Santhan
 
Cpu scheduling(suresh)
Cpu scheduling(suresh)Cpu scheduling(suresh)
Cpu scheduling(suresh)
Nagarajan
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
tech2click
 
cpu sechduling
cpu sechduling cpu sechduling
cpu sechduling
gopi7
 
Ch6
Ch6Ch6
Ch6
C.U
 
Csc4320 chapter 5 2
Csc4320 chapter 5 2Csc4320 chapter 5 2
Csc4320 chapter 5 2
pri534
 
Scheduling algorithm (chammu)
Scheduling algorithm (chammu)Scheduling algorithm (chammu)
Scheduling algorithm (chammu)
Nagarajan
 

Ähnlich wie Process Scheduling Algorithms.pdf (20)

Process management in os
Process management in osProcess management in os
Process management in os
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
 
Cpu scheduling(suresh)
Cpu scheduling(suresh)Cpu scheduling(suresh)
Cpu scheduling(suresh)
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Ch05
Ch05Ch05
Ch05
 
cpu sechduling
cpu sechduling cpu sechduling
cpu sechduling
 
Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
 
Cp usched 2
Cp usched  2Cp usched  2
Cp usched 2
 
Scheduling
SchedulingScheduling
Scheduling
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Ch6
Ch6Ch6
Ch6
 
Csc4320 chapter 5 2
Csc4320 chapter 5 2Csc4320 chapter 5 2
Csc4320 chapter 5 2
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Os..
Os..Os..
Os..
 
CPU Scheduling Part-II.pdf
CPU Scheduling Part-II.pdfCPU Scheduling Part-II.pdf
CPU Scheduling Part-II.pdf
 
exp 3.docx
exp 3.docxexp 3.docx
exp 3.docx
 
Scheduling algorithm (chammu)
Scheduling algorithm (chammu)Scheduling algorithm (chammu)
Scheduling algorithm (chammu)
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Process Scheduling Algorithms.pdf

  • 1. Operating System Lecture 05 Mohammad Ashraful Islam Lecturer Department of Computer Science and Engineering, Jahangirnagar University
  • 2. Scheduling Criteria  CPU utilization – keep the CPU as busy as possible  Throughput – # of processes that complete their execution per time unit  Turnaround time – amount of time to execute a particular process  TAT = CT - AT  Waiting time – amount of time a process has been waiting in the ready queue  TAT - BT  Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time- sharing environment)
  • 3. Scheduling Algorithm Optimization Criteria  Max CPU utilization  Max throughput  Min turnaround time  Min waiting time  Min response time
  • 4. OS Scheduling Algorithms  First-Come, First-Served (FCFS) Scheduling  Shortest-Job-Next (SJN) Scheduling  Priority Scheduling  Shortest Remaining Time  Round Robin(RR) Scheduling  Multiple-Level Queues Scheduling
  • 5. First-Come, First-Served (FCFS) Scheduling  Jobs are executed on first come, first serve basis.  It is a non-preemptive, pre-emptive scheduling algorithm.  Easy to understand and implement.  Its implementation is based on FIFO queue.  Poor in performance as average wait time is high.  Implemented in early batch systems.
  • 6. First-Come, First-Served (FCFS) Scheduling Process Burst Time P1 24 P2 3 P3 3  Suppose that the processes arrive in the order: P1 , P2 , P3 The Gantt Chart for the schedule is:  Waiting time for P1 = 0; P2 = 24; P3 = 27  Average waiting time: (0 + 24 + 27)/3 = 17 P P P 1 2 3 0 24 30 27
  • 7. First-Come, First-Served (FCFS) Scheduling EXAMPLE DATA: Process Arrival Burst Time Time 1 0 8 2 1 4 3 2 9 4 3 5  Waiting time for P1 = ?; P2 = ?; P3 = ?; P4 = ?  Average waiting time = ?  Calculate TAT for each process.  Average TAT = ?
  • 8. Shortest-Job-First (SJF) Scheduling  Associate with each process the length of its next CPU burst  Use these lengths to schedule the process with the shortest time  SJF is optimal – gives minimum average waiting time for a given set of processes  The difficulty is knowing the length of the next CPU request  Could ask the user
  • 9. Shortest-Job-First (SJF) Scheduling  Process Arrival Time Burst Time P1 0 6 P2 0 8 P3 0 7 P4 0 3 Consider the below processes available in the ready queue for execution, with arrival time as 0 for all and given burst times.  SJF scheduling chart  Average waiting time = (3 + 16 + 9 + 0) / 4 = 7 P3 0 3 24 P4 P1 16 9 P2
  • 10. Shortest-Job-First (SJF) Scheduling  Process Arrival Time Burst Time P1 0.0 6 P2 2.0 8 P3 4.0 7 P4 5.0 3  Determine SJF scheduling chart  Determine AWT, ATAT
  • 11. Preemptive Shortest-Job-First (SJF) Scheduling EXAMPLE DATA: Process Arrival Service Time Time 1 0 8 2 1 4 3 2 9 4 3 5 1. Determine Wait Time for each process, 2. Average Waiting Time, 3. TAT for each process, 4. Average TAT.
  • 12. Preemptive Shortest-Job-First (SJF) Scheduling EXAMPLE DATA: Process Arrival Service Time Time 1 0 8 2 1 4 3 2 9 4 3 5 Determine Wait Time, Average Waiting Time, TAT, Average TAT.
  • 13. Shortest Running Time Scheduling EXAMPLE DATA: Process Arrival Service Time Time 1 0 8 2 1 4 3 2 9 4 3 5 Determine Wait Time, Average Waiting Time, TAT, Average TAT.
  • 14. Round Robin Scheduling Round Robin(RR) scheduling algorithm is mainly designed for time-sharing systems. This algorithm is similar to FCFS scheduling, but in Round Robin(RR) scheduling, preemption is added which enables the system to switch between processes. ➢ A fixed time is allotted to each process, called a quantum, for execution. ➢ Once a process is executed for the given time period that process is preempted and another process executes for the given time period. ➢ Context switching is used to save states of preempted processes.
  • 15. Round Robin Scheduling EXAMPLE DATA: Quantum=3 Process Arrival Service Time Time 1 0 8 2 0 4 3 0 9 4 0 5 Determine Wait Time, Average Waiting Time, TAT, Average TAT.
  • 16. Round Robin Scheduling EXAMPLE DATA: Process Arrival Service Time Time 1 0 8 2 1 4 3 2 9 4 3 5 Determine Wait Time, Average Waiting Time, TAT, Average TAT.
  • 17. Time Sharing vs Parallel System  Parallel Processing Systems are designed to speed up the execution of programs by dividing the program into multiple fragments and processing these fragments simultaneously. Such systems are multiprocessor systems also known as tightly coupled systems. Parallel systems deal with the simultaneous use of multiple computer resources that can include a single computer with multiple processors, several computers connected by a network to form a parallel processing cluster or a combination of both.  Parallel computing is an evolution of serial computing where the jobs are broken into discrete parts that can be executed concurrently. Each part is further broken down into a series of instructions. Instructions from each part execute simultaneously on different CPUs.
  • 18. Time Sharing vs Parallel System  Time-sharing is a technique that enables many people, located at various terminals, to use a particular computer system at the same time. Time- sharing or multitasking is a logical extension of multi-programming. Processor's time which is shared among multiple users simultaneously is termed time-sharing.  Multiple jobs are executed by the CPU by switching between them, but the switches occur so frequently. Thus, the user can receive an immediate response. For example, in transaction processing, the processor executes each user program in a short burst or quantum of computation. That is, if n users are present, then each user can get a time quantum. When the user submits the command, the response time is in few seconds at most.