User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 391,591 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,680 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 1694 | Replies: 4
Reply
Join Date: Apr 2005
Posts: 3
Reputation: falaky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
falaky falaky is offline Offline
Newbie Poster

Need Help Of Programmers!!!!

  #1  
Apr 24th, 2005
hi alll
am a new member of this this amazing community and feel good to be part of it.i required help regarding simulation of multilevel feedback queue.i have checked many samples of scheduling but couldnt got right...so can any body help me?? code of this simulation should be in c/c++ ,java/java script...i would be really thankful.last date of project is 27-04-2005
waitin for your reply...really lookin forward to you guys!!!!!
falak
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,134
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 10
Solved Threads: 257
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Need Help Of Programmers!!!!

  #2  
Apr 24th, 2005
Can you supply any code of yours so we can start somewhere????
Reply With Quote  
Join Date: Apr 2005
Posts: 3
Reputation: falaky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
falaky falaky is offline Offline
Newbie Poster

A Little Start to my problem

  #3  
Apr 25th, 2005
#include<iostream.h>
#include<conio.h>
#include<process.h>
#include<string.h>
void mainmenu();

class queue
{
private:
 int timequan,prior;
public:
void rrobin();
void fcfs();
};
void queue :: rrobin()
{
 cout<<"Please Enter The Priority For This Queue"<<endl;
 cin>>prior;
 while(1)
 {
	if(prior==1&&prior==2)
	{
		timequan=2;
		cout<<"Time Quantum For This Queue is "<<timequan<<endl;
		break;
	}
	if(prior==3&&prior==4)
	{
		timequan=4;
		cout<<"Time Quantum For This Queue is "<<timequan<<endl;
		break;
	}
	else
	{
		cout<<"Please Enter Valid Priority Between 1-5 "<<endl;
		break;
	}

}
void queue :: fcfs()
{
    prior=5;
    cout<<"This Queue Has Fixed Priority"<<prior<<endl;
}

class process
{
 private:
	int pno,pbtime,pprior,parrival,pwait,ptat;
	char pid[10];
 public:

	queue(){pno=pbtime=pprior=parrival=pwait=ptat=pid[10]=0;}
	queue(int n,char id[],int btime,int prior,int arrival,int wait,int tat)
	{
	pno=n;
	pbtime=btime;
	parrival=arrival;
	pwait=wait;
	ptat=tat;
	pprior=prior;
	strcpy(pid,id);
	}
	void getdata();
	void showdata();

};
void process :: getdata()
{
	cout<<"\nPlease Enter No Of Processes  ";
	cin>>pno;
	cin.ignore(10,'\n');
	cout<<"\nPlease Enter Process Id  ";
	cin.get(pid,'10');
	cout<<"\nPlease Enter Process Priority  ";
	cin>>pprior;
	cout<<"\nPlease Enter Process Burst Time  ";
	cin>>pbtime;
	cout<<"\nPlease Enter Process Arrival Time  ";
	cin>>parrival;
}
void process :: showdata()
{
	cout<<"\nProcess No "<<pno<<endl;
	cout<<"\nProcess ID "<<pid<<endl;
	cout<<"\nProcess Priority "<<pprior<<endl;
	cout<<"\nProcess  Burst Time "<<pbtime<<endl;
	cout<<"\nProcess  Wait Time "<<pwait<<endl;
	cout<<"\nProcess  Arrival Time "<<parrival<<endl;
	cout<<"\nProcess  Turn Around Time "<<ptat<<endl;
}


void main()
{
	
	int total,i,choice;
	process p[i];
	textmode(3);

	while(1)
	{
		mainmenu();
		gotoxy(17,17);
		cout<<"Please Enter Your Choice ";
		cin>>choice;

		switch(choice)
		{
			case 1:
				clrscr();
				cout<<"Please Enter The Total Number Of Processes ";
				cin>>total;
				for (i=1;i<=total;i++)
				   p[i].getdata();
				getch();
				break;
			case 2:
				clrscr();
				for (i=1;i<=total;i++)
				   p[i].showdata();
				getch();
				break;
			
			case 3:
				exit(0);

			default:
				gotoxy(17,19);
				cout<<"Please Enter The Correct Choice";
				getch();
				continue;
		 }
}
getche();
}

	  void mainmenu()
		{
		    clrscr();
		    cout<<"    \n\n\t\t\tMain Menu"<<endl;
		    cout<<"\n\t\t1.Insert Process"<<endl;
		    cout<<"\n\t\t2.Display Processes"<<endl;
		    cout<<"\n\t\t3.Exit"<<endl;

		}
Code tags added. -Narue
Reply With Quote  
Join Date: Apr 2005
Posts: 3
Reputation: falaky is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
falaky falaky is offline Offline
Newbie Poster

Re: Need Help Of Programmers!!!!

  #4  
Apr 25th, 2005
i make a analysis and type this code in whole day...am really short of time as u know i have already 3 projects on pending, deadline of project is near to an end....
now its up to u to implement multilevel feedback queue
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,646
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 191
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Need Help Of Programmers!!!!

  #5  
Apr 25th, 2005
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb C++ Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 11:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC