c++ program for round robin

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2005
Posts: 2
Reputation: dhaya is an unknown quantity at this point 
Solved Threads: 0
dhaya dhaya is offline Offline
Newbie Poster

c++ program for round robin

 
0
  #1
Sep 14th, 2005
i need a program urgently for round robin schedulng algorithm using circular linked list implementation..
please send a program using c++...


post the prg to my mail id..
<< moderator edit: removed email address >>
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: c++ program for round robin

 
0
  #2
Sep 14th, 2005
I did this in my C++ programming assignment.

I just used a STL list and poped from the front
and pushed to the back.
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 2
Reputation: dhaya is an unknown quantity at this point 
Solved Threads: 0
dhaya dhaya is offline Offline
Newbie Poster

Re: c++ program for round robin

 
0
  #3
Sep 17th, 2005
why dont u send the program to me as an attachment to my mail id

<< moderator edit: email snipped -- because that's not how forums such as these work >>
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,052
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: c++ program for round robin

 
0
  #4
Sep 17th, 2005
What is preventing you from doing this yourself?
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: c++ program for round robin

 
0
  #5
Sep 17th, 2005
why dont u send the program to me as an attachment to my mail id
A coupe of reasons

a. Rashakil Fol's post
b. it takes in total 3 lines of code

  1. value = myList.front();
  2. myList.pop_front();
  3. myList.push_back(value);

you should prolly check to see that the list isn't empty first and of corse make the list and varible value , you can then use value, If your doing this in muliple parts of your program.

Its prolly advisable to make a function to do this for you, How far you want to go with this is upto you ( make a template if you will so it can take any type of varible and spit out a value.

If it is infact for an assignment and they havent told you to use any of the standard template libary, they may infact not want you to and if that is the case I would try the following.

1. Create a Linked list

Use an object or a struct ( what ever takes your fancy ) with a varible containing the data and a pointer to another struct of the same type.

Now if your doing a round robin kinda algorithem you may want the lists to be in a nice loop, so insted of having a start and an end you don't.

then make some kinda way of remembing where you are in the list (another pointer to a element) and then change that when you access a value

  1. imLookingHere = imLookingHere->nextInList;

or what not.

then you just have to worry about attaching things in etc. anyway check out some reasources on the web

STL Lists

STL List
SGI's nice doco
cprogramming's tutorial

Linked Lists

Nice C++ Linked List
Wikipedia artical on Linked Lists
Last edited by Paul.Esson; Sep 17th, 2005 at 6:45 am. Reason: Didn't include enough
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 1
Reputation: ritesh1985 is an unknown quantity at this point 
Solved Threads: 0
ritesh1985 ritesh1985 is offline Offline
Newbie Poster

Re: c++ program for round robin

 
0
  #6
Mar 30th, 2006
Originally Posted by dhaya
i need a program urgently for round robin schedulng algorithm using circular linked list implementation..
please send a program using c++...


post the prg to my mail id..
<< moderator edit: removed email address >>
cna i get a mail of the code please.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 60
Reputation: hinde is an unknown quantity at this point 
Solved Threads: 4
hinde hinde is offline Offline
Junior Poster in Training

Re: c++ program for round robin

 
0
  #7
Mar 30th, 2006
Don't mean to be a dick, but I don't like people asking me for all the code I have written for a particular assignment, when they have not shown any effort thus far. Whenever you have to do a programming assignment, start it way ahead of time and work on it a little every day.

http://www.daniweb.com/techtalkforums/thread39018.html

I posted a reply in the above thread that tells you how I did it. I don't know if this will help you or not. I did the assignment in order to keep track of a bunch of things like turnaround time and context switches. My implementation also is formatted so that I could write a gannt chart output function if I so desired.
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: c++ program for round robin

 
0
  #8
Oct 6th, 2006
Haven't been on here for ages....

cna i get a mail of the code please.
No.

But thanks for bringing me back to DaniWeb
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC