MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
BHIVARABAI SAVANT COLLEGE OF ENGINEERING &
RESEARCH
MICRO PROJECT
Academic year: 2023-24
TITLE OF PROJECT
“ PROGRAM IN ‘C’ FOR ROUND ROBIN SCHEDULING ALGORITHM”
Course : Operating System
Course code: 22516
Scanned by CamScanner
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that
Mr./MsVinodMarne,NakulSharma,DipakPernekar,ShrawanBora Roll
No.16,13,11,21 of TYCO 5th Semester of Diploma in Computer Engineering
ofInstitute, BSCOER POLYTECNIC (Code: 1606) has completed the
MicroProject satisfactorily in Subject – operating system(22516)for the
academic year 2023- 24 as prescribed in the curriculum.
Group Details:
SR NO Name Roll No Enrollment No
1 Vinod Raghunath Marne 16 2116060089
2 Nakul Badriprasad Sharma 13 2116060078
3 Dipak Shankar Pernekar 11 2116060075
4 Shrawan Ashok Bora 21 2116060098
Place: Pune Date: ………………………
Subject Teacher Head of the Department Principle
Scanned by CamScanner
Group Details:
Sr.N o Name of group members Roll Enrollment
No No
1 Pawan Dipak Mohite 07 2116060067
2 Saket Prashant Ambede 06 2116060066
3 Ashish Ghanshyam Kumbhar 04 2116060064
Name Of Guide: Prof. Mali.S.H
Scanned by CamScanner
INDEX
Report Part(A)
Sr. no. Content Page no.
1. Aim of Micro Project
2. Course Outcomes Addressed
3. Proposed Methodology
4. Action Plan
5. Actual Resources Used
Report Part (B)
1. Rationale
2. Aim of Micro-Project
3. Course Outcomes Achieved
4. Literature Review
5. Actual Methodology Followed
6. Actual Resources Used
7. Project Output
8. Skills Developed
9. Evaluation Sheet (A)
10. Evaluation Sheet (B)
Scanned by CamScanner
1.0: AIM OF MICROPROJECT:
PROGRAM IN ‘C’ FOR ROUND ROBIN ALGORITHM.
2.8 : COURSE OUTCOMES ADDRESSED:
A. Install operating system and configure it.
B. Use operating system tools to perform various functions.
C. Execute process commands for performing process management operations.
D. Apply scheduling algorithms to calculate turnaround time and average waiting time.
E. Calculate efficiency of memory management techniques.
F. Apply file management techniques.
3.0: PROPOSED METHODOLOGY:
In this micro project we may like to put forth information about Round Robin Scheduling
Algorithm. Round Robin (RR) scheduling algorithm is widely used scheduling algorithm in
multitasking. It ensures fairness and starvation free execution of processes. Choosing the
time quantum in RR is very crucial as small time slice results in large number of context
switches and large time quantum increases the response time. Experimental analysis
reveals that the proposed algorithm produces better average turnaround time, average
waiting time and fewer number of context switches than existing algorithms.
Scanned by CamScanner
1.3: RESOURCES REQUIRED:
Books:
1. Operating System Concepts – Silberchatz, Galvin – John Wiley and Sons, Ninth
Edition, 2015, ISBN: 978-51-265-5427-0
2. Operating System – Godbole, Achyut S. – Tata McGraw Hill Education, 2015,
ISBN: 978-00-705-9113-4
3. Operating System – Dr. Rajendra Kawale – Devraj Publications, Mumbai, ISBN:
978-81-933551-1-4
Electronic Sources:
1. https://en.wikipedia.org/wiki/Round-robin_scheduling
2. https://www.irjet.net/archives/V3/i3/IRJET-V3I3285.pdf
3. https://www.thecrazyprogrammer.com/2015/09/round-robin-scheduling-program-in-
c.html
Scanned by CamScanner
Scanned by CamScanner
1.0: RATIONALE:
Round Robin (RR) scheduling algorithm is widely used scheduling algorithm in multitasking. It
ensures fairness and starvation free execution of processes. Choosing the time quantum in RR is
very crucial as small time slice results in large number of context switches and large time quantum
increases the response time. Experimental analysis reveals that the proposed algorithm produces
better average turnaround time, average waiting time and fewer number of context switches
than existing algorithms.
2.0: AIM OF MICRO PROJECT:
To develop a program in ‘C’ demonstrating the Round Robin Scheduling Algorithm.
3.0: COURSE OUTCOMES ACHIEVED:
• Install operating system and configure it.
• Use operating system tools to perform various functions.
• Execute process commands for performing process management operations.
• Apply scheduling algorithms to calculate turnaround time and average waiting time.
4.0: LITERATURE REVIEW:
Round Robin is a CPU scheduling algorithm where each process is assigned a fixed
time slot in a cyclic way. It is simple, easy to implement. And starvation-free as all
processes get fair share of CPU. One of the most commonly used technique in CPU
scheduling as a core. It is preemptive as processes are assigned CPU only for a fixed slice
of time at the most. The disadvantage of it is more overhead of context switching.
Scanned by CamScanner
5.0: ACTUAL METHODOLOGY FOLLOWED:
Description:
The Round Robin (RR) scheduling algorithm is designed especially for time sharing systems. RR is
the pre-emptive process scheduling algorithm.
Round robin scheduling is the pre-emptive version of First Come First Serve (FCFS) scheduling.
Processes are dispatched in First In First Out (FIFO) sequence but each process is allowed to run
for only a limited amount of time.
It is similar to FCFS scheduling but pre-emption is added to switch between processes. A small unit
of time called a Time Quantum or Time Slice is defined.
A time quantum is generally from 10 to 100 milliseconds. The ready queue is treated as a circular
queue. The CPU scheduler goes around the ready queue, allocating CPU to each process for a
time interval of up to 1 time quantum.
In RR scheduling process are dispatched FIFO but are given a limited amount of processor time
called a time slice or time quantum.
If a process does not complete before its quantum expires, the system preempts it and gives the
processor to the next waiting process. The system then places the pre- empted process at the
back of the ready queue.
In the fig. process P1 is dispatched to a processor, where it executes either until completion, in
which case it exits the system, or until its time slice expires, at which point is pre-empted and
placed at the tail of the ready queue. The scheduler then dispatches process P2.
Scanned by CamScanner
To implement RR scheduling we keep ready queue as FIFO queue of processes. New processes are
added to the tail of the ready queue. The average waiting time under the RR policy however is often
quite long.
Example of round robin scheduling algorithm:
Assume there are 5 processes with process ID and burst time given below
PID Burst Time
P1 6
P2 5
P3 2
P4 3
P5 7
Time quantum
Assume that all process arrives at 0.
Now, we will calculate average waiting time for these processes to complete.
Solution:
We can represent execution of above processes using GANTT chart as shown below –
Round Robin Example Gantt Chart – 1
Explanation:
First p1 process is picked from the ready queue and executes for 2 per unit time (timeslice = 2). If arrival
time is not available, it behaves like FCFS with time slice.
After P2 is executed for 2 per unit time, P3 is picked up from the ready queue. SinceP3 burst time is 2
so it will finish the process execution at once.
Scanned by CamScanner
Like P1 & P2 process execution, P4 and p5 will execute 2 time slices and then again itwill start from P1
same as above.
Waiting time = Turn Around Time – Burst Time
P1 = 19 – 6 = 13
P2 = 20 – 5 = 15
P3 = 6 – 2 = 4
P4 = 15 – 3 = 12
P5 = 23 – 7 = 16
Average waiting time = (13+15+4+12+16) / 5 = 12.
Flowchart:
Scanned by CamScanner
C program code:
#include<stdio.h> int main()
{
int count,j,n,time,remain,flag=0,time_quantum;
int wait_time=0,turnaround_time=0,at[10],bt[10],rt[10]; printf("Enter
Total Process:\t ");
scanf("%d",&n); remain=n;
for(count=0;count<n;count++)
{
printf("Enter Arrival Time and Burst Time for Process Process
Number %d :",count+1);
scanf("%d",&at[count]);
scanf("%d",&bt[count]);
rt[count]=bt[count];
}
printf("Enter Time Quantum:\t"); scanf("%d",&time_quantum);
printf("\n\nProcess\t|Turnaround Time|Waiting Time\n\n");
for(time=0,count=0;remain!=0;)
{
if(rt[count]<=time_quantum && rt[count]>0)
{
time+=rt[count]; rt[count]=0;
flag=1;
}
else if(rt[count]>0)
{
rt[count]-=time_quantum; time+=time_quantum;
}
if(rt[count]==0 && flag==1)
{
remain--;
printf("P[%d]\t|\t%d\t|\t%d\n",count+1,time-at[count],time-
at[count]-bt[count]);
wait_time+=time-at[count]-bt[count];
turnaround_time+=time-at[count]; flag=0;
Scanned by CamScanner
}
if(count==n-1)
count=0;
else
if(at[count+1]<
=time) count++;
else
count=0;
}
Scanned by CamScanner
7.0: OUTPUT OF THE PROGRAM:
Scanned by CamScanner
8.0: SKILLS DEVELOPED:
From this we learnt about CPU scheduling in operating system.
Also, we got to know about finding average waiting time and average turnaround time
each process executing in 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 MICRO PROJECT:
This can be used as reference for people who want to learn Round Robin
Algorithm. This algorithm dramatically improves average response time. By limiting
each task to a certain amount of time, the operating system can ensure that it can
cycle through all ready tasks, giving each one a chance to run.
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
Scanned by CamScanner
WEEKLY PROGRESS REPORT
MICROPROJECT
SR.NO WEEK ACTIVITY PERFORMANCE SIGN OF GUIDE DATE
1 1st Discussion and finalization of topics
2 2nd Preparation and submission of Abstract
3 3rd Literature Review
4 4th Collection of Data
5 5th Collection of Data
6 6th Discussion and outline of Content
7 7th Formulation of Content
8 8th Editing and proof Reading of Content
9 9th Compilation of Report And Presentation
10 10th Seminar
11 11th Viva voce
12 12th Final Submission of Microproject
Sign of the students Sign of the faculty
Scanned by CamScanner
Evaluation Sheet for the Micro Project
Academic Year: 2023-24 Name of the Faculty:Prof.mali S.h
Course: Operating system Course code :22516
Semester: V
Title of the project:” PROGRAM IN ‘C’ FOR ROUND ROBIN SCHEDULING ALGORITHM”
CO’s:1) Use operating system tool to perform various function.
2] Apply file management technique.
Marks out of 6 for Marks out of 4for
performance in performance in
group activity oral/ presentation
Roll No Student Name (D5 Col.8) (D5 Col.9) Total out of 10
16 VINOD
MARNE
13 NAKUL SHARMA
11 DIPAK PERNEKAR
21 SHRAWAN BORA
Prof. mali .S,h (Signature of Faculty)
Scanned by CamScanner