Commit graph vbos/sched/proc.c
Author SHA1 Message Date
Michael Shaw
e2ea205129 proc: hack in special file descriptors
The previos commit broke executions of all program files due to a NULL
memory access when inserting special file descriptors. This will be
replaced when some sort of /dev fs is implemented
2024-01-24 18:49:06 -05:00
Michael Shaw
b7c10e80c2 vfs: complete restructure of vfs 2024-01-24 18:15:04 -05:00
Michael Shaw
c4ab990fe8 proc: add fallthrough for blocked/running procs 2024-01-22 21:47:24 -05:00
Michael Shaw
dc8f7126dc console: add license identifier 2023-11-29 20:04:37 -05:00
Michael Shaw
5136aba0bd sched: fix edge case on kernel process 2023-11-29 20:03:15 -05:00
Michael Shaw
a9196db5b3 sched: attempt to schedule next process 2023-11-29 19:45:21 -05:00
Michael Shaw
3dda839cdd syscall: implement write syscall 2023-11-22 23:27:39 -05:00
Michael Shaw
aac47e60f3 proc: free pages and fds after proc termination 2023-11-22 21:55:52 -05:00
Michael Shaw
83731d6eab proc: slab allocate proc structs 2023-11-22 21:29:15 -05:00
Michael Shaw
f8b801236a vfs: remove kernel file descriptor numbers 2023-11-22 21:09:05 -05:00
Michael Shaw
37518aea81 usr: implement user process switching
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>
2023-11-20 22:07:35 -05:00
Michael Shaw
d60da85470 load: add basic elf loading 2023-11-16 23:22:27 -05:00
Michael Shaw
fcbcde3666 sched: proc: formatting fixes 2023-11-14 13:31:38 -05:00
Michael Shaw
6ad5fe88b2 sched: irq: move all IRQs to new scheduling system 2023-11-13 23:38:35 -05:00
Michael Shaw
2fe0b0068b sched: begin scheduling module 2023-11-13 22:23:06 -05:00