473,320 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

round robin scheduler

Can somebody please give like an overview how to do a round robin
scheduler..
I know that we're suppose to use a quantum/quanta? Is this going to be
like an int, then assign with with a value?

And do I implement the READY queue? Can I do it with an array of ints
then somewhat put it at the end of the array?

Please advise.

Dec 7 '06 #1
6 7793

rhitx schrieb:
Can somebody please give like an overview how to do a round robin
scheduler..
I know that we're suppose to use a quantum/quanta? Is this going to be
like an int, then assign with with a value?

And do I implement the READY queue? Can I do it with an array of ints
then somewhat put it at the end of the array?

Please advise.
Round Robin schedulers are usually implemented as circular lists of
process structs. The process struct contains a quantum. Use "typedef
int quantum_t" if you are unsure. If you use one CPU, use pointer to
the current RUNNING process. All other processes in the scheduler are
READY. After some time (use alarm(2) and catch the signal), advance to
the next READY process in the circular list, which then becomes the
running process.

Hubble.

Dec 7 '06 #2

rhitx wrote:
Can somebody please give like an overview how to do a round robin
scheduler..
I know that we're suppose to use a quantum/quanta? Is this going to be
like an int, then assign with with a value?

And do I implement the READY queue? Can I do it with an array of ints
then somewhat put it at the end of the array?

Please advise.
This is not the best place to ask these questions, especially since you
haven't translated your problem into C. I'm sure there are OS or
algorithms programming newsgroups where these questions would be more
appropriate.

And my primary advice would be to read your textbook and don't ask
others to do your homework for you. It should have a decent overview of
what things are, which ought to be enough to get you started.

But a couple hints in any case:
Your ready queue is going to be a list of processes, which should have
some internal representation already. So you won't want an array of
ints, but a queue of processes.
And quanta, if I remember properly, are the cutoffs at which you make
the context switch.

Dec 7 '06 #3
Thanks Hubble for the clarification.

Chris Johnson wrote:
rhitx wrote:
Can somebody please give like an overview how to do a round robin
scheduler..
I know that we're suppose to use a quantum/quanta? Is this going to be
like an int, then assign with with a value?

And do I implement the READY queue? Can I do it with an array of ints
then somewhat put it at the end of the array?

Please advise.

This is not the best place to ask these questions, especially since you
haven't translated your problem into C. I'm sure there are OS or
algorithms programming newsgroups where these questions would be more
appropriate.

And my primary advice would be to read your textbook and don't ask
others to do your homework for you. It should have a decent overview of
what things are, which ought to be enough to get you started.

But a couple hints in any case:
Your ready queue is going to be a list of processes, which should have
some internal representation already. So you won't want an array of
ints, but a queue of processes.
And quanta, if I remember properly, are the cutoffs at which you make
the context switch.
Dec 7 '06 #4
On 6 Dec 2006 21:43:37 -0800, "rhitx" <ju*********@gmail.comwrote:
>Can somebody please give like an overview how to do a round robin
scheduler..
I know that we're suppose to use a quantum/quanta? Is this going to be
like an int, then assign with with a value?
I don't know, because this is comp.lang.c. Do you have a question
about C?
>And do I implement the READY queue? Can I do it with an array of ints
then somewhat put it at the end of the array?
I don't know, because this is comp.lang.c. Do you have a question
about C?
>Please advise.
My advice is to ask a question about C next time you post here.

Happy travels
--
jay
Dec 7 '06 #5
rhitx wrote:
>
Thanks Hubble for the clarification.
Please don't top-post. Read the following links.

--
Some informative links:
<news:news.announce.newusers
<http://www.geocities.com/nnqweb/>
<http://www.catb.org/~esr/faqs/smart-questions.html>
<http://www.caliburn.nl/topposting.html>
<http://www.netmeister.org/news/learn2quote.html>
<http://cfaj.freeshell.org/google/>
Dec 7 '06 #6
Here is one way:
http://cap.connx.com/tournament_software/roundrobin.c

Probably, you would be a lot better off to ask in other forums.

If you are looking for sources, then perhaps news:comp.sources.wanted
is worth a try
If you are looking for algorithms then news:comp.programming is a good
choice

A sourceforge search will turn up tournament scheduling programs.

Generally, news:comp.lang.c is not a place to discuss how to make a
certain kind of software tool. It is a way to discover intricacies of
the C language itself.

Probably, a google search will be a good idea. Or a wikipedia search.

Dec 7 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jerry Khoo | last post by:
i am currently working c++ project about executing a round robin algorrithm, how do i control when the algorithm should stop, what is the condition for the loop to stop, what is the condition to...
7
by: William Stacey [MVP] | last post by:
I can think of a couple ways to do this, but was wonder what the fastest way you can think of. Want to take any arraylist of > 1 element and make the first element the last, and all the rest of...
5
by: JP | last post by:
Greetings - I have a classic ASP site that is accessing custom written .NET web services - we are looking at scalability options and though we have an F5 load balancer that would definitley do the...
1
by: Ioannis Vranos | last post by:
I was checking .NET multithreading lately, and my book mentions that the thread scheduler provides quantoms of a time to each thread in "round robin" fashion. Is there any on line reference...
1
by: Scott | last post by:
Hi All. I have a web site that is currently using DNS round robin as a poor man's load balancer. Some users are receiving an 'Unable to Validate Data' error when posting back to the server. ...
3
kirara
by: kirara | last post by:
Hi all, I am trying to develop a mechanism to know which machine can handle a user job (by providing his Requirements) for now I wrote this method but it is a Round robin, I am trying to modify it...
2
by: =?Utf-8?B?aGVyYmVydA==?= | last post by:
how do I code generic functions to return the next item in an enumeration a) sorted by name, b) sorted by value c) sorted by declaration in a round-robin style ? for example the enum is Enum...
5
by: 08butoryr | last post by:
Hi everyone! this should be pretty simple for programmers on this forum... I need to design a java program which interacts with a MS Access DB in order to simulate the progression of a soccer round...
5
pradeepjain
by: pradeepjain | last post by:
I have a project where a patient comes to a hospital for an appointment and he must be allocated a doctor from a set of doctors based on round robin logic. How would i do this? and what is the over...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.