Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Compiled Languages > C   »   Round robin program

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Mar 27, 2008, 06:28 PM
amnw
New Member
amnw is offline
 
Join Date: Mar 2007
Posts: 2
amnw See this member's comment history on his/her Profile page.
Round robin program

hi . experts ..
my teacher asked me to simulation of round robin as the following :
1- struct for a new process (Busrt Time,Priority and pointer to the next node)
2- struct for pointers (Head ,Tail), pointing to the head and tail of this queue
3- main segment (create a thread for function generator)
4- Generator
Create a process of type new process
get random value for burst(<100)
get random value for priority(0,1,2)
set the nextnode pointer = NULL

5- queuing function
Take the new process
Put it in the end of the queue
No more than one process can call this function
Cautions:
process one enter to be inserted to the gueue others wait until it finished
first come first serve
if the queue is full( mening no more space to creat a new process let the generator sleep until one process is removed from the queue)

My problem is with the caution part I dont knoe how to make the function (put in queue) called for only one process at time
and I dont know how to check if the queue is full and how to let the generator thread sleep


Please help me
thank you

Reply With Quote
 
     



Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
A Robin Hood sequel novel I can't remember the name of? Wondering Along Books & Literature 3 Sep 11, 2007 10:22 AM
round about billbev Internet & the Web 2 Aug 3, 2007 05:35 AM
Here we go! Round two! ace1978 Relationships 6 Mar 15, 2007 09:40 AM
robin sharma yeti99in Books & Literature 1 Dec 5, 2006 07:00 AM
Rocket Robin Hood phillysteakandcheese Television 3 May 29, 2006 11:51 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 02:51 AM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.