944,035 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 17419
  • C++ RSS
Sep 14th, 2005
0

c++ program for round robin

Expand Post »
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 >>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dhaya is offline Offline
2 posts
since Sep 2005
Sep 14th, 2005
0

Re: c++ program for round robin

I did this in my C++ programming assignment.

I just used a STL list and poped from the front
and pushed to the back.
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Sep 17th, 2005
0

Re: c++ program for round robin

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 >>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dhaya is offline Offline
2 posts
since Sep 2005
Sep 17th, 2005
0

Re: c++ program for round robin

What is preventing you from doing this yourself?
Team Colleague
Reputation Points: 1135
Solved Threads: 172
Super Senior Demiposter
Rashakil Fol is offline Offline
2,479 posts
since Jun 2005
Sep 17th, 2005
0

Re: c++ program for round robin

Quote ...
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

C++ Syntax (Toggle Plain Text)
  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

C++ Syntax (Toggle Plain Text)
  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
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Mar 30th, 2006
0

Re: c++ program for round robin

Quote 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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ritesh1985 is offline Offline
1 posts
since Mar 2006
Mar 30th, 2006
0

Re: c++ program for round robin

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.
Reputation Points: 10
Solved Threads: 4
Junior Poster in Training
hinde is offline Offline
60 posts
since Jul 2005
Oct 6th, 2006
0

Re: c++ program for round robin

Haven't been on here for ages....

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

But thanks for bringing me back to DaniWeb
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: do u have latest C/C++ compiler...pLZ
Next Thread in C++ Forum Timeline: something.X





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC