Compare commits

..

No commits in common. "faa71d08c500f2b2ca1d62cbe6f783ff6051d388" and "49c3ff8499900d56ade16430dbdc88987e6dda65" have entirely different histories.

3 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ impl Executor {
loop {
self.run_ready_tasks();
// TODO: We need some sort of semaphore wait here.
syscall::thread_sleep(10).unwrap();
syscall::thread_sleep(50).unwrap();
}
}

View File

@ -4,7 +4,7 @@
#include "interrupt/apic.h"
#include "interrupt/timer.h"
const uint32_t kScheduleFrequency = 100;
const uint32_t kScheduleFrequency = 20;
ApicTimer* gApicTimer = nullptr;
void ApicTimer::Init() {

View File

@ -186,12 +186,12 @@ uint64_t cnt = 0;
extern "C" void isr_apic_timer();
extern "C" void interrupt_apic_timer(InterruptFrame*) {
cnt++;
if (cnt % 100 == 0) {
if (cnt % 20 == 0) {
if (cnt == 20) {
KernelHeap::DumpDebugData();
phys_mem::DumpPhysicalMemoryUsage();
}
dbgln("timer: {}s", cnt * 10 / 1000);
dbgln("timer: {}s", cnt * 50 / 1000);
}
gApic->SignalEOI();
gScheduler->Preempt();