[PATCH] SCHED_FIFO and SCHED_RR scheduler fix, kernel 2.4.18

From: Bhavesh P. Davda (bhavesh@avaya.com)
Date: Wed Jun 12 2002 - 11:19:51 EST


The 2.4.18 kernel was behaving incorrectly for SCHED_FIFO and SCHED_RR
scheduling.

The correct behaviour for SCHED_FIFO is priority preemption:
run to completion, or system call, or preemption by higher priority
process. The correct behaviour for SCHED_RR is the same as SCHED_FIFO for
the preemption case, or run for a time slice, and go to the back of the
run queue for that priority.

More details can be found at:

http://www.opengroup.org/onlinepubs/7908799/xsh/realtime.html

As a side note, SCHED_RR is completely broken in the 2.2 series kernels.

This is a small patch, but fixes the behaviour for SCHED_FIFO and SCHED_RR
scheduling in the 2.4.18 kernel. It also improves the efficiency of the
kernel by NOT calling schedule() for every tick for a SCHED_FIFO process.

-- 
Bhavesh P. Davda
Avaya Inc
bhavesh@avaya.com


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:25 EST