Skip to contentSkip to conversation

Isochronous scheduling for staircase scheduler

PATCH In review Con Kolivas 1 participant 1 message Aug 4, 2004 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Isochronous scheduling for staircase scheduler

This patch adds soft real time support to the staircase scheduler.

Soft real time allows low latency scheduling for non heavily cpu bound tasks by non-privileged users.

It does this by elevating the effective priority within the staircase scheduler, but penalising prolonged cpu usage more heavily by demoting them down the staircase faster. This allows non root users to have low latency scheduling without the risk of starvation of true real time policies.

This scheduling class is suitable for use only for not very cpu bound tasks such as audio playback, and the capture thread in audio and video sampling. It is _not_ suitable for high performance gaming.

This scheduling class is currently supported in userspace by schedtools and the heirloom toolchest.

include/linux/sched.h +3 -1
Index: linux-2.6.8-rc2-mm2/include/linux/sched.h
===================================================================
@@ -127,9 +127,10 @@
 #define SCHED_FIFO		1
 #define SCHED_RR		2
 #define SCHED_BATCH		3
+#define SCHED_ISO		4
 
 #define SCHED_MIN		0
-#define SCHED_MAX		3
+#define SCHED_MAX		4
 
 #define SCHED_RANGE(policy)	((policy) >= SCHED_MIN && \
 					(policy) <= SCHED_MAX)
@@ -332,6 +333,7 @@
 
 #define rt_task(p)		((p)->prio < MAX_RT_PRIO)
 #define batch_task(p)		((p)->policy == SCHED_BATCH)
+#define iso_task(p)		((p)->policy == SCHED_ISO)
 
 /*
  * Some day this will be a full-fledged user tracking system..
kernel/sched.c +31 -10

119 lines not on this page · raw message