I should have been more specific. It's a Unix CPU process scheduler. I don't know how many different kinds of Unix schedulers there are, but I'm guessing it's the default one for the Unix system. It's a priority based scheduler with 64 different priority levels that goes through each process for a certain time slice and than reinserts them back into the array with a lower priority level based on some algorithm.
I've never programmed anything like this with threads, it's pretty alien to me. I wish I could get my hands on some source code with a few examples of process schedulers.
How do I run a demo to prove my scheduler works? What would I use for threads? So far I'm just using some nonsense worker threads that go through 10,000 iterations of a loop.
How do I give a thread a priority range from 0-64?
The basic data structure I've decided to work with is an Arraylist with 64 circular array queues. I don't know if this is right.
Unix schedulers are supposed to switch threads whenever one with a higher priority becomes available. How do you do that?
Should the scheduler program itself be a thread or a while loop?
I would appreciate any tips.