Microproject
Microproject
Microproject
PROJECT REPORT
ON
“Program In ‘C’ For Round Robin Scheduling Algorithm”
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE
AWARD OF DIPLOMA IN COMPUTER ENGINEERING
SUBMITTED TO
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI
SUBMITTED BY
This is to certify that the project report entitled “Program In ‘C’ For Round Robin
Scheduling Algorithm” Was successfully completed by student of fifth semester
diploma in computer engineering.
In partial fulfillment of the requirements for the award of the diploma in computer
engineering and submitted to the department of computer of samarth polytechnic,
belhe work carried out during a period for the academic year 2023-24 as per
curriculum .
I’m really thankful to our course the principal Prof. Kapile A.S. and the HOD
Prof.Nawale S.K. samarth polytechnic, belhe for his invaluable guidance and
assistance, without which the accomplishment of the task would have never been
possible.
I also thanks Prof. Nawale S.K. for giving this opportunity to explore into the real
world and realize the interrelation without which a Project can never progress. In this
present project I have chosen the topic- “Program In ‘C’ For Round Robin
Scheduling Algorithm”
I also thankful to parents, friend and all staff of computer engineering department,
for providing us relevant information and necessary clarifications, and great support.
Academic Year:-2023-24 Name of Faculty:- Prof. Nawale S.K. Course: Computer Engineering
Course Code :- CO-5I Subject Code :- 22516 Semester:-V
Title of Project: “”
a) PracticalOutcomes..................................................................................................................................................
..................................................................................................................................................................................
.............................................................................................................................................
Marksoutof4
Marksoutof6
For performance in
Roll For performance
Student Name oral / Total out of 10
No. in group
presentation(D5
activity(D5 Col.8)
Col.9)
Prof.Nawale S.K.
(Name & Signature of Faculty)
INDEX
Sr.No. Name of content
01 Rationale
Rationale :-
A round robin is an arrangement of choosing all elements in a
group equally in some rational order, usually from the top to the
bottom of a list and then starting again at the top of the list and so
on. 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. Experiment analysis reveals that the proposed algorithm
produces better average turnaround time, average waiting time and
fewer number of context switches than existing algorithms.
P1 6
P2 5
P3 3
P4 2
P5 7
Time quantum=2.
Flowchart:-
C Code For Round Robin Scheduling Algorithm
#include<stdio.h>
#include<conio.h>
void main()
{
// initlialize the variable name
int i, NOP, sum=0,count=0, y, quant, wt=0, tat=0, at[10], bt[10], temp[10];
float avg_wt, avg_tat;
printf(" Total number of process in the system: ");
scanf("%d", &NOP);
y = NOP; // Assign the number of process to variable y
// Use for loop to enter the details of the process like Arrival time and the
Burst Time
for(i=0; i<NOP; i++)
{
printf("\n Enter the Arrival and Burst time of the Process[%d]\n", i+1);
printf(" Arrival time is: \t"); // Accept arrival time
scanf("%d", &at[i]);
printf(" \nBurst time is: \t"); // Accept the Burst time
scanf("%d", &bt[i]);
temp[i] = bt[i]; // store the burst time in temp array
}
// Accept the Time qunat
printf("Enter the Time Quantum for the process: \t");
scanf("%d", &quant);
// Display the process No, burst time, Turn Around Time and the waiting
time
printf("\n Process No \t\t Burst Time \t\t TAT \t\t Waiting Time ");
for(sum=0, i = 0; y!=0; )
{
if(temp[i] <= quant && temp[i] > 0) // define the conditions
{
sum = sum + temp[i];
temp[i] = 0;
count=1;
}
else if(temp[i] > 0)
{
temp[i] = temp[i] - quant;
sum = sum + quant;
}
if(temp[i]==0 && count==1)
{
y--; //decrement the process no.
printf("\nProcess No[%d] \t\t %d\t\t\t\t %d\t\t\t %d", i+1, bt[i], sum-at[i],
sum-at[i]-
bt[i]);
wt = wt+sum-at[i]-bt[i];
tat = tat+sum-at[i];
count =0;
}
if(i==NOP-1)
{
i=0;
}
else if(at[i+1]<=sum)
{
i++;
}
else
{
i=0;
}
}
}
Output :-
Actual Resources Used:
Sr.no Resource Specifications
1. Computer System Processor Intel Core I3, RAM
8GB, 1TB.HDD
2. Operating System Windows 10
3. Software Turbo C++, Ubantu
4. Microsoft Word Microsoft office 2010
Skill Developed :