9 ms·
Xinu – A small, elegant operating system
- vonkale 8y agoGoogle cache: http://webcache.googleusercontent.com/search?q=cache:rNJQhgsfWtoJ:https://xinu.cs.purdue.edu/ http://webcache.googleusercontent.com/search?q=cache:rNJQhgs...
- GordonS 8y agoCurious to know if anyone has used this for anything serious, and what the main decision factors were for choosing Xinu?
- deaddodo 8y agoThey have a whole list on that page. Lexmark printers in the 90s, for instance, used Xinu.
- Delfino 8y agoInteresting, I worked at Lexmark for a few years and didn't know that. One of my professors at the University of Kentucky worked on Xinu, I wonder if he had any influence on it being used at Lexmark (the university and company are both based in Lexington, KY)
- avaidyam 8y agoPrinters sold by Lexmark until 2009 used Xinu onboard. Now they're some lightweight Linux.
- corerius 8y agoI expect that it's role in the OS ecosystem is mostly taken up by projects like FreeRTOS.
- koz1000 8y agoIn 1999 my team at Williams Electronics chose XINU as the O/S for the Pinball 2000 project: https://www.youtube.com/watch?v=8rHbsCyde1g https://www.youtube.com/watch?v=8rHbsCyde1g At the time, embedded X86 boards were not really a thing yet so we needed something simple that could run with a COTS PC motherboard. The major factor was that the licensing for other operating systems was too costly or too restrictive. Anything GPL-based was ruled out by our lawyers. Turning Linux into an RTOS would have forced us to release source code and that wasn't a fight with Legal that anyone had time for. XINU turned out to be just what we needed. The process limit wasn't a huge problem since we were used to running threads on a single process. Adding networking later turned out to be very easy.
- nkkollaw 8y agoWow, development started in 1980! That's commitment.
- EmilStenstrom 8y agoIn this particular case, I’d say it’s academic research.
- michaelmcmillan 8y agoNot mutually exclusive ;)
- nkkollaw 8y agoSure, but still.
- 6031769 8y agoDon't we all know an overly-litigious company with those four letters at the start of their name? Let's hope this doesn't spend the next decade in court.
- jarym 8y agoCrap this article jogged my memory - I now remember Xinu from when I was a teenager! It’s a fantastic bit of code for anyone interested in how operating systems are designed and built. Glad to see it’s still being kept alive!!
- facorreia 8y agoSame here. I learned the rudiments of operating systems by studying Xinu in college. That was pre-Internet, so text books like Xinu's were hugely helpful.
- JdeBP 8y agoMilenkovic's book on KMOS was rather underrated and overlooked, I found. It covered a couple of things that Comer and Tanenbaum did not.
- aarya123 8y agoThe professor who made Xinu, Douglas Comer, also contributed heavily to TCP. https://en.m.wikipedia.org/wiki/Douglas_Comer https://en.m.wikipedia.org/wiki/Douglas_Comer
- Nicksil 8y agoNon-mobile: https://en.wikipedia.org/wiki/Douglas_Comer https://en.wikipedia.org/wiki/Douglas_Comer
- ObsoleteNerd 8y agoIt's weird that Wikipedia redirects mobiles from the non mobile version to the mobile version, but doesn't redirect the other way around.
- Klover 8y agoThat’s likely because I’ve seen a lot of people working on Wikipedia either via code or via content, prefer the mobile version even on desktop. It’s a pleasant reading experience.
- laumars 8y agoThat's curious to read because I find the non-mobile version a significantly more pleasant reading experience. I don't even like the mobile version on my phone because I constantly get lost in page when I expand sections (maybe that's just down to my dyslexia?)
- rgovostes 8y agoThe name seems to have the same derivation as the name of the XNU kernel underlying Apple's operating systems: > XNU is an abbreviation of X is Not Unix or XNU is Not Unix. Wikipedia says the first release of XNU was in '96 (perhaps in NeXTSTEP 4.0?), though, far later.
- laumars 8y agoThe recursive acronym "something is not something_else" is a pretty common naming convention in software. Much like how there are a hundred different software projects out there called "Yet Another something". So I'm not at all surprised we occasionally get collisions. Still makes for a fun coincidence though.
- monocasa 8y agoGNU's Not Unix
- LukeShu 8y agoDo note that Xinu (1981) predates GNU (1983) by several years.
- vram22 8y ago>The recursive acronym "something is not something_else" is a pretty common naming convention in software Right. Goes back far, too: https://en.wikipedia.org/wiki/Recursive_acronym https://en.wikipedia.org/wiki/Recursive_acronym https://en.wikipedia.org/wiki/Recursive_acronym#Notable_examples https://en.wikipedia.org/wiki/Recursive_acronym#Notable_exam... I particularly like EINE and ZWEI: From the linked article: >the two MIT Lisp Machine editors called EINE ("EINE Is Not Emacs", German for one) and ZWEI ("ZWEI Was EINE Initially", German for two)
- dfox 8y agoThere is nowadays also DREI which officially stands for "Drei replaces EINE's inheritor" or alternatively for lots of other things (see the source for list), particularly "Drei reimplements Emacs intelligently".
- ww520 8y agoI browsed the source code a bit. Some interesting finds: * The code is pretty simple and clean, clearly for educational purpose. * There's no memory protection. All processes share the same memory space, along with the kernel. * No virtual memory, nor page table. * No notion of ring protection. The kernel and the processes run in the same ring. * Max number of processes is 8. The process table is a fixed size array, of 8 entries. * Context switch can be preemptive, driven by the clock interrupt. * Process scheduling is round-robin, first in first run. * Process priority is supported. Each priority has its own ready queue. All processes of the highest priority are run first in round-robin fashion, before running the next priority level. * "Program" is just a function. All "programs" in the system have their starting functions hardcoded in the shell's cmdtab[], like cat, ping, etc. Executing ping is just creating a process with the address of the ping function. * Loading a program from disk to run doesn't seem to be supported. * The local file system is based on RAM block device. Accessing data on actual disk doesn't seem to be supported.
- JdeBP 8y agoOr you could read the books, which explain the design and implementation in detail. (-:
- ww520 8y agoWould love to but I don't have access to the book. The website has very little on the design and feature of the OS.
- JdeBP 8y agoThe headlined page tells you that you do have access to the books. The second edition was published only 3 years ago, and is still in print from what I can tell. It's not really the 2nd edition, given that there was a LinkSys edition with revisions from the first edition published in 2011.
- fernly 8y agoThe book is on Amazon, priced at $40 hardback. No "Look Inside". https://www.amazon.com/Operating-System-Design-Approach-Second/dp/B01CMPKHJO https://www.amazon.com/Operating-System-Design-Approach-Seco...
- usermac 8y agohttps://www.bing.com/videos/search?q=xinu&&view=detail&mid=7F4FEDD48FE6881FD8807F4FEDD48FE6881FD880&&FORM=VRDGAR https://www.bing.com/videos/search?q=xinu&&view=detail&mid=7... 1st in the video list while investigating. ha ha
- deleted 8y ago[deleted]
- cabaalis 8y agoWas curious about one thing. On the Xinu website, under "Xinu in industry" in the 2000s, it says that the pinball game for Star Wars: The Phantom Menance uses Xinu. So I looked up that pinball game. On the wikipedia page for the game [1], it says that it uses Pinball 2000 hardware. And on the wikipedia page for Pinball 2000 [2], it uses Xina (Xina is not Apple) and not Xinu. Is there another variant of the OS? [1] https://en.wikipedia.org/wiki/Star_Wars_Episode_I_(pinball) https://en.wikipedia.org/wiki/Star_Wars_Episode_I_(pinball) [2] https://en.wikipedia.org/wiki/Pinball_2000 https://en.wikipedia.org/wiki/Pinball_2000
- koz1000 8y agoPinball 2000 engineer here. The "Pinball 2000 hardware" setup was an ATX motherboard running a MediaGX CPU (x86 clone, it lives on as AMD Geode). It also had a custom PCI card for storage and sound DSP, and a secondary board connected by parallel port for driving lamps and solenoids. XINA was an application layer on top of XINU that handled the executive tasks of running a pinball machine, and also abstracted the various hardware features. We used Allegro as the graphics SDK. The name XINA was inspired by XINU, and was an acronym for "XINA Is Not APPLE". APPLE was the previous pinball programming system, no connection to the computer company.
- bitcoinmoney 8y agoSo cool. This is why I always go to HN comments!!
- katastic 8y ago>We used Allegro as the graphics SDK. Wow! I keep finding Allegro in unexpected places. Great memories of learning to code games with it.
- ChickeNES 8y agoI'm curious, does the source code for XINA still exist?
- koz1000 8y ago
- j6jr85ehb7 8y agoI took classes with Doug Comer in college and I also maintained part of the Xinu lab while I was at Purdue. Great to see the impact it has had on OS education outside of Purdue!
- rovr138 8y agoCan you talk about the machines in the lab. I’m in WL and have seen in Greyhouse and in Lawson people battling with XINU enough that I’ve gone over to see what they’re doing. I’m curious about the machines used to run the code in, their boot processe, or anything you can talk about.
- avaidyam 8y agoWhat would you like to know? I did help set up a few things there. There's a special netboot-like version of Xinu deployed on the backend systems which are just Beagle/Galileo/whatever's been upgraded, and they deploy whatever Xinu image you've supplied. Students typically compile locally and submit the xbin (compiled kernel image) to a backend.
- 013a 8y agoThere are a few classes in Purdue's CS undergrad program (at least as recently as a couple years ago) which leaned a lot on XINU to teach OS fundamentals. Specifically in the 400-level Operating Systems course, we had one lab toward the end which reached into Linux for some basic stuff, but otherwise it was pretty much all XINU; playing with memory allocation, writing a new process scheduler, stuff like that. Purdue maintains a lab of XINU computers, which I believe are just Linksys routers of some kind, which students can log in to from anywhere to complete lab assignments, including a scheduling hypervisor which ensures that we weren't stepping on each others toes given there were only ~30 machines.
- avaidyam 8y agoNot Linksys routers! They're typically Beaglebone/Galileo cards or something newer now. They actually run a special netboot-like version of Xinu that deploys your compiled xbin. (So it's like Xinu running Xinu...) There also was no such hypervisor, mostly TAs that responded to email complaints and took systems offline when hogged on accident.
- avaidyam 8y agoOnce upon a time, a colleague and myself attempted to rewrite Xinu in Rust to show Dr. Comer how cool it was. Rust did not work. It was not cool. Dr. Comer simply smiled a gentle "I told you so," as he had good reasons for sticking to C.
- steveklabnik 8y agoWhat didn’t work?
- avaidyam 8y agoWe had tremendous difficulty convincing Dr. Comer that using an experimental/nightly toolchain to compile an experimental compiler variant to use experimental libraries in an experimental language was worth it. It took us quite some time to get everything up in a way that would work on most Purdue systems and our own personal ones and from there even translating the limited codebase we were using unsafe code blocks for nearly everything (and ASM blocks) and some internal code for multicore/ACPI-related things/Galileo boards we haven't made publicly available yet, AFAIK. At the end of the day, Xinu was small enough and very concisely written and maintained for several decades that switching to a language like Rust wasn't warranted. Similar to sqlite, I suppose. You can email me at avaidyam@purdue.edu if you'd like to know more details/talk to Dr. Comer about Xinu things.
- steveklabnik 8y agoAh, okay. That all makes sense! I thought you meant that like, the language couldn't do it at all. All the stuff you've said is the current state of things, roughly, for sure. Thanks! (I'd love to see OS classes use Rust someday, so I'm always trying to keep an eye out for things...)
- avaidyam 8y agoNo worries - while I personally enjoyed Rust it was clear that it was unsustainable for Dr. Comer. He means the best, I assure you. :)