Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Open Source Operating Systems Software Upgrades

New Release of MINIX 3 For x86 and ARM Is NetBSD Compatible 93

An anonymous reader writes MINIX 3 is a small POSIX-compliant operating system aimed at high reliability (embedded) applications. A major new version of MINIX 3 (3.3.0) is now available for download at www.minix3.org. In addition to the x86, the ARM Cortex A8 is now supported, with ports to the BeagleBoard and BeagleBones available. Finally, the entire userland has been redone in 3.3.0 to make it NetBSD compatible, with thousands of NetBSD packages available out of the box. MINIX 3 is based on a tiny (13 KLoC) microkernel with the operating system running as a set of protected user-mode processes. Each device driver is also a separate process. If a driver fails, it is automatically and transparently restarted without rebooting and without applications even noticing, making the system self-healing. The full announcement, with links to the release notes and notes on installation, can be found at the Minix Google Groups page.
This discussion has been archived. No new comments can be posted.

New Release of MINIX 3 For x86 and ARM Is NetBSD Compatible

Comments Filter:
  • by Anonymous Coward

    with today's HW. Haha, wouldn't that be funny if ten years from now Linux and Minix switched places? [eastoftheweb.com]

    Nah...

    • Finally I have something useful and old fashioned to do with my Beaglebone Black. Running Linux on it was kinda boring.
  • Does anybody know what exactly is novel in the Minix 3 approach? Microkernels (or small macrokernels) with restartable drivers are well known and already used in the real world.

    • by DarkOx ( 621550 ) on Tuesday September 16, 2014 @09:31AM (#47917269) Journal

      Its not novel but its simple and clean. Minix is really an education tool more than a production ready OS.

    • Re:High reliability? (Score:5, Interesting)

      by bluefoxlucid ( 723572 ) on Tuesday September 16, 2014 @09:39AM (#47917337) Homepage Journal

      The novel approach is that Tanenbaum invented the fucking thing. The specific current advantage is low-latency IPC--on ARM, Minix IPC doesn't even have a measurable cost (the context switch time required is under 20 microseconds), while on x86 IPC is more than 10 times faster than L4.

      Monoliths, e.g. Linux, don't have IPC latency because they don't context switch when making calls between major kernel functional units. Of course, if your network driver crashes, your whole system gets fucked up and dies; whereas Minix tries to take a state snapshot, reconstruct something workable, load it into a fresh run of the network driver, and continue without a hickup. This works extremely well with the disk and FS drivers. Ideally, we want this without paying for it.

      • by MobyDisk ( 75490 ) on Tuesday September 16, 2014 @10:15AM (#47917617) Homepage

        Minix tries to take a state snapshot, reconstruct something workable,

        That's frieking fascinating. I just posted about how I didn't think restarting a driver could really be transparent because state would be lost. Then I read that it actually transfers the state. Do you have any good links with an overview of that? My immediate thought is "well, if the state is transferred, won't the restarted service crash too?" but I'm guessing someone has already thought of that...

        • Re:High reliability? (Score:4, Informative)

          by bluefoxlucid ( 723572 ) on Tuesday September 16, 2014 @10:47AM (#47917973) Homepage Journal

          No idea. I've seen the performance tests where they repeatedly send kill signals to the disk driver to crash it over and over, and measure its impact on performance--large when you have this in a tight loop, yet the system trudges along, and stops being so god damn slow when you stop killing the disk service 1000 times per second.

          I can conjecture a lot about how it is and isn't possible--obviously you can't just restart a snapshot from a few ns ago, or tell it to try again, or rerun the service and dump the same exact data back over it; but you can resubmit requests and messages in any number of ways. If you're careful to use a request-acknowledge-free workflow (send a request, wait for an acknowledgement that it's completed, then free the memory for the request when it's acknowledged or when the requested information is returned), you can always replay a request if the server dies. You can even use a mediator to resubmit uncompleted requests or stored state (received frames, journaled file system actions, etc.) to a service if it gets restarted, hiding that process from other services.

          Minix documentation and demonstration show that they restart the service and it completes all requests--state is snapshotted and restored. How that state is snapshotted--internal to service, mediated by a message passer, or resubmitted by client services--I don't actually know. I just know it does it and it's technically possible in any number of ways.

      • by Megol ( 3135005 )

        10 times faster IPC than L4 on x86?!? That requires user level IPC like done in Barrelfish and ZIMP ("ZIMP: efficient inter-core communication on multi-core machines" ).

        Got any proof that the Minix IPC performance is so much better than what is commonly known as one of the most efficient IPC implementations in existance?

        • Re:High reliability? (Score:4, Informative)

          by bluefoxlucid ( 723572 ) on Tuesday September 16, 2014 @11:04AM (#47918169) Homepage Journal
          Last time I looked at this, L4 was some 1-2mS context switch on x86, back in the 1GHz chip era; Minix was 100uS; and it was some 20uS on ARM. ARM is a good architecture--even L4 was ridiculously fast on ARM. Mach was slow as balls all the time.
          • by Megol ( 3135005 )

            https://www.l4ka.org/126.php [l4ka.org]

            Opteron 1.6GHz - 0.14s context switch

            This on a 11 year old CPU...

            • Should be 0.14us as per the title

            • Huh. Last time I looked at this stuff was 2003. Anyway modern IPC doesn't context switch; it mode switches in Minix, transferring in kernel mode on the same context, sort of. It's complex. Linux does the same thing, but with a monolith.

              • by Megol ( 3135005 )

                That doesn't change the fact that L4 _never_ had a 1ms context switch time. Not even on a 486 was it never that slow, the kernel entry cost was 200 clock cycles.

                The L4 kernel have always been in the front of pure IPC performance, it is as simple as that.

                Also for other people reading this there are a number of features that enable even faster microkernel performance today, the syscall/sysenter instructions makes entry to kernel mode less expensive than the traditional interrupt handler (which due to x86 sema

      • by LWATCDR ( 28044 )

        Are the drivers reneterent? If so you could in theory clear the data pages and restart the code instead of any type of reload.
        Over all I am very excited by this news. Minix 3.0 has been very interesting but lacked apps. Being BSD compatible really helps with that issue.

      • Monoliths, e.g. Linux, don't have IPC latency [...]

        In the case of non-memory-mapped I/O (e.g. anything that goes through a file descriptor), the major cost isn't context switching, it's copying data. Microkernels have to transfer all this data between address spaces. Macrokernels, on the other hand, have to transfer it between user space and kernel space. It's basically the same operation with basically the same cost, but it falls under a different heading.

        • Yes. Minix writes to a memory area shared between contexts, so there's no copying. Messages are also fixed-length packets, so no buffer overruns.

          • Incidentally, QNX has an interesting design in this respect, in that it maps the the source buffer (a page at a time, IIRC) into the address space of the receiving process, and does the copy directly. Or it might map the destination buffer into the address space of the sending process; not sure about that. This allows messages to be arbitrary-length.

      • by LWATCDR ( 28044 )

        I wish that they had ported the FreeBSD userland. I am think FreeNAS with ZFS on Minix as a killer NAS solution.

    • Minix has been around since the early 1980s, so it is hardly novel anymore. Microkernels are also quite popular, Apple Mac OSX uses one and that is what I am using right now. Slow? Maybe. I never tried to do a proper benchmark, but sometimes it does feel annoyingly sluggish.
  • by MobyDisk ( 75490 )

    If a driver fails, it is automatically and transparently restarted without rebooting and without applications even noticing, making the system self-healing.

    When things are restarted they lose their state. I don't see how applications will not notice that. For example, if an application has an open file handle, it seems unlikely that the file system could be "restarted" without a write failing.

    • Sure. So we've upgraded from the system crashing to one write failing.
      • by MobyDisk ( 75490 )

        Certainly that would be a big benefit. But that isn't what the article says happens. The article says it is "transparent" and applications won't even notice. I'm unclear how that is possible and I am looking for input on that. Some other replies are talking about that though, and it sounds interesting...

    • by bluefoxlucid ( 723572 ) on Tuesday September 16, 2014 @09:41AM (#47917355) Homepage Journal

      The file system write or read request doesn't return anything, the driver is detected as dead (heartbeat?), it's killed, resurrected, journals are replayed, and the request is resubmitted to the FS driver.

      It'll work. The program might notice a small pause, as if the disk was busy or the kernel yielded schedule to an interrupt handler.

      • by MobyDisk ( 75490 )

        So the drivers are stateless?

        • by bluefoxlucid ( 723572 ) on Tuesday September 16, 2014 @10:38AM (#47917871) Homepage Journal

          You can reconstruct state. A read request from hard disk will work the same way, repeatedly; a write request to a file system will write to a journal or the same blocks in a file or inode, while a write to a hard drive sector is isometric. Keeping the request buffer, resubmitting the request, and so on lets you reconstruct state. Even a network driver theoretically could read state from the network: it could request DMA from the NIC to a buffered memory area with a control structure of known layout, and the resurrection server could provide the control structure and buffered memory areas back to the driver if it needs to restart.

          The remainder of the driver state can be discarded. Bringing in new network frames, new writes to file systems, or the like shouldn't depend on the driver's internal state. Repeated crashing--for example, reloading the network driver as above and having the control structure point to a buffer of unmapped memory--could signal the OS to simply drop state and start fresh. Recovery is possible in many cases: TCP/IP, as a separate driver, would simply experience a dropped frame (lost packet), handling a state-reset network driver the same way as any other faulty media; a failed hard drive write would signal the FS driver to resubmit its write; and a failed file system operation could go so far as to reload the driver and run a journal replay or file system check (non-journaled file systems could use an in-memory journal to facilitate file system driver recovery).

          Consider state as a collection of significant and insignificant states. My Web browser right now has a lot of stuff in memory, a lot of things rendered on the screen, a state of how far down I've scrolled, and state describing where in memory all these things are--and where this text I'm typing is stored. If we unload the browser and then re-launch, the only state I need restored to post this message is a copy of this message, dumped anywhere in RAM, with a specific pointer somewhere referencing that buffer as the context of this particular textbox on this Web site. The browser's state may be completely different, yet only that piece of information is important; I can recover the rest by coming to this page and hitting "Reply To This".

          From that view, it's not hard to recover discrete processes in an OS. File system separate from disk driver means the FS can handle a disk driver crash and reload; user prorgrams won't notice a file system driver crash if the system just waits for the FS driver to reload and replay a journal or such to return state to sanity. The task entry for the user program tracks all the file handles. All of these things are separate, can communicate between mediators, or can mediate their own communications.

          • by itzly ( 3699663 )
            How would you resume an open TCP connection after restarting the network driver ?
            • Because TCP is a separate driver, and tracks the TCP connections on its own. And in ISO-speak, TCP is in the Session layer, not the Network layer.
    • by Megol ( 3135005 )

      Depends on how it's done. It's possible to have replicated data fully or partially so that things would just work with a little bit longer latency.

      Of course there will always be a failure mode in any system however it is possible to push it to very unlikely scenarios (like the data center being the target of a nuclear attack). The cost is in most cases not engineering work IMHO but runtime performance, reliability will cost at least a constant factor for all critical operations. Which is worth it (still IMH

  • by Anonymous Coward

    Making it netbsd compatible is a stroke of genius.

    • How so? As opposed to making it compatible w/ FreeBSD, which is a lot more popular?

      I welcome the addition of Beaglebone support, but would like to see support spread to Arduino and Raspberry Pi platforms. Minix won't be a first choice for any laptops, but it sure can be the first choice of these cards, where the small footprint actually helps.

  • Don't present userspace drivers as a panacea for all kinds of driver troubles: when a driver fails, it can make the hardware it drives hang your machine solid from the hardware's side, or make said hardware DMA all over your RAM with complete disregard any CPU-imposed protection; there's no safe recovery from such a situation, and in this case applications had better be stopped even if they appear to be still running.
  • Linux currently leads. Minix needs a bunch of drivers implementing kernel event hooks, inotify, dnotify, etc. Essentially, everything for udevd, systemd, and dbus. These wouldn't be integrated in core, and so could only come online when building a distribution to support a Linux-like user space. Could even implement iptables. Would need ext4, xfs, btrfs, zfs, and fuse drivers eventually.
    • by Anonymous Coward
      Why?
    • by Anonymous Coward

      > Minix needs a bunch of drivers implementing kernel event hooks, inotify, dnotify, etc. Essentially, everything for udevd,
      > systemd, and dbus.

      No, please let systemd out of Minix. Lets not contaminate another Unix implementation with it.

    • by itzly ( 3699663 )
      And when it's all done, it will be more complex than Linux.
  • Thousands of packages, but the real question is: does it run SystemD?
    • by Anonymous Coward

      Betcha emacs does.

    • by Anonymous Coward

      systemd is a reason to consider switching from Linux to Minix.

  • by SkOink ( 212592 ) on Tuesday September 16, 2014 @10:44AM (#47917939) Homepage

    As an embedded-systems guy, I'd _love_ to have a Unix-like where I could schedule events that were guaranteed-by-design to fire within some deadline of when they were scheduled. Then I could host my once-per-kHz hardware service routines on the same processor that was also running my device's web-server.

    Minix's microkernel architecture seems like an ideal fit for that kind of use case. If there are any Minix devs reading this thread, how easy would it be for me to make a system like that using Minix?

    • VxWorks?
    • by tlhIngan ( 30335 ) <slashdot&worf,net> on Tuesday September 16, 2014 @02:34PM (#47920609)

      As an embedded-systems guy, I'd _love_ to have a Unix-like where I could schedule events that were guaranteed-by-design to fire within some deadline of when they were scheduled. Then I could host my once-per-kHz hardware service routines on the same processor that was also running my device's web-server.

      Minix's microkernel architecture seems like an ideal fit for that kind of use case. If there are any Minix devs reading this thread, how easy would it be for me to make a system like that using Minix?

      Your requirements mean you want a Real Time operating system - one that guarantees execution of a interrupt or other thing within a fixed deadline.

      If your deadline is a do-or-die thing, you have a hard-real-time requirement (i.e., it's a failure if you're late, period). if your deadline is more of a "well, please try not to, but under exceptional cases you can be a bit late" then it's firm real-time, and if it's "well, try not to be late, but it's OK if you are" then it's a soft real-time requirement.

      (Note: general purpose OSes often do run tasks that do have hard or soft realtime requirements. E.g., responding to a keyboard is generally a soft-to-firm realtime requirement - the user types something and generally expects a prompt response or the system will seem "slow". A hard realtime requirement would be playing back audio where failure to prepare a new block of audio results in a pop/skip/burp of the audio. Or back in the old days, burning a CD. If you didn't keep the buffers full, you'd be out a disc).

      Of course, a RTOS guarantees the deadline regardless of load.

      And there are a few that are POSIX compliant - QNX for one. There's also RTLinux which runs Linux as a general task within a realtime framework. I'm not sure if RedHat still maintains it, but eCos was an RTOS as well.

      And yes, RTOSes are capable of that - handling a 1kHz process plus a webserver at general processing - the RTOS knows it needs to service that task at 1kHz and will pre-empt the webserver as required.

  • by spaceyhackerlady ( 462530 ) on Tuesday September 16, 2014 @02:01PM (#47920245)

    I've followed Minix development with interest. The internal architecture is different from most OSs out there. Not different for the sake of being different, but different to show different solutions to problems. The way we do things in Linux et al is powerful, but it's not the only way.

    I haven't come up with a compelling reason to use it in my work (yet... :-), but I install each new release on a virtual machine and play with it.

    ...laura

  • Will be this the real Hurd?

"The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts." -- Bertrand Russell

Working...