SlideShare une entreprise Scribd logo
1  sur  16
SCHEDULING AND ITS TYPES
 Scheduling is a method by which threads, processes or data flows are given access to system
resources.
 The need for scheduling algorithm arises from the requirement for most modern systems to
preform multitasking and multiplexing.
The common scheduling models are:
1. Cooperative Scheduling of ready tasks in a circular queue
2. Cooperative Scheduling with Precedence Constraints
3. Cyclic scheduling of periodic tasks and Round Robin Time Slicing Scheduling
4. Pre-emptive Scheduling
5. Scheduling using ‘Earliest Deadline First’ (EDF) precedence
6. Rate Monotonic Scheduling using ‘higher rate of events occurrence First’ precedence
7. Fixed Times Scheduling
8. Scheduling of Periodic, sporadic and aperiodic Tasks
9. Advanced scheduling algorithms using the probabilistic Timed Petri nets (Stochastic) or Multi
Thread Graph for the multiprocessors and complex distributed systems
CYCLIC SCHEDULING
 A cyclic scheduling model is a scheduling concept in which a set of activities are
repeated an indefinite number of times.
 Let us assume that we have periodically occurring three tasks.
 Let the first task execute at time frames t1,t1+(Tcycle), t1+(2Tcycle) …
The second task occurs at t2, t2 +(Tcycle), t2+(2Tcycle) …
The third task occurs at t3, t3+Tcycle, t3+(2Tcycle)…
 Tcycle is the time for repeating the cycle of execution of tasks in order 1,2,3 and
equals start of task 1 time frame to end of task 3 time frame.
 Tcycle is period after which each task time frame allotted to that repeats.
 Each task has the same priority for execution in the cyclic mode.
 Cycling scheduling is very efficient for handling periodic tasks when the number of
tasks is small.
 An example of cyclic scheduling is Orchestra Playing
Robots.
 First the director robot sends the musical notes. Then,
the playing robots receive and acknowledge to the
director.
 In next cycle, the master robot again sends the musical
notes.
 The cyclic scheduler is used in this case to send and
receive signals by each robot after the cycle period.
ROUND ROBIN SCHEDULING
 Round robin is one of the oldest, simplest and fairest algorithm.
 Widely used model in traditional OS.
 The name of the algorithm comes from the round-robin principle known
from other fields, where each person takes an equal share of something in
turn.
 Round robin means that each ready task runs turn by turn only in a cyclic
queue for a limited time slice, Tslice.
Tslice = Tcycle/ N
N= Number of tasks
 Time slice is minimum time assigned for each task to be processed. It
can vary for different processes.
 Round robin is a hybrid model of clock-driven model (for example, cyclic
model) as well as event driven (for example, pre-emptive).
 A real time system responds to the event within a bound time limit and
within an explicit time.
UNDERSTANDING ROUND ROBIN WITH AN EXAMPLE
Suppose after every 20ms there is a stream of coded messages reaching Port A of
an embedded system. The multiple processes consist of 5 tasks as follows
Time slicing is done as follows:
WORST CASE LATENCY
Worst case latency is the maximum time taken for execution of all the tasks.
Tworst = {(dti+ sti + eti )1 + (dti+ sti + eti )2 +...+ (dti+ sti + eti )N-1 + (dti+ sti + eti )N} +
tISR
Where,
dt = detection time when a task is brought into the list
st = switching time from one task to another
et = task execution time
tISR = sum of all execution times for the ISRs
CASE 1
 Let us consider the case where each task is executed once and finishes off in
one cycle itself.
 When a task finishes the execution before the maximum time it can take,
there is a waiting period between two cycles.
 The worst-case latency for any task is then, Tworst = N X tslice .
 A task may periodically need execution. The period for the required repeat
execution of a task is an integral multiple of tslice.
CASE 2: ALTERNATIVE MODEL STRATEGY
 In Case 2 we have certain tasks which are executed more than once and do
not finish in one cycle.
 Alternate model strategy includes decomposition of a task that takes the
abnormally long time to be executed.
 The decomposition can be into two or four or more tasks.
 Then one set of tasks (say the odd numbered tasks) can run in one time slice,
t'slice and the another set of tasks (say the even numbered tasks) can run in
another time slice, t''slice .
CASE 3: DECOMPOSITION INTO A NUMBER OF
SEQUENTIAL STATES
 Another alternate strategy is decomposition of the long time taking task into
a number of sequential states or a number of node-places and transitions as
in finite state machine (FSM).
 Then one of its states or transitions can run in the first cycle, the next state
in the second cycle and so on.
 This task then reduces the response times of the remaining tasks that are
executed after a state change.
VoIP EXAMPLE
 Consider a VoIP (Voice Over Internet Protocol)
router. It routes the packets to N destinations from
N sources. It has N calls to route.
 Each of N tasks is allotted a time slice and is
