Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Message passing will make the kernel dead simple, after that it is all userland. This makes it much much harder for one device driver you're writing to crash another (or the kernel) by data corruption. A simple post mortem crash inspection will tell you what went wrong. Instead of doing the same on a whole kernel you'll just have that one little process that goes under, and the rest of the machine is still working.

I don't think I could have ever gotten my little OS to the self hosting stage without that.

It still took more time than I care to remember though :)

A virtual machine is a great tool as well, especially if it gives you access to the cpu contents of the running VM.

That will save you days if not weeks trying to find out why your switch from 'real' to 'protected' mode during the boot didn't work...



Yes, that's why I recommended QEMU (which is a fast system emulator). A simple postmortem crash inspection will tell you what went wrong anyway. Simply write a normal micro handler to dump the registers at the end. Since you have the RIP, just objdump your binary and read the assembly from where it took the #GP or #PF. If you blew the stack away, you should automatically know from RSP, etc, etc.

Kitten[1] is the LWK which I work with, although my focus is on the Palacios VMM. It's quite a simple OS that is by no means out of a good programmer's reach.

[1] https://software.sandia.gov/trac/kitten




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

Search: