Some time ago, when i discovered xv6, I started playing with it and I ended up: - Refactoring the build system - Lots of clean of the code - Adding a real distinction between distribution and kernel - A clean libc - Tons of other stuff You can find it here: https://github.com/NewbiZ/xv6 Considering the original build system, I think having a look at this just for the sake of the cleaner makefiles is worth it. There i…
Xv6
51–53 of 53 posts
Re: Xv6
#52A few months ago I went through xv6 on my own as an experiment in getting better at systems programming. I wrote a bunch of posts about it, in case people are interested: Grokking xv6: http://experiments.oskarth.com/unix00/ What is a shell and how does it work?: http://experiments.oskarth.com/unix01/ What's on the stack?: http://experiments.oskarth.com/unix02/ (video of tracing a system call from user space to kernel…
Thank you for this. I know what I'm reading for the next two months! In your original post, you mention one of the goals being able to contribute a patch to a modern OS such as BSD or Linux. After your experiment, do you feel like this is the case?
I feel like I could after maybe ~30h (really I don't have enough information to determine beyond it probably being between 10 and 100 hours) of focused effort. I did read a bunch of The Design and Implementation of FreeBSD and I felt like I could understand it reasonably well, using the mental models I picked up studying xv6.
The reasons why I didn't do it (yet) are interesting in themselves. There was nothing in particular that I felt was missing from FreeBSD, and I hadn't used the "advanced" parts of the OS enough to run into any bugs. Because of this I think I lacked a sense of ownership, and the artificiality of a bug hunting activity caught up to me, motivation-wise. To do this I think you need to be motivated to dive into the nitty-gritty of a particular part of the OS, in addition to having a good understanding of the OS as a whole. Instead I ended up exploring some of the more advanced parts of FreeBSD (Jails and ZFS) with http://experiments.oskarth.com/netpowder/ - hopefully I will find something useful that I want to either extend or a bug I want to fix, or perhaps I get to test the hypothesis with something completely different (such as Mirage OS).
Re: Xv6
#53I took 828 and really enjoyed it. It was one of the best classes I took at MIT. The other OS for that class is JOS, which is the one you build through the labs. It's similarly simple to understand and not that long to build.
Looks like http://ocw.mit.edu/courses/electrical-engineering-and-comput... is accessible, but I'm not sure how much content is free.