cyclically executed for routing packet from a
source to its destination.
 This is an example of round robin with time slicing
scheduling.
ADVANTAGES OF ROUND ROBIN SCHEDULING
 It is a simple scheduling algorithm and easy to implement in software.
 Round robin scheduling is fair in the sense that every process gets an equal
share of the CPU.
 If we know the number of processes on the run queue, we can know the
worst-case response time for a process.
 Every process will be executed by CPU for fixed interval of time (which is set
as Tslice ). So in this way no process left waiting for its turn to be executed by
the CPU.
DISADVANTAGES OF ROUND ROBIN SCHEDULING
 Sometimes 2 processes may have the same priority, but one of them might get
suspended in the middle of execution, as it works on first come first serve
basis.
 If slicing time is too low, the processor output is reduced. More time is spent
on context switching.
QUESTIONS?
SEMINAR BY:
SIRIGAURI. N
RAGHAV. S

Contenu connexe

Tendances

Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
vivek223
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
nikeAthena
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
Tech_MX
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
Anuj Modi
 

Tendances (20)

cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Multithreading
MultithreadingMultithreading
Multithreading
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
CPU scheduling algorithms in OS
CPU scheduling algorithms in OSCPU scheduling algorithms in OS
CPU scheduling algorithms in OS
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
Branch prediction
Branch predictionBranch prediction
Branch prediction
 
Approaches to real time scheduling
Approaches to real time schedulingApproaches to real time scheduling
Approaches to real time scheduling
 
Virtual memory
Virtual memoryVirtual memory
Virtual memory
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 

Similaire à Round robin scheduling

Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
tech2click
 
cpu sechduling
cpu sechduling cpu sechduling
cpu sechduling
gopi7
 
capacityshifting1
capacityshifting1capacityshifting1
capacityshifting1
Gokul Vasan
 

Similaire à Round robin scheduling (20)

exp 3.docx
exp 3.docxexp 3.docx
exp 3.docx
 
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
Comparision of different Round Robin Scheduling Algorithm using Dynamic Time ...
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Implementation and evaluation of novel scheduler of UC/OS (RTOS)
Implementation and evaluation of novel scheduler of UC/OS (RTOS)Implementation and evaluation of novel scheduler of UC/OS (RTOS)
Implementation and evaluation of novel scheduler of UC/OS (RTOS)
 
STATISTICAL APPROACH TO DETERMINE MOST EFFICIENT VALUE FOR TIME QUANTUM IN RO...
STATISTICAL APPROACH TO DETERMINE MOST EFFICIENT VALUE FOR TIME QUANTUM IN RO...STATISTICAL APPROACH TO DETERMINE MOST EFFICIENT VALUE FOR TIME QUANTUM IN RO...
STATISTICAL APPROACH TO DETERMINE MOST EFFICIENT VALUE FOR TIME QUANTUM IN RO...
 
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdf
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
 
Ch05
Ch05Ch05
Ch05
 
cpu sechduling
cpu sechduling cpu sechduling
cpu sechduling
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Cpu scheduling algorithm on windows
Cpu scheduling algorithm on windowsCpu scheduling algorithm on windows
Cpu scheduling algorithm on windows
 
Rate.docx
Rate.docxRate.docx
Rate.docx
 
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUMAN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
 
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUMAN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
 
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUMAN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
AN OPTIMIZED ROUND ROBIN CPU SCHEDULING ALGORITHM WITH DYNAMIC TIME QUANTUM
 
An optimized round robin cpu scheduling
An optimized round robin cpu schedulingAn optimized round robin cpu scheduling
An optimized round robin cpu scheduling
 
Optimal Round Robin CPU Scheduling Algorithm using Manhattan Distance
Optimal Round Robin CPU Scheduling Algorithm using Manhattan Distance Optimal Round Robin CPU Scheduling Algorithm using Manhattan Distance
Optimal Round Robin CPU Scheduling Algorithm using Manhattan Distance
 
capacityshifting1
capacityshifting1capacityshifting1
capacityshifting1
 
Process management
Process managementProcess management
Process management
 
Window scheduling algorithm
Window scheduling algorithmWindow scheduling algorithm
Window scheduling algorithm
 

Dernier

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 

