• Forum
  • Lounge
  • Implement a ‘Priority Based’ Round R

 
Implement a ‘Priority Based’ Round Robin Scheduling Algorithm using C/C++ on Linux.

cant figure out what to do, i am having trouble in combining rr , priority and fcfc algorithm in a single program
I don't know much about the scheduling algorithms , but linux has the function sched_setscheduler(2) which implements them RR,FIFO etc. in the same function. See the manual page for the aforementioned system call and the linux source.
This is a standard 'systems' course homework. OP may not actually be manipulating processes.

I'm not sure what the problem is. Round-robin is pretty simplistic -- just give each process in your queue an equal slice of time.

FCFS -- first-come first-served is just a way of filling the process queue, equivalent to a vector <process> ::push_back( new process ) kind of thing. For a RR scheduler, that means that the new process can be executed at any time.

RR technically excludes the idea of priority, though you could work that in by modifying it somewhat.

How exactly are you to implement this?
Topic archived. No new replies allowed.