mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
[kernel] Change to one-shot timer scheduler
Instead of many timer interrupts and decrementing a process' remaining quanta, change to setting a single timer for when a process should be preempted. If it uses its whole timeslice, demote it. If it uses less than half before blocking, promote it. Determine timeslice based on priority as well. This change also required changing the apic timer interface to be purely interval (in microseconds) based instead of its previous interval/tick hybrid.
This commit is contained in:
@@ -210,7 +210,7 @@ isr_handler(cpu_state *regs)
|
||||
break;
|
||||
|
||||
case isr::isrTimer:
|
||||
scheduler::get().tick();
|
||||
scheduler::get().schedule();
|
||||
break;
|
||||
|
||||
case isr::isrLINT0:
|
||||
|
||||
Reference in New Issue
Block a user