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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user