KEMBAR78
OSY Report | PDF | Scheduling (Computing) | Computing
0% found this document useful (0 votes)
15 views12 pages

OSY Report

The document is a micro-project report on implementing the Round Robin scheduling algorithm in C, submitted by students as part of their Diploma in Computer Technology. It outlines the rationale, aims, methodology, and outcomes of the project, emphasizing the algorithm's fairness in CPU time allocation and its applications in operating systems. The report also includes a literature review, resources used, skills developed, and references for further reading.

Uploaded by

Jay Kadlag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

OSY Report

The document is a micro-project report on implementing the Round Robin scheduling algorithm in C, submitted by students as part of their Diploma in Computer Technology. It outlines the rationale, aims, methodology, and outcomes of the project, emphasizing the algorithm's fairness in CPU time allocation and its applications in operating systems. The report also includes a literature review, resources used, skills developed, and references for further reading.

Uploaded by

Jay Kadlag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

A MICRO-PROJECT REPORT

ON

" Program In ‘C’ For Round Robin Scheduling Algorithm"

In the partial fulfillment of the requirement for the Diploma


In

Computer Technology

Submitted By

126. Dabhade Nikhil Ramesh


139. Gunajal Rushikesh Ravindra
147. Kadlag Janmenjay Ganesh
150. Kanawade Sanket Balasabeb

Under the Guidance of Ms. Borhade S. S.

Amrutvahini Sheti and Shiksha Vikas Sanstha’s


Amrutvahini Polytechnic, Sangamner.
2024-2025
Amrutvahini Sheti and Shiksha Vikas Sanstha’s

Amrutvahini Polytechnic, Sangamner

Department of Computer Technology

CERTIFICATE
This is to Certify that

126. Dabhade Nikhil Ramesh


139. Gunajal Rushikesh Ravindra
147. Kadlag Janmenjay Ganesh
150. Kanawade Sanket Balasabeb

Has satisfactorily carried out and completed the


micro-project entitled:

" Program In ‘C’ For Round Robin Scheduling Algorithm"

As prescribed by MSBTE, Mumbai, as part of syllabus for


the partial fulfillment of Diploma in Computer Technology

Operating System (22516)


For the academic year 2024-25

Prof- Ms. Borhade S. S Prof- Mr. Kale. G. B


(Guide) (HOD)
Index

Sr.no Name

1 Rationale

2 Aim/Benefits

3 Course Outcomes Achieved

4 Literature Review

5 Actual Resource Used

6 Actual methodology followed

7 Output of the Micro project

8 Skill Developed/Learning Outcomes

9 Applications

10 References
MICRO PROJECT REPORT
Annexure II

Program In ‘C’ For Round Robin Scheduling Algorithm

1.0 Rationale:
Round-robin is a CPU scheduling method that gives every process an equal share of CPU
time in a repeating cycle. In this algorithm, each process is given a set amount of time to use
the CPU, known as the "time quantum" or "time slice." If a process finishes within its time
slice, it completes its task. Otherwise, it is paused and placed back in the ready queue,
waiting for its next turn to run until it finishes. Round-robin ensures that no process is
ignored (removing starvation) by sharing CPU time fairly among all processes. Studies show
that this approach leads to better average turnaround time, average waiting time, and fewer
context switches compared to other scheduling algorithms.

2.0 Aim of the micro-project:

1. The Round Robin scheduling algorithm aims to distribute CPU time fairly among all
processes by giving each process a fixed time to run (time quantum).
2. It ensures that resources are shared equally, reduces response times for interactive tasks,
and keeps the system running smoothly.
3. The goals include:
- Fairness in resource allocation
- Low latency (quick response)
- Efficient context switching
- Avoiding starvation (no process is ignored)
- Providing predictability in scheduling.

4. While Round Robin works well in some situations, it might not be the best choice for all
workloads. The choice of scheduling algorithm should match the system's specific
needs and goals.
3.0 Course Outcomes Addressed:

CO No. Course Outcome Statement

CI501.1 Operate and install the operating system and configure it.

CI501.2 Explain the use of operating system tools to perform various functions.

CI501.3 Execute process commands for performing process management operations.

CI501.4 Solve turnaround time and average waiting time for different scheduling
algorithms.

CI501.5 Solve the efficiency of different memory management techniques and use
file management techniques.

4.0 Literature Review:


The term "Round Robin" originally comes from sailors who used it to describe a way of
signing a petition in a circle so that no single person could be identified as the leader. This
idea may have come from the French term "rond ruban," meaning "round ribbon," used in a
similar way.

In computer science, Round Robin is a CPU scheduling algorithm. In this method, each
process is given a fixed amount of time (called a time slice) to use the CPU, and the processes
are managed in a repeating cycle. It is simple to use and ensures fairness, meaning no process
is left waiting for too long (starvation-free).

