<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Round Robin | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/round-robin/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Mon, 29 Mar 2010 16:48:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C program for Round Robin</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-round-robin/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-round-robin/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Mon, 29 Mar 2010 16:48:08 +0000</pubDate>
				<category><![CDATA[Advanced programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[Round Robin]]></category>
		<category><![CDATA[download]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=1124</guid>

					<description><![CDATA[<p>C program for Round Robin #include #include #include int t,n,s,bt[10],ct[10],ta[10],w[10],lat[10],wav,taav; int allover() { for(int i=0;i0) return 0; return 1; } void select(int p) { w[p]+=t-lat[p]; if(ct[p]>=s) { ct[p]-=s; t+=s; } else { t+=ct[p]; ct[p]=0; } if(ct[p]==0) ta[p]=t; lat[p]=t; } void main() { int p=0;t=0;taav=0;wav=0; clrscr(); printf("Enter the number of process : "); scanf("%d",&#038;n); printf("\n Enter</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-round-robin/">C program for Round Robin</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>C program for Round Robin</p>
<pre lang="c">

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
int t,n,s,bt[10],ct[10],ta[10],w[10],lat[10],wav,taav;
int allover()
 {
   for(int i=0;i<n;i++)
   if(ct[i]>0)
   return 0;
   return 1;
 }
void select(int p)
 {
   w[p]+=t-lat[p];
   if(ct[p]>=s)
   {
     ct[p]-=s;
     t+=s;
   }
 else
  {
    t+=ct[p];
    ct[p]=0;
  }
   if(ct[p]==0)
    ta[p]=t;
   lat[p]=t;
 }
void main()
 {
   int p=0;t=0;taav=0;wav=0;
   clrscr();
   printf("Enter the number of process : ");
   scanf("%d",&n);
   printf("\n Enter the time slice : ");
   scanf("%d",&s);
   printf("\nEnter the burst time of processes \n ");
   for(int i=0;i<n;i++)
   {
     printf("\n process %d : ",i+1);
     scanf("%d",&#038;bt[i]);
     ct[i]=bt[i];
     lat[i]=0;
   }
 while(!allover())
  {
    if(ct[p]!=0)
   select(p);
   p=(p+1)%n;
  }
 printf("\n\n Process    Burst time   Wait time    Turn around \n\n");
 for(i=0;i<n;i++)
  {
    printf("\n %d\t\t%d\t\t%d\t\t%d",i+1,bt[i],w[i],ta[i]);
    wav+=w[i];
    taav+=ta[i];
  }
 wav/=n;
 taav/=n;
 printf("\n\nAverage waiting time : %d ",wav);
 printf("\n\nAverage turn around time : %d ",taav);
 getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-round-robin/">C program for Round Robin</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-advanced/c-program-for-round-robin/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
		<item>
		<title>C program for Round Robin CPU Scheduling Algorithm</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-program-for-round-robin-cpu-scheduling-algorithm/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-program-for-round-robin-cpu-scheduling-algorithm/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 20 Sep 2009 04:54:54 +0000</pubDate>
				<category><![CDATA[C Programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[Round Robin]]></category>
		<category><![CDATA[CPU Scheduling]]></category>
		<category><![CDATA[download programs]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=785</guid>

					<description><![CDATA[<p>INPUT : enter the process name : aaa enter the processing time : 4 enter the process name : bbb enter the processing time : 3 enter the process name : ccc enter the processing time : 2 enter the process name : ddd enter the processing time : 5 enter the process name :</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-program-for-round-robin-cpu-scheduling-algorithm/">C program for Round Robin CPU Scheduling Algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>INPUT :<br />
enter the process name :   aaa<br />
enter the processing time : 4<br />
enter the process name :   bbb<br />
enter the processing time : 3<br />
enter the process name :   ccc<br />
enter the processing time : 2<br />
enter the process name :   ddd<br />
enter the processing time : 5<br />
enter the process name :   eee<br />
enter the processing time : 1</p>
<p>OUTPUT :</p>
<p>p_name	p_time	w_time<br />
aaa     4	9<br />
bbb     3	3<br />
ccc     2	6<br />
ddd     5	10<br />
eee     1  	11 </p>
<p>total waiting time : 39<br />
average waiting time : 7.8000</p>
<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<conio.h>
#include<process.h>
#include<string.h>
void main()
{
char p[10][5];
int et[10],wt[10],timer=3,count,pt[10],rt,i,j,totwt=0,t,n=5,found=0,m;
float avgwt;
clrscr();
for(i=0;i<n;i++)
{
printf("enter the process name : ");
scanf("%s",&#038;p[i]);
printf("enter the processing time : ");
scanf("%d",&#038;pt[i]);
}
m=n;
wt[0]=0;
i=0;
do
{
if(pt[i]>timer)
{
rt=pt[i]-timer;
strcpy(p[n],p[i]);
pt[n]=rt;
et[i]=timer;
n++;
}
else
{
et[i]=pt[i];
}
i++;
wt[i]=wt[i-1]+et[i-1];
}while(i<n);

count=0;
for(i=0;i<m;i++)
{
for(j=i+1;j<=n;j++)
{
if(strcmp(p[i],p[j])==0)
{
count++;
found=j;
}
}
	if(found!=0)
	{

	wt[i]=wt[found]-(count*timer);
	count=0;
	found=0;
	}
}
for(i=0;i<m;i++)
{
totwt+=wt[i];
}
avgwt=(float)totwt/m;
for(i=0;i<m;i++)
{
printf("\n%s\t%d\t%d",p[i],pt[i],wt[i]);
}
printf("\ntotal waiting time %d\n",totwt);
printf("total avgtime %f",avgwt);
}
</pre>
<p>INPUT :<br />
enter the process name :   aaa<br />
enter the processing time : 4<br />
enter the process name :   bbb<br />
enter the processing time : 3<br />
enter the process name :   ccc<br />
enter the processing time : 2<br />
enter the process name :   ddd<br />
enter the processing time : 5<br />
enter the process name :   eee<br />
enter the processing time : 1</p>
<p>OUTPUT :</p>
<p>p_name	p_time	w_time<br />
aaa     4	9<br />
bbb     3	3<br />
ccc     2	6<br />
ddd     5	10<br />
eee     1  	11 </p>
<p>total waiting time : 39<br />
average waiting time : 7.8000</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-program-for-round-robin-cpu-scheduling-algorithm/">C program for Round Robin CPU Scheduling Algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-program-for-round-robin-cpu-scheduling-algorithm/feed/</wfw:commentRss>
			<slash:comments>62</slash:comments>
		
		
			</item>
	</channel>
</rss>
