Closed robert-w-gries closed 6 years ago
cc @phil-opp
Thought you might be interested in this. Let me know if you have questions or suggestions.
I plan on writing up a post on how and why I designed the scheduling code the way I did, I'll leave a note in blog_os
's gitter when I finish the write-up.
In x86_64
LockedHeap does appear to have an issue with deallocation after around 2000 schedules of process_test
. Meanwhile, there's an issue in i686
where a page fault occurs after one schedule of process_test
The
feature/usermode
branch is starting to become a massive development branch with unique features, so let's merge it into master. This PR is considered a WIP until the following is addressed:cr3
value set in our context switch is correct and that we can properly use pages. Investigation is definitely needed.userspace/syscall.rs
PIT is implemented and we can moveMove this into a separate PR. This one is big enough alreadyresched()
call out ofrust_main
and into timer irqMake the selection of the ready process a member of theThere is not much value in making process selection a trait method. If process selection is complicated enough to require a separate method, then it can easily be implemented on a per-scheduler basis.DoesScheduling
trait. Many schedulers use complex algorithms while selecting a process, and it should be a required method to implement.Major Changes
DoesScheduling
trait that will be implemented by all schedulersContext
that represents all registers saved by context switchgdt
andidt
modulesrxinu::syscall
error
moduleprocess
modulecreate
syscall for adding a process to ready listMinor Changes
bitflags
crate to1.0.1
rust_main
oom
implementation for BumpAllocator to call apanic
instead of abortingdefault_oom_handler
aborts by default. Aborts generate aund
instruction which prompts anINVALID_OPCODE
exception