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

Recommended Answers

All 7 Replies

I did this in my C++ programming assignment.

I just used a STL list and poped from the front
and pushed to the back.

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

What is preventing you from doing this yourself?

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

value = myList.front();
myList.pop_front();
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

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

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.

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.

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 :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.