-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue for Scheduler-Level Resource Sharing (SLRS) #12
Comments
kennystrawnmusic
added a commit
that referenced
this issue
Apr 3, 2023
kennystrawnmusic
added a commit
that referenced
this issue
Apr 3, 2023
kennystrawnmusic
added a commit
that referenced
this issue
May 7, 2023
kennystrawnmusic
added a commit
that referenced
this issue
Sep 23, 2023
kennystrawnmusic
added a commit
that referenced
this issue
Sep 26, 2023
kennystrawnmusic
added a commit
that referenced
this issue
Sep 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An important design goal I've had for a while related to this kernel is a better way to manage CPU resources at the scheduler level, thus taking the burden of needing to build multithreaded apps in order to take advantage of multiple cores off of the developer. That's where the
wake_ipi
interrupt handler has become an all-important tool.By telling the handler to first execute the instruction that the program counter points to and then go on to send the very interrupt that it handles to the next available core — such that all the CPU cores are passing the instruction pointer around to each other in a loop using the IPI as a means to that end — it's possible to preemptively schedule each instruction individually while bouncing from core to core. This makes it so that even single-threaded apps have all that power readily available to them.
Things to be ironed out:
Order in which the tasks are performed: don't know whether to mutate theupdate: definitely after; modifying the atomics can cause straight-up UB otherwiseACTIVE_LAPIC_ID
before executing the instruction stored by the IP or afterPerformance: currently uses anNot the best solution but usingAtomicU32
to track each Local APIC ID as the instruction scheduler rounds the robin; might be the only way to go about this but hopefully there's a workaround that is less resource-intensive.Ordering::Relaxed
is less resource-intensive thanOrdering::SeqCst
. Also, managed to cut the signature of the handler a bit by usingIterator::cycle()
which I didn't know existed..as_ptr::<fn() -> ()>
to lie to Rust that the instruction pointer is a function pointer (when in fact it isn't) in order to execute the instruction that it points to. There has to be a better way than that; if someone from the Rust team (or from @rust-osdev) has insight into this it would be greatly appreciated.The text was updated successfully, but these errors were encountered: