5 ms·
Xv6, a simple Unix-like teaching operating system
- jeffrallen 7y agoRuss Cox was involved in this, and also Go. There are important connections between them.
- enitihas 7y agoRuss cox also wrote re2, an awesome regex library using finite automata, and providing protection against regex match taking exponential time.
- mesaframe 7y ago>regex library using finite automata Ehh
- dbmueller 7y ago>>regex library using finite automata >Ehh By which you mean?
- russtrotter 7y agoI remember learning RE in the context of finite automata so I'm gathering that they are questioning the novelty of that implementation strategy?
- mesaframe 7y agoRegex is equivalent to Finite Automata
- rejschaap 7y agohttps://en.m.wikipedia.org/wiki/Deterministic_finite_automaton https://en.m.wikipedia.org/wiki/Deterministic_finite_automat...
- johnmarcus 7y agoWhat am I supposed to do with it?
- tyingq 7y agoLearn about Unix internals on something much smaller than the available alternatives?
- johnmarcus 7y agolike literally, i was asking for instructions. neither this post nor the github repo offered any instructions of what one is supposed to do with this, aka, how to build it, how to run it, or what to learn.
- tyingq 7y agoAhh, ok. I wasn't trying to be snarky, just pointing out that it's quite small and easy to fit in your head. It seems disconnected because it's the repo for the port to RISC-V. The instructions you're looking for are here for the original x86 port: https://www.cs.virginia.edu/~cr4bd/4414/F2019/xv6intro.html https://www.cs.virginia.edu/~cr4bd/4414/F2019/xv6intro.html
- johnmarcus 7y agoThank you, that is precisely what I was looking for.
- jmiskovic 7y agoThe included textbook is _really_ good introduction to systems programming. I highly recommend taking a look if you are interested in kernel programming or interaction between OS.
- johnmarcus 7y agothank you, that's useful information of what this is.
- tyingq 7y agoApparently noteworthy because late last year they ported the original x86 to RISC-V.
- ipnon 7y agoSimilar teaching operating systems include: Blog OS, an operating system written in Rust constructed through a series of independent tutorials.[0] The CS140E embedded operating system.[1] This OS comes from an experimental course taught by Dawson Engler at Standford. The instruction is lab-based with no lectures. The student builds the OS on a Raspberry Pi through the use of primary-source technical references like datasheets and ARM manuals. [0] https://os.phil-opp.com/ https://os.phil-opp.com/ [1] https://github.com/dddrrreee/cs140e-20win/ https://github.com/dddrrreee/cs140e-20win/
- monocasa 7y agoThe nice thing about xv6 is it gets a lot farther to be a full OS. User mode, ELF loader, an ascetic but usable system call table, etc.
- pmiller2 7y agoIf you want an even fuller OS for teaching purposes, early versions of Minix were designed with teaching in mind, and there’s a book to go along with it.
- monocasa 7y agoYeah, but they used a much more confusing architecture for early Minix (16-bit protected mode) that I'm of the opinion it obfuscates a lot of the underlying concepts. And xv6 has a book that goes along with it as well.
- andrekandre 7y agoalso, don’t forget about [0] (another rust-based learning mini for risc-v) [0] http://osblog.stephenmarz.com/ http://osblog.stephenmarz.com/
- ros65536 7y agoPintOS is also a nice learning OS that's been used in classes. It is initially incomplete and there are 4 projects to implement process schedulling, paging, files. It simplifies the learning process since the hardware related initialization code is already implemented and is readable enough to be understood, while allowing you to focus on implementing the main ideas in OSs. Currently I'm doing project 1 on my own. It would have been really nice if my university offered me something like this, to have instructor feedback.
- deleted 7y ago[deleted]
- lcall 7y agoFor some purposes, I wonder if OpenBSD would also be a strong candidate for learning about operating systems, given their focus on correctness, openness, portability, etc., and the fact that everything learned then becomes useful on a fully general-purpose OS that one could use in the long term (ie, lots of headroom, less need to start over for learning some things, somewhere else). The quality and good order of the documentation in particular makes it less or not necessary to go doing web searches etc to find out how to do things, but they take one in an orderly progression from installation, via FAQs and excellent manual pages, all the way along to useful development info.
- Koshkin 7y agoOpenBSD is huge (just like any general-purpose OS would be today). It's not a "teaching OS." Minix would be a better alternative, IMHO.
- vips7L 7y agoMinix is still huge compared to xv6
- cat199 7y agoagree - possibly any of the BSD's might be a good follow up for 'advanced' study since the codebase & kernel structures have a direct lineage. Maybe doing the 'base' course on like 4.2BSD which is still smaller and close to v7 might make sense
- beefhash 7y ago4.4BSD-Lite2 is the earliest they could do without risking some legal issues[1]. [1] https://virtuallyfun.com/wordpress/2018/11/26/why-bsd-os-is-the-best-candidate-for-being-the-only-tested-legally-open-unix/ https://virtuallyfun.com/wordpress/2018/11/26/why-bsd-os-is-...
- dang 7y agoPrevious discussions at https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=comments%3E0%20Xv6&sort=byDate&type=story&storyText=none https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que... (Reposts are ok after a year or so: https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html)
- gnunez 7y agoThe MIT Operating Systems opencourseware class labs has some great exercises when learning about operating systems[0]. I've also found older linux kernels, like v1.0, are easier to follow for learning [1]. [0]https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-828-operating-system-engineering-fall-2012/labs/ https://ocw.mit.edu/courses/electrical-engineering-and-compu... [1]https://mirrors.edge.kernel.org/pub/linux/kernel/v1.0/ https://mirrors.edge.kernel.org/pub/linux/kernel/v1.0/