Commit Graph

16 Commits

Author SHA1 Message Date
Matthew Leach
e2e7cdaeec timer: use a per-cpu wakeup queue
Currently, a global wakeup queue is used for all CPUs on the system.
This leads to inefficient behavior regarding preemption. When the
scheduler requests a preemption event, it is inserted into a global list
alongside events from all other CPUs.

When processing IRQs, there is no guarantee which CPU will handle the
timer interrupt. If the current CPU processes a preemption event
intended for a different CPU, it must signal the target CPU via an IPI.
This causes a severe bottleneck, as one CPU may end up distributing
preemption events for the entire system.

Fix this by implementing a per-cpu wakeup queue. Preemption events are
now strictly scheduled for the current CPU, ensuring they are handled
locally by the core that scheduled them. This significantly simplifies
the preemption logic and eliminates the need for IPIs to signal
preemption events.
2025-12-28 23:51:51 -08:00
Ashwin Naren
0f1a486abb Force preemption of idle task 2025-12-28 23:51:51 -08:00
Ashwin Naren
b818047a8a fix deadlock in interrupt handler 2025-12-28 23:51:51 -08:00
Ashwin Naren
0227e0dc9a Preempt IPI 2025-12-28 23:51:51 -08:00
Matthew Leach
116a1adbd0 clone: add all tasks to process task list
This prevents a bug where `sys_exit` calls `exit_group` for the thread's
process, even when there are still active threads.
2025-12-28 23:51:51 -08:00
Ashwin Naren
39d0bba0c6 EEVDF improvements
Use EEVDF concepts like virtual deadline correctly and actually calculate the necessary deadline and use it to schedule.

Also dynamically preempts based on the deadline.
2025-12-28 23:51:51 -08:00
Ashwin Naren
5e553096dd try fix scheduling on non-main cores 2025-12-28 23:49:33 -08:00
Ashwin Naren
b75f29804f schedule in round-robin fashion 2025-12-28 23:49:33 -08:00
ootinnyoo
bada97e048 implement pread* and pwrite* syscalls 2025-12-26 21:45:40 -05:00
Ashwin Naren
cd6d830ae9 Initial proc fs (#70) 2025-12-21 01:37:14 -08:00
Matthew Leach
9db6162414 formatting 2025-12-17 20:04:31 -08:00
Matthew Leach
264d603044 drivers: fs: tmpfs: new
Add tmpfs driver and register with the kernel driver's FS subsystem.
2025-12-17 20:04:31 -08:00
Ashwin Naren
e2534ffd9c Implement /dev/zero 2025-12-10 14:37:59 -08:00
Ashwin Naren
71f025b437 Implement /dev/null (#48) 2025-12-09 08:40:27 -08:00
Matthew Leach
30eb4fc794 timer: supress clippy warnings for PartialOrd impl
Clippy is complaining about a non-canonical PartialOrd implementation
for Instant.  We do this so that the instant that is going to be fired
next is always at the top of the Heap.
2025-11-22 12:47:02 +00:00
Matthew Leach
ca6fdd0da5 Initial Commit
Initial commit of arm64 bring-up code, kernel core (libkernel) and build
infrastructure.
2025-11-16 20:15:01 +00:00