aboutsummaryrefslogtreecommitdiff
path: root/kern/sched.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-11-19 00:50:35 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-11-19 00:50:35 +0100
commitd1f39c38df5aee6df6661bcae2c2ca9f79428a8f (patch)
tree30144480ea132d44f2e115d74d3c0e2493358e31 /kern/sched.h
parent93cafb79a88ff23696c26c54e5aceff31b6b0a15 (diff)
downloadgnumach-d1f39c38df5aee6df6661bcae2c2ca9f79428a8f.tar.gz
gnumach-d1f39c38df5aee6df6661bcae2c2ca9f79428a8f.tar.bz2
gnumach-d1f39c38df5aee6df6661bcae2c2ca9f79428a8f.zip
Make scheduling more reactive
Give smaller quantums to processes, to get more frequent context switches. This fixes some reactivity for concurrent processes. * kern/sched.h (MIN_QUANTUM): Define to hz / 33. * kern/sched_prim.c (sched_init): Use MIN_QUANTUM instead of hz / 10.
Diffstat (limited to 'kern/sched.h')
-rw-r--r--kern/sched.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/kern/sched.h b/kern/sched.h
index c401f0f5..8a4ec75b 100644
--- a/kern/sched.h
+++ b/kern/sched.h
@@ -113,6 +113,7 @@ extern queue_head_t action_queue; /* assign/shutdown queue */
decl_simple_lock_data(extern,action_lock);
extern int min_quantum; /* defines max context switch rate */
+#define MIN_QUANTUM (hz / 33) /* context switch 33 times/second */
/*
* Default base priorities for threads.