711 points · by EvanGr · 10y ago · 187 comments
Minoca OS has been around for a while, but the news is that they're GPLv3. I think that's a great thing! The MIT license is good for software that wants to permeate through everything, but for building a community, the GPL is a good idea.
It seems that for any operating system to be successful, it has to carry around POSIX compatibility like an extremely expensive entry pass. I wonder when we will leave that behind? Or if we ever will? I'm glad POSIX is just a layer in Minoca, and not the base of the system, because these days it really should just be treated like a big wad of glue.
PS: I love the object manager. I don't see any particularly ground-breaking networking stack, though. A plan9-inspired networked file system approach would have been amazing, but it seems this project is content with today's more typical approach. Perhaps it is just trying to be less opinionated about network structure than plan9 was?
PPS: I'm terrible at organizing a comment. Maybe I need a blog.
I think my problem is the core concept. POSIX stands for Portable Operating System Interface (and X stands for Xtreme?). In an age where we spin up entire operating systems to start a single application, why are we defining portability at the operating system level when network portability works so much better?
Keep in mind, this is also an age where systems like Qubes OS can make separate VMs cooperate with each other.
The only sell for POSIX I can think of is performance, and I don't know if I buy it anymore. Why do programs have to be cross-compatible when the concept of an operating system no longer means owning the hardware?
A lightweight POSIX-capable system has real value today. Operating systems need to be in more places than just the data center. IoT devices don't have the resources to run a VM or any other fancy containerized environment. POSIX was designed to be used on systems with comparable resources to what many embedded processors now have. It makes sense to leverage the existing codebase where possible.
The X in POSIX is for unIX. Kinda like a pun on all the *nix things that were floating around back then (Xenix, Minix, AIX, Sinix, Ultrix, IRIX, ...)
Curious - what are your main objections with POSIX? Is there another system you prefer?
But it carries a lot of (in retrospect) bad habits and decisions from the 60s and 70s as well as a tendency to redundancy due to some competing standards that were unified and need for some back compatibility.
Now not everyone agrees on what is good and what is bad, so some experimentation in this area is good for everyone. Examples of what bother me include the ludicrousness of ioctl(), messed up / redundant semaphore semantics, ditto for IPC, primitive memory mgmt semantics, fork() -- a great hack for its time but since it's 99.9999% of the time followed by exec() should be split into separate address space and thread management), outdated and simultaneously simplistic and baroque security model(s), and various IO issues to many to go into in a HN comment.
But my loathed feature is undoubtably someone else's sacred cow. As I said, letting more flowers bloom is in everybody's interest.
- (Correct) IO is ridiculously non-portable and painful in so many ways that it isn't even funny anymore
- Locks are ridiculously non-portable and painful to the point where you're better off just using "mkdir"
- POSIX is stuck in the "everything is bytes and we slap an encoding on it some of the time" era thinking. This makes it painful and hard to implement proper text handling in many instances. This also leads to a lot of bad behaviours.
- Memory management is IMHO lacking from a user space perspective. For example, it's practically impossible to implement a cooperative memory cache on this. To the best of my knowledge no OS has the necessary interfaces, though.
- ioctl as you mentioned
- SysV/POSIX IPC is so bad that no one ever bothered actually using it for anything
- Personally I think it's a misleading API (conceptually, see above, the text example for example) almost to the point of deceptiveness. It's very easy to write correct looking programs that behave far from intended, especially in edge cases. IMHO code using it is practically unreviewable in everything but the most trivial cases. Non-portability is practically guaranteed, you have to test every platform. Portable code usually turns out to be quite ugly due to platform deficiencies and minor API incompatibilities.
If we think of POSIX compatibility as something which is required in order for an operating system to be viable at any level, it means that there's a lot of energy in pioneering a new OS devoted to building up this compatibility simply so it can get some exposure.
If we really want to encourage a fresh approach and disseminate new ideas, we need to move away from criterion like this and look more specifically at the principles and work being put forth and whether or not those are objectively successful or have merit. That's a much better way to move forward.
The criteria is different if you're writing an OS for practical use with wide adoption, though. There, backward-compatibility is rightly considered a positive attribute - there is much existing software in the world, and the entire point of a practical OS is after all to run the software that people use.
Exactly the same situation exists with CPUs. If you come up with a new micro-architecture that you actually want to sell to customers, you'd better come to the party with a C compiler and a ported OS or three.
For the record, it did not ship built-in or as part of the kernel. Even within Microsoft, it seemed the project was in perpetual life-support-mode.
Still, I do feel a small pang of sadness. There was once a time in the early 2000's, where I would have loved to see this chimeral oddity succeed.
Mounting my sound card across the network sounds like a nice hack. It is more important that sound does not stutter though. That has soft real time requirements, which Plan9 does not address.
Actually, start QEMU with some special arguments and a directory path, and the Linux guest inside will be able to see the given directory as a read-write 9P filesystem, mountable with a single command. (New files get QEMU's UID unless QEMU is run as root.)
> Mounting my sound card across the network sounds like a nice hack. It is more important that sound does not stutter though. That has soft real time requirements, which Plan9 does not address.
An incredibly good point, and why Plan 9 has zero adoption. :(
github.com/AlDanial/cloc v 1.70 T=22.43 s (84.3 files/s, 63498.9 lines/s)
-----------------------------------------------------------------------------------
Language files blank comment code
-----------------------------------------------------------------------------------
C 1023 296251 262652 530443
C/C++ Header 438 93833 117592 69529
Assembly 95 9588 7773 13383
make 270 2236 6402 4784
Bourne Shell 38 799 1198 2787
JSON 4 4 0 1367
Pascal 4 232 28 718
Python 4 194 257 589
yacc 2 99 4 481
awk 3 25 11 263
Markdown 3 27 0 172
Windows Resource File 3 18 0 86
lex 2 44 142 84
Perl 1 7 10 35
-----------------------------------------------------------------------------------
SUM: 1890 403357 396069 624721
-----------------------------------------------------------------------------------(I haven't tried this yet, though I do use tokei, which is faster but not this fast. Been meaning to try it out.)
is that not enough?
I too get tired of seeing all this "take X and write it in rust".
OTOH it's a new area and the younger crowd gets to try and make a name for themselves in something that isn't already fully established.
But seriously, I've never thought to myself "cloc is too slow" and even if I did, I'd run it overnight.
Take a look here for example: https://github.com/minoca/os/blob/master/kernel/io/iobase.c#...
It kind of makes the code look like Pascal. Nothing wrong with that, really.
Hello everybody out there using minix -
I'm doing a (free) operating system (just a hobby,
won't be big and professional like gnu) for 386(486) AT
clones. This has been brewing since april, and is
starting to get ready. I'd like any feedback on things
people like/dislike in minix, as my OS resembles it
somewhat (same physical layout of the file-system
(due to practical reasons) among other things).
I've currently ported bash(1.08) and gcc(1.40),
and things seem to work. This implies that I'll get
something practical within a few months, and
I'd like to know what features most people would want.
Any suggestions are welcome, but I won't promise I'll
implement them :-)
Linus (torv...@kruuna.helsinki.fi)
PS. Yes - it's free of any minix code, and it has a
multi-threaded fs. It is NOT protable (uses 386 task
switching etc), and it probably never will support
anything other than AT-harddisks, as that's all I
have :-(.
Good luck, guys. Post some docs to read.I haven't found something like an architecture overview of the kernel itself, but the docs story isn't bad for a 2-ppl team. Kudos.
Good luck to these people, I hope this becomes one of the major OSes in ten years.
I guess this is kind of like a re-release after not generating much buzz and seeing a lot of comments asking for open source.
I think Linus is just a practical person who is good at assessing reality. He doesn't get caught up in grand visions without action.
I don't think he is holier than thou now either. He's just busy and forcefully trying to get contributors to come to grips with things he has learned by experience on his project.
I've never really heard Linus preach about other people's projects, except where he intends to do better like svn. His advice is limited to the kernel as far as I can tell, and it's perfectly rational for him to be opinionated about that, because he has skin in the game.
In contrast, Stallman will preach about other projects -- in fact that is his main purpose. So I can see why people would call him holier than thou, but I don't see it with Linus. I do appreciate Stallman to a great degree too.
Well he is a saint...
The same Linus that fundementally did not believe in source code management for what 20? Years because it made developers "soft"!?
Why is a new operating system necessary?
...The design requirements of today's devices have drastically evolved in areas of power management, security, serviceability, and virtualization... By starting from a clean slate, Minoca OS is able to incorporate those core tenets into the very fabric of the operating system...
How is Minoca OS different from other operating systems?
...One of the most noticeable differences at the kernel level is the uniform driver model, which provides a maintainable interface between the kernel core and device drivers... Another very noticeable difference is our strong emphasis on the kernel development environment. Being able to step through code in the kernel, boot environment, and even firmware was something we felt was critical to quickly developing and maintaining kernel-quality code...
This sounds really smart and it looks great overall <3
> Can we achieve parity with what what operating systems are used for in today’s world, but with less code, and with fewer pain points? Can we do better? We’d like to try.
I appreciate the uncertainty!
Edit: Haaa, use your eyes and you shall see!
http://www.minocacorp.com/download/#beaglebone-black
Edit: Boo :( I haven't gotten it to boot yet. Boot messages are as follows:
Minoca Firmware Loader
Boot Device: 00000008
Launching bbonefw.bin.
Jumping to 82000000...
!What you're seeing is the serial output. If you plug in an HDMI monitor, you'll hopefully already be at the shell prompt. Email me (chris@minocacorp.com) if you run into further issues.
I think I understand my confusion now, I was hoping for a shell on the serial port. Most of the work I do with BBB's is headless. Does the exclamation point mean it's finished booting to userspace? Do you think you could rig up the serial port with a shell?
How does Minoca handle GPIO's, and other things like RTC's and SPI? I'm sure you know of device tree and sysfs drivers for GPIO, but I can write you a quick overview!
I'm also interested in what theoretical results from the last 25 years are being used. Some references to papers would be nice. Since the biggest hurdle is separation and thus security, I can imagine the OS has an embedded theorem prover, but I see no mention of it.
http://www.minocacorp.com/documentation/developers/knowledge...
Big kudos.
Going to look at it when time allows
I happen to have an interest in OS development myself: it seems that two things have combined to make bespoke OS development practical again. First, the world has mostly standardised on amd64, UEFI &c. None of these standards may be terribly good (e.g. I've always x86 and its descendants tasteless compared to 68000, MIPS and others), but they're good enough, and now there's a critical mass of community support out there for them.
Second, readily-available virtual machines have made it easier than it ever was to rapidly iterate on an OS concept.
My own interest is in non-POSIX, non-Unix-inspired, non-consumption-oriented systems: I think that there's some huge headway to be made in building computers meant to augment the human brain, rather than to just reproduce the past or serve as an entertainment-enabler. But Minoca OS sounds pretty neat in itself. Kudos to the guys for putting in the work, and kudos for releasing it as open source. I hope that they're able to make some money from it too — good work deserves to be rewarded.
Cool project though and it's nice that they already have a handful of drivers.
EDIT: To clarify, I'm not saying it's bad at all, they're just using a very verbose naming convention that I don't particularly like working with.
Also things like KeCrashSystemEx look very much like KeBugCheckEx in Windows. There certainly is a lot of inspiration.
Edit: I see from Linkedin the OP is actually an ex-MSFTer who worked on Windows' HAL, so this makes sense. I wonder, tho, if this will present legal issues? Could someone say that it is an issue that the API is clearly inspired by the Windows API?
Windows Environment - If you're looking to develop on Windows, you may find this repository helpful, as it contains a native MinGW compiler, make, and other tools needed to set up a Minoca OS development environment on Windows.
Nice to see that development on Windows is supported :)
Also, I wonder if this can be made to run on Cortex M4 with "MPU" but not "MMU" hardware? Something to run on the Teensy 3.6 would be interesting.
BTW: Binary compatible function driver interfaces are great! They served us well on BeOS. The Linux "recompile everything under the sun" approach really gets in the way for many real world situations.
Finally, I'm sick and tired of POSIX I/O. It's a really old model, and a really bad match to modern hardware and use cases. Someone needs to develop and popularize the callback/messaging based kernel/application interface of the future, complete with something other than the main() entry point...
How do you feel about kqueue or I/O completion ports? Are those something like the "interface of the future", or just greasing the old machinery?
Whenever a project is corporate-backed, I like to know the business plan upfront before I consider contributing to it.
And correct me if I am wrong but I think the corp is just the 2 developers right now.
>We at Minoca are trying to make open source work as a business model. One of the ways we're doing that is by offering Minoca OS source for sale under more proprietary licensing terms. To do this Minoca needs to own the copyright to its source. In order to support this business model while also allowing community contributions, we ask that contributors sign a Contributor Assignment Agreement. We're using Harmony Agreements. Before submitting patches, please fill out the CAA for individuals or companies.
I am thinking about porting my Sciter [1] HTML/CSS UI Engine to an OS that can be used on small (IoT) devices. I think that HTML/CSS as a UI definition/declaration language is quite convenient.
If I were developing a new OS, I certainly wouldn't have a default text terminal...
That just looks gross.
But my interests differ. I would focus on the graphical user interface as my number one concern.
It would always run in a OpenGL type graphics mode, where you could spawn any number of text terminal-style windows, but I would definitely skip a full-screen text mode. Its just never needed.
Does that make sense?
And won't be under GPLv3. If your goals are to prevent others from locking up your code in proprietary products, and to give your code to the world, then this license is for you. If your goal is "widespread circulation," this is not the license you want.
Yes.
So license doesn't seem to be a sufficient impediment if the functionality advantages are sufficient.
This meme "seems" right, but I see less evidence for it in the field.
The Minoca OS folks are asking for the community to contribute code to their OS that's licensed under GPLv3. GPLv3 supporters are necessarily a subset of open source supporters. I contend that the subset is small enough that a Minoca OS licensed under GPLv3 will continue to experience a lack of widespread circulation.
But in embedded space, 68 MB RAM just for the system is pretty big. Many systems have a fraction of RAM of that. 1 - 256 kB RAM is common. Of course embedded systems can also have gigabytes of RAM. It's a wide spectrum, so as small as possible is preferable.
In the future we will need these interfaces so if this is built in to the OS that would be nice advantage :)
I'd be interested if it was based on a post-Liedtke microkernel, but I suspect it's yet another boring monolith.
Let's take the package manager for example. Wouldn't it be great if instead of yet another package manager that is a glorified system of install scripts... we had a declarative functional system ala NixOS? That's just scratching the surface.
I hope they don't try to compete with Linux. just do their own thing and see where it goes. usually the competitive edge kills projects like these.
happy to see new kernels popping up!
Yet Another OS With the Vague Impossible-To-Evaluate Benefit of 'Newness'
edit: not to suggest I have a problem with people trying new things, but rather...why not write up a little essay on the architectural decisions you've made and their impact before releasing it publicly?
Not saying their work isnt useful. But theres an argument to be made for "why"?
Now you get to answer the "why not?".
For that reason, you want GPL because it forces everything back into the community. He gives examples of a friend of his who slaved on a BSD project that got forked with the friend having nothing to show for it. And NT adoption of much of the code from the BSD sockets API.
Exactly, so license shouldn't matter that much. I'd probably be a lot more interested in it were it BSD licensed, as it is now I have no real desire to play with this new OS.
https://github.com/minoca/os/blob/master/LICENSE
Basically, the old MySQL business model.