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

@@ -133,8 +133,12 @@ PUBLIC void main()
}
/* Set ready. The HARDWARE task is never ready. */
if (rp->p_nr != HARDWARE) lock_ready(rp);
rp->p_rts_flags = 0;
if (rp->p_nr != HARDWARE) {
rp->p_rts_flags = 0; /* runnable if no flags */
lock_enqueue(rp); /* add to scheduling queues */
} else {
rp->p_rts_flags = NO_MAP; /* prevent from running */
}
/* Code and data segments must be allocated in protected mode. */
alloc_segments(rp);