• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Fundamental » OS » What is Round Robin Scheduling (RRS)? – Definition & Example
Next →
← Prev

What is Round Robin Scheduling (RRS)? – Definition & Example

By Dinesh Thakur

Definition: Round robin scheduling is the preemptive scheduling in which every process get executed in a cyclic way, i.e. in this a particular time slice is allotted to each process which is known as time quantum. Every process, which is present in the queue for processing, CPU is assigned to that process for that time quantum. Now, if the execution of the process gets completed in that time quantum, then the process will get terminate otherwise the process will again go to the ready queue, and the previous process will wait for the turn to complete its execution.

The scheduling drives its name from the principle which is known as a round robin in which every person takes an equal share of anything they have in turn. We make use of round robin scheduling algorithm in a time-sharing system. It is generally used by those operating systems which has multiple clients to make use of resources.

Example of Round Robin Scheduling

In this example, we will take six processes P1, P2, P3, P4, P5 and P6 whose arrival and burst time are given in the table. The time quantum is 4 units.

ProcessesArrival TimeBurst Time
P105
P216
P323
P531
P645
P754

Now we have to maintain the ready queue and gantt chart in the algorithm again and again as their structures get changed after every scheduling.
Ready Queue
Initially, at time 0, the process P1 will be executed for the 4 units of time quantum. So, in the starting in ready queue, there will be only one process P1.

P1
5

Gantt chart

P1 will be executed for 4 units.

Ready Queue
Mid-while, during the execution of process P1, some other processes like P2, P3,P4 and P5 arises for the execution in the ready queue. As we know P1 has not completed since its time is 5 and we have 4 units of time slice. So, 1 unit is still left. So it will be again added at the back in ready queue.

P2      P3    P4    P5    P1   
63151

GANTT chart
Now the gantt chart will be like this.

Ready queue
During the execution time of P2, another process P6 arrives in the ready queue. Also, we know that P2 has not completed yet as its 2 units of burst time is still left. So, again we will add P2 in the ready queue at the back.

P3P4P5P1P6P2
315142

GANTT CHART

Now, P3 will be executed for 3 units of time slice as its bursts time is 3 units.

Ready queue
Now the process P3 is completed in the time slice of 4 units. So, we will not add P3 in the ready queue and now we will execute the next process P4.

P4P5P6P1P2
15142

GANTT CHART

Ready queue
The next process in the queue is P5 which has 5 units of bursts time. Again, the process P4 gets completed as it has only 1 unit of bursts time.

P5P6P1P2
5142

GANTT chart

Ready Queue
Now the process has not completed as 1 unit of burst time is left. So we add it in the ready queue in the back.

P1P6P2P5
1421

GANTT chart
Now the process P1 will be executed so that it can complete its execution as its turn has come. As we know it requires only 1 unit of bursts time, so it will get completed.

Ready queue
As P1 also get completed. So , we will not add it to the ready queue. Now only three processes are left which are P6, P2 and P5.

P6P2P5
421

GANTT CHART
Now P6 has units of 4 units of bursts time. So it will get executed in 4 units of time slice.

Ready queue
Since P6 is executed completely. so, we will not add it to the ready queue. Now only 2 processes left in the ready queue which are P2 and P5.

P2P5
21

GANTT CHART
Now P2 will be executed again and it requires only 2 units of bursts time. So now it will be completed.

Ready queue
Only process left in the ready queue is P5 which requires only 1 unit of bursts time. As we know our time slice is of 4 units. So it will get completed in the next burst.

P5
1

GANTT CHART
The process P5 will get executed until it get completed as it is the only process left in the ready queue.

Now we will calculate turn around time, completion time and average waiting time which is shown in the below table.
Turn around time= completion time- arrival time
Waiting time= turn around time – burst time

Round robin Result Table

Average waiting time= (12+16+6+8+15+11)/6= 76/6 = 12.66 units

Advantages of round robin scheduling

• It is simple.
• It is easy to implement.
• It deals with all process without any priority.
• In this, all jobs get easily allocated to CPU.
• Like first come first serve scheduling, in this no problem of convoy effect or starvation is there.
• Round robin scheduling does not depend upon burst time. So it can be easily implementable on the system.

Disadvantages of round robin scheduling

• Since round robin scheduling depends upon time quantum. So deciding a perfect time quantum for scheduling is a very difficult task.
• If the time quantum is higher, then the response time of the system will also be higher.
• If the time quantum is lower, then there is higher context switching overhead.

You’ll also like:

  1. What is Priority Scheduling? – Definition
  2. What is Disk Scheduling? Type of Disk Scheduling
  3. CPU Scheduling Algorithms
  4. What is Preemptive Scheduling?
  5. First Come First Serve(FCFS) Scheduling
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Operating System

Operating System & Types

    • Operating System - Software
    • Operating System - Definition
    • Operating System - Types
    • Operating System - Functions
    • Operating System - Characteristics
    • Operating System - Services
    • Operating System - Multiprogramming
    • Operating System - Time Sharing
    • Operating System - Multiprocessor
    • Operating System - Distributed
    • Operating System - Batch Processing
    • Operating System - Real-Time
    • Operating System - Multitasking
    • Operating System - Network(NOS)
    • Operating System - Multi-User
    • Operating System - Batch
    • Operating System - External Structure
    • Operating System - MS-DOS
    • Operating System - System Software
    • Operating System - Kernel
    • Operating System - Main Functions

Operating System Scheduling

    • Operating System - Scheduling
    • Operating System - Disk Scheduling
    • Operating System - Process
    • Operating System - Round Robin
    • Operating System - CPU Scheduling
    • Operating System - (FCFS) Scheduling
    • Operating System - Preemptive
    • Operating System - Priority Scheduling

Memory

    • Operating System - Memory
    • Operating System - Cache Memory
    • Operating System - Virtual Memory
    • Operating System - Memory Partition

Operating System - What is

    • Operating System - Booting
    • Operating System - Files & Types
    • Operating System - Shell
    • Operating System - Real Time System
    • Operating System - Demand Paging
    • Operating System - Multi Tasking
    • Operating System - Parallel Processing
    • Operating System - Swapping
    • Operating System - Spooling
    • Operating System - App Software
    • Operating System - Dead Lock
    • Operating System - Batch Processing
    • Operating System - Semaphore
    • Operating System - Variable Partitioned
    • Operating System - File System
    • Operating System - Cipher Text
    • Operating System - OS/2
    • Operating System - CONFIG.SYS
    • Operating System - Segmentation
    • Operating System - CLI

Some Other Tutorials

  • OS - Application Vs System Software
  • OS - Commands in DOS
  • OS - Process States
  • OS - System Components
  • OS - Inter-Process
  • OS - Computer Languages
  • OS - System Architecture
  • OS - Directory Structure
  • OS - Process Management
  • OS - Deadlock Prevention
  • OS - Thread Vs Process
  • OS - File Sharing

Other Links

  • Operating System - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW