mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[kernel] Remove process startup_bonus to timeslice
Previously we added startup_bonus to work around a segfault happening when we preemted a newly created process instead of letting it give up the CPU. Bug is not longer occuring, though that makes me nervous.
This commit is contained in:
@@ -123,7 +123,7 @@ scheduler::create_process(page_table *pml4, bool user)
|
||||
thread *th = p->create_thread(default_priority, user);
|
||||
auto *tcb = th->tcb();
|
||||
|
||||
tcb->time_left = quantum(default_priority) + startup_bonus;
|
||||
tcb->time_left = quantum(default_priority);
|
||||
|
||||
log::debug(logs::task, "Creating thread %llx, priority %d, time slice %d",
|
||||
th->koid(), tcb->priority, tcb->time_left);
|
||||
|
||||
@@ -33,9 +33,6 @@ public:
|
||||
/// How long the base timer quantum is, in us
|
||||
static const uint64_t quantum_micros = 500;
|
||||
|
||||
/// How much extra time (in us) to give a process to let it load
|
||||
static const uint64_t startup_bonus = 16000;
|
||||
|
||||
/// How many quanta a process gets before being rescheduled
|
||||
static const uint16_t process_quanta = 10;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user