亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? switching.c

?? This is a Switch simulation... with 4 types of switches... and also we have average simulation tim
?? C
?? 第 1 頁 / 共 3 頁
字號:
				if(packetGenerateRandom < 0)					packetGenerateRandom = -packetGenerateRandom;				if(packetGenerateRandom < packetGenProb)					packet[index1].stateCreated = true;				else					packet[index1].stateCreated = false;				//printf("\npacket Generate :%f",packetGenerateRandom);						packet[index1].startDelay = 0;				packet[index1].endDelay = 0;				packet[index1].delay = 0;				packet[index1].startTime = itter+((rand())%101)*0.0001;				packet[index1].slotNo = itter;				packet[index1].inputPort = inputPort;				packet[index1].outputPort = rand()%noOfPorts;				packet[index1].discarded = false;				if(packet[index1].outputPort < 0)					packet[index1].outputPort = -packet[index1].outputPort;				//printf("\nStart time: %f Output Port:%d Input port:%d\n",packet[index1].startTime,packet[index1].outputPort,packet[index1].inputPort);						initializeInputQueue(packet[index1].inputPort);				if(packet[index1].stateCreated == true)				{					enInputQueue(packet[index1].inputPort,index1,1);					packet[index1].startDelay=nowTime();							}				index1++;			}				for(outputPort = 0;outputPort < noOfPorts; outputPort++)			initializeOutputQueue(outputPort);				/*Packet select for Output port or discard*/			for(outputPort = 0;outputPort < noOfPorts; outputPort++)			{					if(packet[index2].stateCreated == true)				{					tempindex = deInputQueue(packet[index2].inputPort);													if(outSend[packet[index2].outputPort] == -1)					{	//printf("Packet at Output port :%d",packet[index2].outputPort);						outSend[packet[index2].outputPort] = packet[index2].inputPort;						enOutputQueue(packet[index2].outputPort,index2,1);			//bufferLength is 1 as only 1 output buffer.								/*calculating the time delay between recieved and transmitted packet*/										retValue = deOutputQueue(packet[index2].outputPort);				//transmit that packet for that slot....						if(retValue != -1)						{							linkUtilization[packet[index2].inputPort].activeLink[packet[index2].outputPort]+=1;							packet[index2].endDelay = nowTime();							packet[index2].delay = packet[index2].endDelay-packet[index2].startDelay;							//printf("Delay is in microsec:%d\n\n",packet[index2].delay);						}										}					else						packet[index2].discarded = true;														if(packet[index2].discarded == true)					{						//printf("\nStart time: %f Output Port:%d Input port:ABCDEFG%d \n",packet[index2].startTime,packet[index2].outputPort,packet[index2].inputPort);					}					//if(packet[index2].endDelay != 0)						if(packet[tempindex].delay > 0)						{								intermediateVal1[index++]=packet[index2].delay;							tempDelay += packet[index2].delay;													}				}				index2++;							}			//tempDelay = tempDelay/noOfPorts;			//printf("\n-------------------------------------------------------------------------------\n");			}	averageDelay = tempDelay/(noOfPorts*maxTimeSlot*1.0);	for (count=0;count<index;count++)		devIntermediate+=(intermediateVal1[count]-averageDelay)*(intermediateVal1[count]-averageDelay);	devIntermediate=devIntermediate*1.0/(noOfPorts*maxTimeSlot);	stdDevDelay=sqrt(devIntermediate);	//stdDevDelay = (tempDelayStd/(noOfPorts*maxTimeSlot*1.0)-(averageDelay*averageDelay*1.0)); ///problem here how to find out std deviation...............	//printf("\n\nAVERAGE DELAY FOR INQ IS: %fus STANDERED DEVIATION:%f \n",averageDelay,stdDevDelay);							indexcount=0;	/*Average link utilization*/	for(inputPort = 0;inputPort < noOfPorts; inputPort++)	{		for(outputPort = 0;outputPort < noOfPorts; outputPort++)		{			linkUtilization[inputPort].averageLink[outputPort] = linkUtilization[inputPort].activeLink[outputPort]*1.0/maxTimeSlot;			//printf("link utilization for the link %d 	%d	is	%f\n",inputPort,outputPort,linkUtilization[inputPort].averageLink[outputPort]);			intermediateVal2[indexcount++]=linkUtilization[inputPort].averageLink[outputPort];			tempLinkUtilization += linkUtilization[inputPort].averageLink[outputPort];		}	}	averageLinkUtilization=tempLinkUtilization/(noOfPorts*1.0);	for (count=0;count<indexcount;count++)		devIntermediate+=(intermediateVal2[count]-averageLinkUtilization)*(intermediateVal2[count]-averageLinkUtilization);	devIntermediate=devIntermediate*1.0/(noOfPorts*maxTimeSlot);	stdDevLinkUtilization=sqrt(devIntermediate);								/*Printing in a standered ouput*/	printf("\nN 	p		 Q Type 	Avg PD 			  Std Dev of PD		Avg LU 		Std Dev of LU		Switch Util");	printf("\n%d	%f 	 %s		%fus		  %f 		%f 	%f		%f\n",noOfPorts,packetGenProb,queue,averageDelay,stdDevDelay,tempLinkUtilization/(noOfPorts*1.0),stdDevLinkUtilization,tempLinkUtilization);							/*Printing in a file*/	fprintf(of,"\n%d	%f 	 %s		%fus		  %f 		%f 	%f\n",noOfPorts,packetGenProb,queue,averageDelay,stdDevDelay,tempLinkUtilization/(noOfPorts*1.0),stdDevLinkUtilization,tempLinkUtilization);	fprintf(graphFile1,"%d %f\n",noOfPorts,averageDelay);	fprintf(graphFile2,"%d %f\n",noOfPorts,tempLinkUtilization);		}	break;/******************************************************************************************		Logic for Input Queueing - INQ *******************************************************************************************/	case 1 :		for(noOfPorts=4;noOfPorts<101;noOfPorts++)	{			/*Initialize the intput queue for each input port*/		for(inputPort = 0;inputPort < noOfPorts; inputPort++)			initializeInputQueue(inputPort);			for(N1=0;N1<noOfPorts;N1++)			for(N2=0;N2<noOfPorts;N2++)			{				linkUtilization[N1].activeLink[N2]=0;				linkUtilization[N1].averageLink[N2]=0.0;			}					tempDelay=0;		tempLinkUtilization=0;		devIntermediate=0;			index1=0;		index2=0;		index=0;		for(itter = 0;itter < maxTimeSlot;itter++)		{			for(i=0;i<noOfPorts;i++)				outSend[i] = -1;				/*Packet Generation */			for(inputPort = 0;inputPort < noOfPorts; inputPort++)			{						/*Every time packet is created but its state is CREATED or NOTCREATED 				i.e. if created then process otherwise dont and depends on the probability				of the generation i.e. random value created..*/				/* IF(CREATED) packet[index1].stateCreated=true				   ELSE packet[index1].stateCreated=false*/						packetGenerateRandom = (rand()%100)*0.01;				if(packetGenerateRandom < 0)					packetGenerateRandom = -packetGenerateRandom;				if(packetGenerateRandom < packetGenProb)					packet[index1].stateCreated = true;				else					packet[index1].stateCreated = false;			//printf("\npacket Generate :%f",packetGenerateRandom);						packet[index1].startDelay = 0;				packet[index1].endDelay = 0;					//if endDelay == 0 at the end then this packet is still in the i/p queue.				packet[index1].delay = 0;				packet[index1].startTime = itter+((rand())%101)*0.0001;				packet[index1].slotNo = itter;				packet[index1].inputPort = inputPort;				packet[index1].outputPort = rand()%noOfPorts;				packet[index1].discarded = false;				if(packet[index1].outputPort < 0)					packet[index1].outputPort = -packet[index1].outputPort;				//printf("\nStart time: %f Output Port:%d Input port:%d\n",packet[index1].startTime,packet[index1].outputPort,packet[index1].inputPort);				if(packet[index1].stateCreated == true)				{							enInputQueue(packet[index1].inputPort,index1,bufferSize);					packet[index1].startDelay=nowTime();					}				index1++;			}				for(outputPort = 0;outputPort < noOfPorts; outputPort++)			initializeOutputQueue(outputPort);						/*Packet select for Output port or discard*/			for(outputPort = 0;outputPort < noOfPorts; outputPort++)			{					tempindexFrmQueue = false;				if(itter == 0)					tempindex = index2;				else					if(inputQ[outputPort].rear != inputQ[outputPort].front)					{						tempindex = inputQ[outputPort].packetSlot[inputQ[outputPort].front];  						tempindexFrmQueue = true;					}					else						tempindex = index2;								if(packet[tempindex].stateCreated == true)				{										if(outSend[packet[tempindex].outputPort] == -1)					{							if(tempindexFrmQueue == true)							deInputQueue(packet[tempindex].inputPort);						outSend[packet[tempindex].outputPort] = packet[tempindex].inputPort;						enOutputQueue(packet[tempindex].outputPort,index2,1);			//bufferLength is 1 as only 1 output buffer.										/*calculating the time delay between recieved and transmitted packet*/						if(packet[tempindex].startDelay == 0)					//i.e. this packet was not queued in INPUT QUEUE.							packet[tempindex].startDelay = nowTime();						retValue = deOutputQueue(packet[tempindex].outputPort);				//transmit that packet for that slot....						if(retValue != -1)						{							linkUtilization[packet[tempindex].inputPort].activeLink[packet[tempindex].outputPort]+=1;							packet[tempindex].endDelay = nowTime();							packet[tempindex].delay = packet[tempindex].endDelay-packet[tempindex].startDelay;							//printf("Delay is in microsec:%d\n\n",packet[tempindex].delay);						}					}											else						if(tempindexFrmQueue == false)						{							packet[tempindex].startDelay = nowTime();							enInputQueue(packet[tempindex].inputPort,tempindex,bufferSize);						}					//if(packet[tempindex].endDelay != 0)						if(packet[tempindex].delay > 0)						{							intermediateVal1[index++]=packet[tempindex].delay;							tempDelay += packet[tempindex].delay/noOfPorts;													}				}					index2++;			}				//printf("\n-------------------------------------------------------------------------------\n");			}	averageDelay = tempDelay/(noOfPorts*maxTimeSlot);	for (count=0;count<index;count++)		devIntermediate+=(intermediateVal1[count]-averageDelay)*(intermediateVal1[count]-averageDelay);	devIntermediate=devIntermediate*1.0/(noOfPorts*maxTimeSlot);	stdDevDelay=sqrt(devIntermediate);	//stdDevDelay = (averageDelay*averageDelay)-tempDelayStd/(noOfPorts*maxTimeSlot);	//printf("\n\nAVERAGE DELAY FOR INQ IS: %fus STANDERED DEVIATION:%f \n",averageDelay,stdDevDelay);		indexcount=0;	/*Average link utilization*/	for(inputPort = 0;inputPort < noOfPorts; inputPort++)	{		for(outputPort = 0;outputPort < noOfPorts; outputPort++)		{			linkUtilization[inputPort].averageLink[outputPort] = linkUtilization[inputPort].activeLink[outputPort]*1.0/maxTimeSlot;			//printf("link utilization for the link %d 	%d	is	%f\n",inputPort,outputPort,linkUtilization[inputPort].averageLink[outputPort]);			intermediateVal2[indexcount++]=linkUtilization[inputPort].averageLink[outputPort];			tempLinkUtilization += linkUtilization[inputPort].averageLink[outputPort];		}	}			averageLinkUtilization=tempLinkUtilization/(noOfPorts*1.0);	for (count=0;count<indexcount;count++)		devIntermediate+=(intermediateVal2[count]-averageLinkUtilization)*(intermediateVal2[count]-averageLinkUtilization);	devIntermediate=devIntermediate*1.0/(noOfPorts*maxTimeSlot);	stdDevLinkUtilization=sqrt(devIntermediate);		//printf("\n\nAVERAGE LINK UTILIZATION FOR NOQ IS: %f\nSTANDERED DEVIATION: %f \nSWITCH UTILIZATION: %f\n",tempLinkUtilization/	(noOfPorts*1.0),stdDevLinkUtilization,tempLinkUtilization);								/*Printing in a standered ouput*/	printf("\nN 	p		 Q Type 	Avg PD 			  Std Dev of PD		Avg LU 		Std Dev of LU		Switch Util");	printf("\n%d	%f 	 %s		%fus		  %f 		%f 	%f		%f\n",noOfPorts,packetGenProb,queue,averageDelay,stdDevDelay,tempLinkUtilization/(noOfPorts*1.0),stdDevLinkUtilization,tempLinkUtilization);							/*Printing in a file*/	fprintf(of,"\n%d	%f 	 %s		%fus		  %f 		%f 	%f		%f\n",noOfPorts,packetGenProb,queue,averageDelay,stdDevDelay,tempLinkUtilization/(noOfPorts*1.0),stdDevLinkUtilization,tempLinkUtilization);	fprintf(graphFile3,"%d %f\n",noOfPorts,averageDelay);	fprintf(graphFile4,"%d %f\n",noOfPorts,tempLinkUtilization);	}	break;/******************************************************************************************			Logic for Itterative Matching Queueing - INI *******************************************************************************************/	case 2 :	for(noOfPorts=4;noOfPorts<101;noOfPorts++)	{				for(N1=0;N1<noOfPorts;N1++)			for(N2=0;N2<noOfPorts;N2++)			{				linkUtilization[N1].activeLink[N2]=0;				linkUtilization[N1].averageLink[N2]=0;			}				/*Initialize the intput queue for each input port*/		for(inputPort = 0;inputPort < noOfPorts; inputPort++)			initializeInputQueue(inputPort);				tempDelay=0;		tempLinkUtilization=0;		devIntermediate=0;			

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区国产精品| 色94色欧美sute亚洲线路一久| 亚洲最大的成人av| 亚洲人成人一区二区在线观看| 国产精品美女久久久久久久网站| 国产亚洲欧美在线| 亚洲国产精品成人久久综合一区| 国产欧美1区2区3区| 国产欧美一区二区三区沐欲 | 日韩精品一级中文字幕精品视频免费观看| 亚洲欧美在线高清| 一区二区三区精品在线| 亚洲国产日韩a在线播放性色| 天天综合色天天综合| 日韩精品三区四区| 国产精品1区2区3区在线观看| 国产69精品久久99不卡| 99精品欧美一区二区三区小说 | 91精品国产综合久久久久久| 欧美一区二区精品久久911| 欧美xxxx老人做受| 国产亚洲精久久久久久| 一区二区三区色| 免费高清不卡av| 国产精品自拍一区| 欧美做爰猛烈大尺度电影无法无天| 欧美日韩一卡二卡| 久久久久综合网| 亚洲激情欧美激情| 韩国毛片一区二区三区| 91福利精品第一导航| 在线电影一区二区三区| 中文字幕国产一区二区| 亚洲第一二三四区| 成人h动漫精品一区二区| 欧美精品丝袜中出| 国产精品色在线| 日韩成人精品在线| 成av人片一区二区| 日韩一区二区免费高清| 最新久久zyz资源站| 免费成人av在线| 色欧美片视频在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲精品成人精品456| 国产美女精品一区二区三区| 欧美亚洲动漫精品| 国产精品久久午夜夜伦鲁鲁| 奇米色777欧美一区二区| 91在线视频网址| 久久精品亚洲精品国产欧美| 爽好多水快深点欧美视频| 99re8在线精品视频免费播放| 日韩精品中午字幕| 亚洲成av人片观看| 97aⅴ精品视频一二三区| 久久精品一区二区三区四区| 日本不卡一区二区| 欧美日韩一区二区电影| 亚洲精品国产一区二区精华液| 高清国产一区二区三区| 精品福利二区三区| 麻豆精品久久久| 欧美年轻男男videosbes| 一区二区三区美女| 在线视频欧美区| 亚洲男人的天堂一区二区 | 亚洲国产毛片aaaaa无费看| 成人免费视频caoporn| 精品第一国产综合精品aⅴ| 蜜桃视频在线一区| 日韩精品一区二区三区蜜臀| 日韩av午夜在线观看| 欧美高清性hdvideosex| 日韩电影在线免费看| 欧美一区二区大片| 久久99国产精品久久| 日韩欧美中文字幕制服| 九色porny丨国产精品| 久久午夜电影网| 国产精一区二区三区| 国产午夜久久久久| 成人教育av在线| 一区二区三区四区高清精品免费观看 | 7777精品伊人久久久大香线蕉的| 亚洲成人一区在线| 91精品国产手机| 国内精品免费**视频| 国产精品久久久久久久久果冻传媒| 成人av在线电影| 亚洲精品视频免费观看| 欧美日本在线播放| 久久精品二区亚洲w码| 国产情人综合久久777777| jiyouzz国产精品久久| 一区二区三区四区蜜桃| 欧美麻豆精品久久久久久| 极品少妇一区二区| 亚洲女人的天堂| 欧美一区二区在线视频| 国产精品自拍网站| 一区二区在线观看免费视频播放| 欧美疯狂做受xxxx富婆| 国产精品综合av一区二区国产馆| 亚洲欧洲另类国产综合| 制服丝袜亚洲播放| 国产精品一区二区黑丝| 亚洲综合小说图片| 欧美精品一区二区三区视频 | 欧美日本韩国一区二区三区视频 | 91精品国产乱| 99精品视频一区| 蜜桃视频一区二区三区在线观看| 国产精品对白交换视频| 欧美日韩在线免费视频| 成人毛片视频在线观看| 青青草原综合久久大伊人精品| 国产精品伦一区二区三级视频| 欧美伊人久久久久久久久影院| 国产精品综合网| 欧美aaaaa成人免费观看视频| 中文字幕五月欧美| 精品国产91久久久久久久妲己| 色先锋资源久久综合| 国模娜娜一区二区三区| 日韩av二区在线播放| 一区二区三区不卡视频在线观看 | 精品国产露脸精彩对白| 欧美日韩一本到| 99久久99久久精品免费观看| 国模大尺度一区二区三区| 亚洲国产精品自拍| 亚洲欧美一区二区三区孕妇| 国产亚洲美州欧州综合国| 91精品国产91综合久久蜜臀| 欧美中文一区二区三区| 99九九99九九九视频精品| 国产精品69毛片高清亚洲| 男女男精品网站| 亚洲夂夂婷婷色拍ww47| **性色生活片久久毛片| 一区在线播放视频| 国产精品私人自拍| 国产日韩欧美精品一区| 日本一区二区在线不卡| 久久久久久电影| 久久久久久久久97黄色工厂| 久久美女高清视频| 久久久国产精华| 久久精品夜色噜噜亚洲a∨| 欧美成人性福生活免费看| 日韩欧美资源站| 久久亚洲综合色一区二区三区 | 国产一区二区福利视频| 九色综合狠狠综合久久| 国产综合色视频| 国产精品一区二区91| 成人午夜激情片| 波多野结衣中文字幕一区 | 国产成人亚洲综合a∨猫咪| 国产乱码精品一区二区三区五月婷| 国产一区二区三区在线观看精品 | 免费日韩伦理电影| 精品一区二区三区久久| 国产成人综合在线播放| av午夜一区麻豆| 欧美性生活久久| 欧美一级高清大全免费观看| 欧美精品一区二区三区四区| 中文幕一区二区三区久久蜜桃| 中文字幕一区二区在线观看| 亚洲黄色小说网站| 麻豆一区二区三区| 不卡的电影网站| 91精品国产综合久久蜜臀| 2024国产精品| 一区二区免费视频| 经典一区二区三区| 91网站在线播放| 日韩欧美美女一区二区三区| 国产精品成人在线观看| 婷婷夜色潮精品综合在线| 国内久久婷婷综合| 91搞黄在线观看| 欧美精品一区二区蜜臀亚洲| 亚洲女与黑人做爰| 国产一区二区三区高清播放| 色综合天天性综合| 精品日韩99亚洲| 亚洲影院久久精品| 国内精品嫩模私拍在线| 欧美午夜精品一区| 国产欧美一区二区三区鸳鸯浴 | 中文字幕亚洲一区二区va在线| 亚洲高清免费观看高清完整版在线观看| 久久精品999| 欧美日韩一卡二卡| 最新国产成人在线观看| 国产一区二区三区不卡在线观看| 欧美日韩大陆一区二区|