-
Notifications
You must be signed in to change notification settings - Fork 13
Home
Welcome to the scaraOS wiki!
ScaraOS is a 32bit mutiboot OS kernel for IA32 (PC/AT) systems. I wrote it to teach myself OS fundamentals and just to have a bit of fun. It already has PCI support, the beginnings of a paged memory management system, and the start of a VFS layer. It supports the basic PC/AT stuff such as timer, PIC, keyboard, floppy.
The most recent version includes a shedload of bugfixes as well as working pre-emptive multi-tasking and a system call interface. The only implemented system call so far is exit and exec. Implementations of fork, open, close, read, write are currently pending. You can grab a screenshot
The goals of scaraOS are not to reproduce POSIX or any other existing OS but to be a fun project for learning OS development. For this reason I am trying to avoid falling in to the trap of writing a bootloader with a lot of “drivers” and then calling it an “OS”. You can read the TODO list to get an idea of upcoming development. You will notice my priority is getting a functional userspace environment up and running rather than adding a lot of drivers. Also I haven’t mentioned what the userspace API is going to look like yet because I’m concentrating on getting things like Demand Loading, Page Cache and Context Switch implemented first.
Currently development is stalled on two maddening bugs. The first one is that exec system call works when invoked (via the int instruction) from kernel space but when a user task tries to exec() something it leads to an instant triple fault. I have NFI why. Also there appears to be some sort of memory corruption going on in the slab allocator. That part had been well tested in userland apps and it’s simple enough that I’m very confident it’s correct. But if my assumptions about how the CPU works are wrong enough that exec() from userland causes a triple fault then there could be some other machine state getting corrupted causing the panics in do_cache_free(). Very annoying just when I thought I was home free and getting ready to port bash and gcc ;)
On the positive side I’ve gone around fixing errors that hadn’t caused any problems for me yet such as the race between iget() and inode_free() and improving the double-free and free-non-allocated object checks in the slab allocator.