This is the first version of the kernel with fully isolated threads for
user and kernel tasks, where process 0 is only used for scheduling and
interrupt handling.
User process have a "buddy" kernel process that handles its tasks in the
kernel.
This system allows for easy blocking of threads without much need for
thought. Just `sswtch` in an infinite read loop, and your userspace
process will be blocked.
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This is a milestone update, as userspace applications are now able to
properly read from TTY devices, be blocked while waiting, and write the
output back. Userspace development will move much faster now that these
kinks have been worked out.
This version will be tagged as vbos v0.01
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
Previously, the vfs heavily relied on the physical filesystem for
directory parsing, which limited capabilities to a single filesystem,
save letter-based indexing which will not be used.
Now, vnodes are parsed in the VFS, and only requested on-demand, greatly
reducing complexity and reliance on physical drivers for handling.
This temporarily removes the ability to create files with the current
drivers.
This is a rather large commit, so the gist of it is this:
User context switching is now functional, after a change to the TSS, and
a few minor details in the scheduler and loader.
ELF parsing is rather primitive, but basically functional, as long as it
only loads code.
The interrupt 0x80 is for syscalls, and will switch from user mode to
kernel mode. It is currently the only interrupt that can be called from
user mode
This adds the syscall functionality, which currently uses a red-black
tree to store the function pointers, although when the table is more
flushed out, it will probably be replaced with an array
The pager now correctly marks the parent nodes with attributes as it
allocates them. Without doing this, the page table entries will never be
reached in lower privilege modes, causing page faults
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>