Hacker Newsnew | past | comments | ask | show | jobs | submit | vkoskiv's commentslogin

My hobby x86 kernel. I'm targeting my 80486DX2-66 PC with 32MB of RAM. This project has had a few false starts over the years, where I lacked the prerequisite knowledge to be able to properly debug things. So while the initial commit is from 2020, most of the progress is from the ~180 or so commits I've done in the last month since I picked it up again in early February. A month ago it booted from a floppy and printed some debug info to the screen showing it set up GDT, IDT and some static page tables. Now I have basic virtual memory with kmalloc()/kfree(), task switching, user mode and a few syscalls, and just this past weekend I got my floppy driver to a state where it can now (semi-)reliably detect and read data off floppy disks. I already have a userspace prototype of an ext2 parser I wrote for this in 2024, so all I need to do now is to bring that code in to the kernel and I should have filesystem support!

It's been a ton of fun to work on. Every subsystem is still flaky so I run into the wackiest bugs imaginable. I'm really grateful for the resources[1] and incredible tooling[2] that enable me to work out my frequent mistakes. I can hardly fathom how Torvalds did this with just his PC running Minix!

No idea how long I'll keep working on it. I think I'd be pretty happy if I got a real-world, non-trivial program running on top of it, but in the meantime it is serving as a good distraction from life worries at least :]

[1]: Intel 80386 Reference Manual, Linux man pages, wiki.osdev.org, various datasheets and the occasional query to ChatGPT free tier.

[2]: QEMU+gdb, Bochs, GCC 9 & binutils


Very cool! I just added a ps/2 keyboard driver to my kernel and I’m looking into scheduler / user mode and FAT filesystem support at the moment

Nice! My keyboard code is still very bare bones, so I interact with my system using debug commands assigned to individual keys.

Since we're both working on a similar project, I think it could be fun to talk about OS development and share our findings (and weird bugs!) I have this same username just about everywhere, so do reach out if you're interested! Best of luck with your project either way :]


I just checked this, and it seems like GitHub is a bit weird about tracking these. It didn't show up on my profile at all until I just now forked[0] torvalds/linux on GitHub. Now it shows up on my profile on May 9th (author date), but the link to the commit is broken, because repository authors page it points to filters on the commit date, not the author date.

Broken link points here and shows no commits: https://github.com/torvalds/linux/commits?author=vkoskiv&sin...

If I correct the date range to include the maintainer commit date (May 15th), the commit shows up: https://github.com/torvalds/linux/commits?author=vkoskiv&sin...

Also strange that if I only filter on author[1], nothing shows up. Though I suspect that dataset might only be updated periodically.

[0]: https://docs.github.com/en/account-and-profile/reference/pro...

[1]: https://github.com/torvalds/linux/commits?author=vkoskiv


I wanted to hold off on that upgrade until I found a source of reliable, high-quality PATA SSDs. Haven't looked into that yet, suggestions welcome!


If it really is PATA, my course of action would be to get a pata-to-cf adapter and get a fast and large CF card.


The joke gets even better when you consider that the subsystem maintainer that reviewed my patch is also Finnish :]


Thanks! I haven't, but I probably should, since you're the second person asking about it. The site is built with Zola[0], and it's using the Radion[1] theme, with small modifications.

[0]: https://www.getzola.org/ [1]: https://github.com/micahkepe/radion


Kiitos!


Thank you! It is indeed!


Bravo. Awesome work.


> For many apps the main source of memory usage isn't stack or heap memory consumed during runtime, it's the loading of the binary itself into memory.

Does iOS not do demand paging?


AFAIK not for the program itself. Plenty of ability to page for other runtime memory consumption. I can only assume this is done with a presumption that responsiveness is a greater priority than the ability to accommodate extremely large binaries and suffer cache thrash.

While the process is active the whole binary is loaded (note: may not include dynamically linked libs, which is why that's a good idea - dylibs can be configured to load on-demand).

A triply-good reason why the pattern of "giant ball of statically linked things" is an anti-pattern.


I did a lot of this for my raytracer, c-ray [1]. Originally it was just a self-contained C program, but I got tired of writing buggy and limited asset import/export code, so eventually I put together a minimal public C API [2] that I then wrapped with CPython bindings [3] and some additional python code [4] to expose a more 'pythonic' API. It's all still a WIP, but it has already allowed me to write a Blender plugin [5], so now I can play around with my renderer directly in Blender, and test with more complex scenes others have made.

Fun project, and it's really cool to see my little renderer in the interactive viewport in Blender, but I have also learned that I don't particularly enjoy working with non-trivial amounts of Python code.

[1] https://github.com/vkoskiv/c-ray [2] https://github.com/vkoskiv/c-ray/blob/51a742b2ee4d0b570975cd... [3] https://github.com/vkoskiv/c-ray/tree/51a742b2ee4d0b570975cd... [4] https://github.com/vkoskiv/c-ray/tree/51a742b2ee4d0b570975cd... [5] https://github.com/vkoskiv/c-ray/tree/51a742b2ee4d0b570975cd...


Somewhat related, curiousmarc has an absolutely brilliant video series from 2016 documenting the restoration of an Alto II:

https://www.youtube.com/playlist?list=PL-_93BVApb58I3ZV67LW3...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: