One possibility – probably not a good one – is to modify the enqueue()
function:
PUBLIC void enqueue(register struct proc *rp)
{
/* Add 'rp' to one of the queues of runnable processes. This function is
* responsible for inserting a process into one of the scheduling queues.
* The mechanism is implemented here. The actual scheduling policy is
* defined in sched() and pick_proc().
*/
int q = rp->p_priority; /* scheduling queue to use */
Instead of assigning rp->p_priority
, simply assign 0:
int q = 0;
All processes are thereby enqueued on a a single priority queue (queue number 0) and you have a single FCFS system. Of course, that assumes that enqueue()
is the only function that adds processes to queues. There's a decent chance that it is the only one, but you need to know most of the Minix kernel to be sure.
With that modification in place, you can then investigate whether there is too much space wasted supporting multiple queues. If there is, you can adjust the queue declarations appropriately. The queue structure is probably just an array of pointers; the space saving available is not great, therefore.
Note, however, that you probably don't want FCFS only; the priority queues are there for good reasons. For example, your interrupt handlers should be serviced more swiftly than the number-crunching monster that is working for SETI. That means that there needs to be some prioritization.