Round Robin is one of the most commonly used techniques for CPU scheduling. It is
pre-emptive, which means that each process can only use the CPU for a set time before it is
paused and another process gets its turn. The downside of Round Robin is that it has more
overhead due to frequent context switching (switching between processes).

Overall, Round Robin is based on equal time sharing among tasks in a circular queue without
any priority, making it straightforward and easy to implement. Each task gets a time slice to
execute, focusing on fair resource allocation.
5.0 Actual Resources Used –

Sr.
Name of Resource/material Specifications Quantity Remarks
No.
Computer System with broad Zenith PC 4GB
1. specifications RAM

2. Operating System Linux Mint/Win 8.1

Office, Sublime 1
3. Software Text Editor,
Browser

4. Keyboard Keychron

5. Mouse Dell

6.0. Actual Methodology Followed –

The Round Robin scheduling algorithm is mainly used in time-sharing systems. It is similar to the
First-Come, First-Served (FCFS) method, but Round Robin adds preemption to switch between
processes after a set time.

A small unit of time, called time quantum or time slice, is used in this algorithm. This time
quantum usually ranges from 10 to 100 milliseconds. The ready queue, which holds the processes
waiting for the CPU, is managed in a circular order.

The CPU scheduler moves through the ready queue, giving each process CPU time for up to 1
time quantum. The processes are organized in FIFO (First In, First Out) order, and new
processes are added to the end of the queue.

When the scheduler picks a process, it assigns it to the CPU, and the CPU executes the process for
the given time slice. Two scenarios can occur:
1. If the burst time (time required for execution) of the process is less than the time quantum, the
process completes its work and releases the CPU.
2. If the burst time is greater than the time quantum, an interrupt stops the process, and it is moved
to the end of the queue for another turn later.

Then, the CPU scheduler picks the next process from the queue for execution. In Round Robin
scheduling, the average waiting time can be longer compared to other methods because of the
repeated context switching between processes.
To implement Round Robin scheduling, processes in the ready queue are managed in FIFO
order, with new processes added to the end. However, the average waiting time under the Round
Robin policy can be quite long due to this cycle of process switching.

Example: Calculating Average Waiting Time using Round Robin Scheduling

Consider 5 processes with the following Process IDs (PID) and Burst Times:

Process ID (PID) Burst Time (units)

P1 6

P2 5

P3 2

P4 3

P5 7

Time Quantum = 2 units


Assumption: All processes arrive at time 0.

Step-by-Step Solution:

We can represent the execution of these processes using a Gantt Chart:

P1 P2 P3 P4 P5 P1 P2 P4 P5 P1 P2 P5 P5 P5
0 2 4 6 8 10 12 14 15 17 19 20 22 23

Explanation:

1. P1 is picked first from the ready queue and executes for 2 units of time (time slice = 2).

2. Then P2 is picked and also executes for 2 units of time.

3. P3 is next in line, and since its burst time is only 2 units, it completes its execution in one go.

4. P4 and P5 are then picked and executed for 2 units of time each.

5. The scheduler continues in a circular order, going back to P1, P2, and so on, until all
processes complete their execution.
Waiting Time Calculation

Waiting Time = Turnaround Time - Burst Time

● P1: Turnaround Time = 19, Burst Time = 6


Waiting Time = 19 - 6 = 13

● P2: Turnaround Time = 20, Burst Time = 5


Waiting Time = 20 - 5 = 15

● P3: Turnaround Time = 6, Burst Time = 2


Waiting Time = 6 - 2 = 4

● P4: Turnaround Time = 15, Burst Time = 3


Waiting Time = 15 - 3 = 12

● P5: Turnaround Time = 23, Burst Time = 7


Waiting Time = 23 - 7 = 16

Average Waiting Time -

Average Waiting Time = (13 + 15 + 4 + 12 + 16) / 5

Average Waiting Time = 12 units


Flowchart:
C Program:
7.0 Output of Micro-project –
8.0 SkillsDeveloped :

- From this we learnt about CPU scheduling in the operating system.


- Also, we got to know about finding average waiting time and average turnaround
time for each process executing in the operating system.
- Round Robin scheduling is an algorithm mainly used by operating systems and
applications that serve multiple clients that request to use resources.

9.0 Applications of this Micro-Project:

Round-Robin is a useful tool for having your team generate ideas, without being
influenced unduly by others in the group. This method is also used to ensure that
everyone on your team gets an equal say in the ideas that you generate. We can
use either the written and verbal variations of this technique.

10.0 Reference:

1. [Round Robin Algorithm in Operating System - GeeksforGeeks]


(https://www.geeksforgeeks.org/round-robin-algorithm-in-operating-system-2/)

2. [Round Robin Program in C - JavaTpoint]


(https://www.javatpoint.com/round-robin-program-in-c)

3. [Round Robin Scheduling Program in C - PrepBytes]


(https://www.prepbytes.com/blog/c-programming/round-robin-scheduling-program-in-c/)

You might also like