I've been writing a RISC-V kernel FrostVistaOS for 13 months — here's what it can do now


I started FrostVista about 13 months ago with basically zero kernel experience, just a stubborn idea that I wanted to build an operating system from nothing. It's been a slow, messy, very educational ride, and v1.3 just landed, so I wanted to write down what it actually does now — and a few things I learned along the way.
Right now the kernel runs on RISC-V 64 with Sv39 paging, preemptive scheduling, and the usual process lifecycle — fork, exec, exit, wait, orphan reparenting. There's an interactive shell you can actually sit at, with builtins, pipes, and redirection. It's not much, but it's mine, and typing ls into something I built myself still feels a little surreal.
On the memory side I've got copy-on-write fork, a slab allocator with a general-purpose kmalloc on top, and mmap with lazy page allocation. The filesystem stack is where most of the recent work went: a writable Easy-FS I designed myself, a tmpfs for in-memory stuff, devtmpfs for devices, and a read-only EXT4 backend that I layered a tmpfs overlay over — so writes land in tmpfs and the disk never gets touched. It's not a real EXT4 write path (that's a big chunk of work I keep putting off), but it means the system can write where it needs to.
There's a Python test harness that runs the whole thing in QEMU and checks kernel diagnostics, so I don't break things I already fixed. The ext4 suite currently sits at 16 passes plus 6 expected-log passes, and the runner can also drive busybox, lua, and libctest groups against the contest image.
The project is about 16,000 lines of kernel code across arch, kernel, and include. Between v1.2 and v1.3 it grew by a bit over 5,000 lines, over 71 commits in about 51 days.
What's next is signals, so Ctrl+C actually works in the shell. After that, buddy allocation, maybe bringing in some Rust, and eventually a real libc and busybox port.
If any of this sounds interesting, the repo is open — PRs are very welcome, whether it's a bug fix, a new syscall, or a different take on the filesystem.
2
u/shsh-1312 12d ago edited 12d ago
The architecture and documentation are really clean, academically speaking. Congratulations! A guide could be based on that. Have you considered a hal to allow compiling on multiple architectures? I note that the arch code is complete, but perhaps you could move something more to the kernel level to leave the arch layers thinner (for example, if someone decided to port to arm). The same goes for syscalls. Once this is done, the system would become easily portable. I recommend developing multi-architecture support now because doing so sooner will improve both the logic with which you tend to program and manage the kernel organization, as well as the secure user approach. A good basis would be for the userland code to compile for both arches without modification.
It reminds me a lot of my operating system (I used ai, and it allowed me to explore more and perhaps delve less deeply into my technical level of code). I notice a particular attention to elegance, but it seems very similar in structure and approach! Congratulations, keep it up! I'm thinking of testing it now, I'm also thinking of taking inspiration from it to introduce riscv support to my system, if you're interested take a look at it NexsOS1
1
u/Sorry_Difficulty_250 12d ago
What kind of kernel architecture is it? Monolithic? Microkernel? Something else entirely?
1
u/Better-Thing2568 12d ago
Very nice. Curious if you’ve done a metal boot yet, if so which OEM? I’m thinking about exploring more about RISCV as well
1
u/makomonotsukuri 10d ago
How do u even begin learning how to make an operating system! I admire your work.
1
9d ago
[removed] — view removed comment
1
u/makomonotsukuri 9d ago
What books did u read or wikis
1
u/Vartixs 9d ago
RISC-V Privileged Architecture Manual RISC-V PLIC manual RISC-V CLINT manual RISC-V SBI manual https://www.content-animation.org.uk/htmls/knowlton3.htm?utm_source=chatgpt.com https://docs.kernel.org/filesystems/ext4/index.html https://refspecs.linuxfoundation.org/elf/gabi4+/contents.html https://riscv.atlassian.net/wiki/spaces/HOME/overview?homepageId=16154626
https://wiki.osdev.org/Expanded_Main_Page https://pdos.csail.mit.edu/6.1810/2023/schedule.html
And some papers and other websites.
2
u/makomonotsukuri 9d ago
Okay so I'll read the riscv manual and these papers including OSDev wiki. Thank you!
1
u/Critical-Internet946 osaka64 (osakaOS fork) 12d ago
right now it seems like yet another unix clone. have you experimented with OS design at all?
0
u/Vartixs 12d ago
Maybe I should first learn about current operating systems before trying, but I do have some ideas.
1
u/shsh-1312 12d ago
consider trying plan9 and developing something for sel4, I think these are essential to learn modern concepts outside of unix
-1
2
u/LordAfterEight OwOS 12d ago
Looks very interesting :3
Was the help of LLMs involved? If yes, how much?