10 ms·
Xv6, a simple Unix-like teaching operating system
- adastra22 4y agoWhy not MINIX?
- phendrenad2 4y agoMINIX isn't very Unix-like
- nineteen999 4y agoRight - for a start xv6 is a monolithic kernel, and MINIX is (mostly) not.
- nix23 4y agoThe kind of kernel is NOT a definition of a UNIX. Tru64 UNIX and QNX have Micro-kernels, DragonFlyBSD and MacOS Hybrid. Tru64 UNIX and MacOS are UNIX certified. >for a start https://en.wikipedia.org/wiki/Unix https://en.wikipedia.org/wiki/Unix Varies; monolithic, microkernel, hybrid
- nineteen999 4y ago> Tru64 UNIX and QNX have Micro-kernels, DragonFlyBSD and MacOS Hybrid. You're reading too much into my comment. The original PDP-7 (and later PDP-11) Unix are monolithic kernels. The most popular Unix variants or clones today (Linux, Free/Net/OpenBSD) are all monolithic kernels. Tru64 is long dead. QNX has a niche market. DragonFly ... not much market share. MacOS? As you say, hybrid, not microkernel, and is hardly successful in the same space that the monolithic kernel Unices are (ie. servers). It's not hard to argue that Unix has historically been a monolithic design, and that those have been the most successful, even if you can certify various microkernels. Of course this comment may not hold for another 50 years, but it is certainly true of the last 50.
- nix23 4y agoI would argue that linux and macos are the most popular. And its really not my problem if you think a unix has to be mono..thats just wrong and you know it.
- adastra22 4y agoI would argue MINIX is the most popular… as it runs in every Intel CPU.
- nineteen999 4y agoI hear this a lot - but given that consumer choice is pretty much taken out of the equation, I don't really consider popularity to be applicable. People don't buy Intel CPU's because of the Minix ME.
- deleted 4y ago[deleted]
- nix23 4y agoThat argument is just stupid...see smartphone rt-os in gsm chips, and btw it runs intel-me, not the chip. You can remove/disable it.
- nineteen999 4y ago> And its really not my problem if you think a unix has to be mono..thats just wrong and you know it. It's not really my problem if you think I said UNIX has to be a monolith, since I never said that. Xv6 is a reimplementation based on the original v6 UNIX design. As a teaching tool for the historical design of UNIX, it's a great place to start. If you want to study Unix-like microkernels, then MINIX and Tanenbaum's books are a great place to start. If you want to study hybrid Unix-like systems, then the Darwin source code might be a good place to start. MacOS as a popular, hybrid, desktop Unix is pretty much an anomaly in the course of Unix history. Study whatever you want, but for beginners to OS design, it's easier to understand hybrid and microkernel systems if you first know what a monolithic kernel is, and how various modern versions of Unix evolved from that in my personal opinion. Nobody really gives a rat's ass about UNIX certification in the real world ... except MacOS fans.
- Jtsummers 4y agoIt actually is Unix-like, and is even POSIX compliant.
- phendrenad2 4y agoEh, guess it depends on what you're using to compare them. A lot of things are POSIX-compliant. Heck, Windows NT was literally developed because the military wanted POSIX compliance. I consider something Unix-like if it is similar in structure and design to historic Unixes, or at least Linux. MINIX seems to be neither.
- nix23 4y ago>MINIX isn't very Unix-like Can you please tell me why do you come to such a wrong conclusion?
- melissalobos 4y agoI don't know quite what you mean? MINIX isn't free, which is pretty big for a student project. In fact people may have started a similar project(not big like GNU) to due to its price.
- kevin_thibedeau 4y agoIt's equivalent to 3-clause BSD. https://wiki.minix3.org/doku.php?id=www:documentation:license https://wiki.minix3.org/doku.php?id=www:documentation:licens...
- melissalobos 4y agoMy comment as may be noted was more a commentary on the historical licensing of MINIX which lead to Linux, see the original post. https://fossbytes.com/linus-torvaldss-famous-email-first-linux-announcement/ https://fossbytes.com/linus-torvaldss-famous-email-first-lin...
- chungy 4y agoThe same argument could be made to claim "Linux isn't free" given its very first license.
- yjftsjthsd-h 4y agoIt's reasonable to say it wasn't free, but MINIX 3 is FOSS now.
- ori_b 4y ago$ find minix -name \*.[chsS] | grep -v '^minix/external' | xargs cat | wc -l 3347361 $ find xv6-public/ -name \*.[chsS] | xargs cat | wc -l 9778
- Galanwe 4y agoFor those interested in a slightly more readable code and modern build system, shameless plug of my attempt at some xv6 modernization: https://github.com/NewbiZ/xv6 https://github.com/NewbiZ/xv6
- rdpintqogeogsaa 4y agoIs this a fork of xv6? Did you get permission to remove the LICENSE file?
- eesmith 4y agoI checked. It's definitely a fork. Eg, compare https://github.com/NewbiZ/xv6/blob/master/fs/fs.c https://github.com/NewbiZ/xv6/blob/master/fs/fs.c to https://github.com/mit-pdos/xv6-public/blob/master/fs.c https://github.com/mit-pdos/xv6-public/blob/master/fs.c . I didn't find a mention of the original copyright.
- markus_zhang 4y agoExcellent. I'm working on a local undergraduate class chain to reach Compiler, Operating System and Computer Graphics. The school is peanut comparing to MIT so we don't have difficult labs as in MIT or Berkeley's courses. I'll take MIT's after I get the basics from my university. Hopefully this can smooth the cliff a bit.
- apengwin 4y agogo bears
- dang 4y agoRelated: Running a Unix-like OS on a home-built CPU with a home-built C compiler - https://news.ycombinator.com/item?id=24680109 https://news.ycombinator.com/item?id=24680109 - Oct 2020 (69 comments) Xv6, a simple Unix-like teaching operating system - https://news.ycombinator.com/item?id=24567993 https://news.ycombinator.com/item?id=24567993 - Sept 2020 (21 comments) Xv6, a simple Unix-like teaching operating system - https://news.ycombinator.com/item?id=22511569 https://news.ycombinator.com/item?id=22511569 - March 2020 (32 comments) Xv6 for RISC-V - https://news.ycombinator.com/item?id=21040057 https://news.ycombinator.com/item?id=21040057 - Sept 2019 (8 comments) Xv6, a simple Unix-like teaching operating system - https://news.ycombinator.com/item?id=17592560 https://news.ycombinator.com/item?id=17592560 - July 2018 (79 comments) Xv6, a simple Unix-like teaching operating system - https://news.ycombinator.com/item?id=10798523 https://news.ycombinator.com/item?id=10798523 - Dec 2015 (14 comments) Xv6 - https://news.ycombinator.com/item?id=10566312 https://news.ycombinator.com/item?id=10566312 - Nov 2015 (47 comments) Ask HN: What are the best resources for learning Operating Systems with xv6? - https://news.ycombinator.com/item?id=8877714 https://news.ycombinator.com/item?id=8877714 - Jan 2015 (1 comment) Xv6 – A Simple Unix-Like Teaching Operating System - https://news.ycombinator.com/item?id=8620589 https://news.ycombinator.com/item?id=8620589 - Nov 2014 (28 comments) Xv6 - https://news.ycombinator.com/item?id=7558081 https://news.ycombinator.com/item?id=7558081 - April 2014 (36 comments) Xv6, a simple Unix-like teaching operating system - https://news.ycombinator.com/item?id=6971127 https://news.ycombinator.com/item?id=6971127 - Dec 2013 (78 comments) Xv6 - Unix V6 rewritten in modern, ANSI C for MIT 6.828 - https://news.ycombinator.com/item?id=3753216 https://news.ycombinator.com/item?id=3753216 - March 2012 (14 comments) Unix v6 Ported to ANSI C - https://news.ycombinator.com/item?id=3212515 https://news.ycombinator.com/item?id=3212515 - Nov 2011 (50 comments) Xv6, a simple Unix-like teaching operating system - https://news.ycombinator.com/item?id=2335824 https://news.ycombinator.com/item?id=2335824 - March 2011 (4 comments)
- plutaniano 4y agoI'm working my way through this[1] operating systems book and a few of the exercises[2] require customizing and compiling Xv6. It's so cool to code your own scheduler or syscall and see it working on a actual OS. [1] https://pages.cs.wisc.edu/~remzi/OSTEP/ https://pages.cs.wisc.edu/~remzi/OSTEP/ [2] https://github.com/remzi-arpacidusseau/ostep-projects https://github.com/remzi-arpacidusseau/ostep-projects
- dasz 4y agoLast time I looked this didn't have networking. Is that still the case? Anyone able to explain why networking was left out? Why I ask? I've seen a bunch of projects on GitHub for implementing xv6 networking.
- azhenley 4y agoMy favorite OS tutorial that I recommend to students, which uses Rust to target RISC-V: https://osblog.stephenmarz.com/ https://osblog.stephenmarz.com/
- garren 4y agoAlso, XINU, “ Operating System Design - The Xinu Approach”[0] The book isn’t free, but I’ve found it to be fun to work through. The projects are centered around building and running on small boards like beaglebone, Galileo, and more recently raspi (although this isn’t covered in the book.) [0] https://xinu.cs.purdue.edu/ https://xinu.cs.purdue.edu/
- wsc981 4y agoI just scanned the Xv6 book [0] and it seems the book's exercises aren't really to build an OS from scratch, but modify an existing bare-bones OS. When looking at the Xinu book index, it's not clear to me if the Xinu book is different. Does the Xinu book show how to write an OS from scratch or is the book also about making small changes to an existing OS? --- [0]: https://pdos.csail.mit.edu/6.828/2021/xv6/book-riscv-rev2.pdf https://pdos.csail.mit.edu/6.828/2021/xv6/book-riscv-rev2.pd...
- Jakobeha 4y agoIt's another bare-bones OS. I've taken the class at Purdue. The way the class works it was divided into 4 "projects" where you had to add features to Xinu. In my semester those were: a more advanced scheduler, locks, process permissions, and a file-system.
- Not_Oles 4y agoHello! I have an antique server with qemu set up to run Xv6.[1] I wanted somebody to go through the course with me.[2] So far nobody has come aboard, and I haven't really started. If anyone here might be interested, please feel free to get in touch: notoles@metalvps.com. It would be super great to have a few friends along! Thank you! Best wishes and kindest regards, Tom [1] https://lowendbox.com/blog/how-to-compile-the-3-items-needed-to-begin-mits-free-xv6-online-operating-system-course/ https://lowendbox.com/blog/how-to-compile-the-3-items-needed... [2] https://lowendbox.com/blog/invitation-to-join-me-for-mits-free-online-operating-system-course/ https://lowendbox.com/blog/invitation-to-join-me-for-mits-fr...
- Not_Oles 4y agoEarlier today I sent our first Xv6 Study Group email blast to the 15 people who have signed up. Also, I started a simple website for the group: https://metalvps.com/Xv6/ https://metalvps.com/Xv6/ I wasn't expecting such a big response! Thank you to all the guys who joined! Thank you HN!
- Not_Oles 4y agoHello again! Already have one person for our Xv6 study circle! Thank you HN! Anybody else? I'm going to sleep now, but if anybody emails me, I will for sure reply in the morning. Best! Tom
- deleted 4y ago[deleted]
- markus_zhang 4y agoReally wish I could join but I'm not there yet, need more work to get there. Good luck and have fun!
- Not_Oles 4y agoHi Markus! Thanks for your kind words. I read your comment[1] which explains what you are doing and suggests by implication why you might think you are insufficiently prepared. However, no law requires perfect preparedness. Why not take a few small bites of delicious dessert and see how they taste? Best wishes and kindest regards, Tom [1] https://news.ycombinator.com/item?id=32314583 https://news.ycombinator.com/item?id=32314583
- pjmlp 4y agoAh the book that set UNIX into the wild.
- sour-taste 4y agoOne of my favorite classes in college was Operating Systems, taught by Peter Fröhlich at Johns Hopkins. We modified and built new xv6 features. Here's the course webpage, with the excellent and fun assignments: https://www.cs.jhu.edu/~phf/2016/fall/cs318/ https://www.cs.jhu.edu/~phf/2016/fall/cs318/
- IshKebab 4y agoI'm not really sure how I feel about universities (which should be teaching modern technologies and methods) teaching ancient 70s stuff like Unix. Do we really want a new generation of people who think Unix was born perfect and cannot be improved upon?
- bigpeopleareold 4y agoNew things might have been introduced, but fundamentals haven't changed. OS's then and now still have schedulers, memory managers, file systems, etc.
- jamhan 4y agoYour comment is almost certainly the stupidest thing I have ever read on HN. I look forward to more insightful comments from you in this vein: "I'm not sure how I feel about universities (which should be teaching modern history) teaching ancient 27BC stuff like the Roman Empire. Do you really want a new generation of people who think the Roman Empire was perfect and cannot be improved upon?" I'm sure students would benefit more from MIT running courses such as "7.1729: An Introduction to 23 Not-Invented-Here JavaScript Frameworks" /s
- IshKebab 4y agoThis course isn't a history lesson. That is pretty clear if you read the course overview - https://pdos.csail.mit.edu/6.828/2021/overview.html https://pdos.csail.mit.edu/6.828/2021/overview.html > 23 Not-Invented-Here JavaScript Frameworks We're talking about operating systems. Do you know the difference between an operating system and a Javascript framework?
- weatherlite 4y agoIs it possible to get started on a mac (non intel chip)? I see there's some emulator thing / qemu that only runs on intel or something ...
- moyix 4y agoQEMU runs just fine on ARM macs :) It will emulate an x86 virtual machine that xv6 runs inside.
- weatherlite 4y agoOK the problem seems to be compiling xv6 then, it simply won't compile without a specially built compiler flags
- ngcc_hk 4y agoIs there any basic language eg Common Lisp, vim etc that can run on these?
- bionsystem 4y agoI really liked tinkering on os-161 from ops-class.org (Harvard) a few years back. They have a youtube channel with all of the video courses and various assignments including new features and bug fixing.