New scheduling code in kernel. Work in progress.

Round-robin within one priority queue works fine.
Ageing algorithm to be done.
This commit is contained in:
Jorrit Herder
2005-08-19 16:43:28 +00:00
parent d45066257c
commit a01645b788
18 changed files with 164 additions and 136 deletions

View File

@@ -69,13 +69,14 @@ struct proc {
#define NO_PRIV 0x80 /* keep forked system process from running */
/* Scheduling priorities for p_priority. Values must start at zero (highest
* priority) and increment. Priorities of the processes in the boot image can
* be set in table.c.
* priority) and increment. Priorities of the processes in the boot image
* can be set in table.c. IDLE must have a queue for itself, to prevent low
* priority user processes to run round-robin with IDLE.
*/
#define NR_SCHED_QUEUES 16 /* MUST equal minimum priority + 1 */
#define TASK_Q 0 /* highest, reserved for kernel tasks */
#define MAX_USER_Q 8 /* highest priority for user processes */
#define USER_Q 11 /* user default (should correspond to nice 0) */
#define TASK_Q 0 /* highest, used for kernel tasks */
#define MAX_USER_Q 0 /* highest priority for user processes */
#define USER_Q 7 /* default (should correspond to nice 0) */
#define MIN_USER_Q 14 /* minimum priority for user processes */
#define IDLE_Q 15 /* lowest, only IDLE process goes here */