Round robin scheduling

  • 1.
  • 2. SCHEDULING AND ITS TYPES  Scheduling is a method by which threads, processes or data flows are given access to system resources.  The need for scheduling algorithm arises from the requirement for most modern systems to preform multitasking and multiplexing. The common scheduling models are: 1. Cooperative Scheduling of ready tasks in a circular queue 2. Cooperative Scheduling with Precedence Constraints 3. Cyclic scheduling of periodic tasks and Round Robin Time Slicing Scheduling 4. Pre-emptive Scheduling 5. Scheduling using ‘Earliest Deadline First’ (EDF) precedence 6. Rate Monotonic Scheduling using ‘higher rate of events occurrence First’ precedence 7. Fixed Times Scheduling 8. Scheduling of Periodic, sporadic and aperiodic Tasks 9. Advanced scheduling algorithms using the probabilistic Timed Petri nets (Stochastic) or Multi Thread Graph for the multiprocessors and complex distributed systems
  • 3. CYCLIC SCHEDULING  A cyclic scheduling model is a scheduling concept in which a set of activities are repeated an indefinite number of times.  Let us assume that we have periodically occurring three tasks.  Let the first task execute at time frames t1,t1+(Tcycle), t1+(2Tcycle) … The second task occurs at t2, t2 +(Tcycle), t2+(2Tcycle) … The third task occurs at t3, t3+Tcycle, t3+(2Tcycle)…  Tcycle is the time for repeating the cycle of execution of tasks in order 1,2,3 and equals start of task 1 time frame to end of task 3 time frame.  Tcycle is period after which each task time frame allotted to that repeats.  Each task has the same priority for execution in the cyclic mode.  Cycling scheduling is very efficient for handling periodic tasks when the number of tasks is small.
  • 4.  An example of cyclic scheduling is Orchestra Playing Robots.  First the director robot sends the musical notes. Then, the playing robots receive and acknowledge to the director.  In next cycle, the master robot again sends the musical notes.  The cyclic scheduler is used in this case to send and receive signals by each robot after the cycle period.
  • 5. ROUND ROBIN SCHEDULING  Round robin is one of the oldest, simplest and fairest algorithm.  Widely used model in traditional OS.  The name of the algorithm comes from the round-robin principle known from other fields, where each person takes an equal share of something in turn.  Round robin means that each ready task runs turn by turn only in a cyclic queue for a limited time slice, Tslice. Tslice = Tcycle/ N N= Number of tasks  Time slice is minimum time assigned for each task to be processed. It can vary for different processes.  Round robin is a hybrid model of clock-driven model (for example, cyclic model) as well as event driven (for example, pre-emptive).  A real time system responds to the event within a bound time limit and within an explicit time.
  • 6. UNDERSTANDING ROUND ROBIN WITH AN EXAMPLE Suppose after every 20ms there is a stream of coded messages reaching Port A of an embedded system. The multiple processes consist of 5 tasks as follows
  • 7. Time slicing is done as follows:
  • 8. WORST CASE LATENCY Worst case latency is the maximum time taken for execution of all the tasks. Tworst = {(dti+ sti + eti )1 + (dti+ sti + eti )2 +...+ (dti+ sti + eti )N-1 + (dti+ sti + eti )N} + tISR Where, dt = detection time when a task is brought into the list st = switching time from one task to another et = task execution time tISR = sum of all execution times for the ISRs
  • 9. CASE 1  Let us consider the case where each task is executed once and finishes off in one cycle itself.  When a task finishes the execution before the maximum time it can take, there is a waiting period between two cycles.  The worst-case latency for any task is then, Tworst = N X tslice .  A task may periodically need execution. The period for the required repeat execution of a task is an integral multiple of tslice.
  • 10. CASE 2: ALTERNATIVE MODEL STRATEGY  In Case 2 we have certain tasks which are executed more than once and do not finish in one cycle.  Alternate model strategy includes decomposition of a task that takes the abnormally long time to be executed.  The decomposition can be into two or four or more tasks.  Then one set of tasks (say the odd numbered tasks) can run in one time slice, t'slice and the another set of tasks (say the even numbered tasks) can run in another time slice, t''slice .
  • 11. CASE 3: DECOMPOSITION INTO A NUMBER OF SEQUENTIAL STATES  Another alternate strategy is decomposition of the long time taking task into a number of sequential states or a number of node-places and transitions as in finite state machine (FSM).  Then one of its states or transitions can run in the first cycle, the next state in the second cycle and so on.  This task then reduces the response times of the remaining tasks that are executed after a state change.
  • 12. VoIP EXAMPLE  Consider a VoIP (Voice Over Internet Protocol) router. It routes the packets to N destinations from N sources. It has N calls to route.  Each of N tasks is allotted a time slice and is cyclically executed for routing packet from a source to its destination.  This is an example of round robin with time slicing scheduling.
  • 13. ADVANTAGES OF ROUND ROBIN SCHEDULING  It is a simple scheduling algorithm and easy to implement in software.  Round robin scheduling is fair in the sense that every process gets an equal share of the CPU.  If we know the number of processes on the run queue, we can know the worst-case response time for a process.  Every process will be executed by CPU for fixed interval of time (which is set as Tslice ). So in this way no process left waiting for its turn to be executed by the CPU.
  • 14. DISADVANTAGES OF ROUND ROBIN SCHEDULING  Sometimes 2 processes may have the same priority, but one of them might get suspended in the middle of execution, as it works on first come first serve basis.  If slicing time is too low, the processor output is reduced. More time is spent on context switching.