OSNews sat down with Ian Seyler, the Founder and Lead Programmer at Return Infinity, the maker and sponsor of Baremetal OS, a 64-bit OS for x86-64 based computers written entirely in Assembly. Editor’s note: We’d love to do similar interviews with the people behind other alternative or hobby OS projects. If there’s a project that you’d like to learn more about, let us know.
Why did you think the world needs another OS?
The main reason is that nothing else like BareMetal OS existed. Many new Operating Systems that are in development try to duplicate the full features of something like Windows, Linux, or Mac OS but I feel new OS developers are spreading themselves too thin. I looked for a possible niche market and have focused on that.
What makes BareMetal different from other OSes that existed before?
The main difference is that BareMetal OS takes older software concepts and applies them to current hardware. Every modern Operating System these days has a Graphical User Interface along with all of the bells and whistles like multitasking and journaled filesystems. BareMetal OS is a mono-tasking system, so the overall system structure is very simplified. BareMetal OS is more geared towards running number-crunching tasks or experimentation with different algorithms. Some people have mentioned that BareMetal OS is like a 64-bit version of DOS.
Once you decided to do it, how did you get started?
BareMetal OS started as a hobby project based on MikeOS. I read about MikeOS (on OSNews) and started to mess around with it as it rekindled my interest in Assembly programming. I even submitted some code that was included with the official distribution. While MikeOS was great to learn Assembly it was a bit limiting after a while. I decided to create a new Operating System that would be like MikeOS but take advantage of the latest hardware that was available. Mainly this meant switching from 16-bit Real Mode to 64-bit Long Mode as well as rewriting all of the system API calls from scratch as MikeOS uses BIOS calls to do much of the heavy lifting.
Who are your primary contributors, and what special skills do they bring to the project?
I am the primary contributor to the code and I’ve been working with x86 Assembly for about 5 years now. There are also a couple of people that hang out in the IRC channel that have their own projects that compliment BareMetal OS and provide the occasional bug report/fix.
BareMetal is Open Source software. How successful have you been in attracting developers to your community so far?
Not as successful as I had hoped, honestly. I think a lot of people shy away from the project because it is written in Assembly as opposed to a more widely used programming language like C.
Why Assembly?
There seems to be a stigma that programming in Assembly is very difficult and takes much more time. While there is a bit of truth to that I don’t find it to be the case. When you work in Assembly you need to visualize the computer in its most simplified form, which is pretty much a big calculator that preforms math and moves data around within memory. BareMetal OS is intentionally simplified so that programming in Assembly is not such a massive task to manage. Writing a full-featured OS in Assembly is possible (See the MenuetOS project), but we are sticking to just the basics.
Why the BSD License?
BareMetal OS is open-source so others can learn from the code and provide new features or bug fixes if they are able. BareMetal makes use of our Pure64 bootloader, which was closed-source but is now open under the BSD license as well. Also, as it is open source, our code can be used in other projects. For instance the folks behind MenuetOS have successfully ported our i8254x and rtl8169 network drivers to their system.
Do you have a business model, or is this purely a hobby project? If so, how do you plan on making money?
At the moment BareMetal OS is a hobby project. There are plans to offer BareMetal Node and Parallax OS commercially but they are still in pretty early stages. BareMetal Node is our take on an HPC platform. According to top500.org, most of the big clusters out there are running Linux on x86-64. Linux is a great general-purpose OS, but it does too much in the background. BareMetal Node is a very lightweight (8KiB binary) and very simplified system that requires no maintenance. Initial testing looks good and the system works well, but more development is required. I would like to see BareMetal Node running on some x86-64 cluster like Pixar’s RenderFarm, but I think it has a way to go yet. Parallax is our limited multi-tasking system (One application per CPU core can be run). Both BareMetal Node and Parallax offer orchestration software to control what is running on a cluster. There are videos of BareMetal Node and Parallax on our website.
Can you talk about BareMetal’s hardware requirements?
The main requirement is a computer with a 64-bit compatible processor. Anything less than 5 years old or so should work just fine. As of about a month ago I completed drivers for the Intel PRO/1000 (i8254x) line of Gigabit network cards as well as the Realtek 816x/811x-based family of Gigabit cards. The addition of the Intel PRO/1000 driver enables BareMetal OS to be run with network support under VirtualBox and VMware as well as physical hardware. The Realtek 816x/811x chipset is built into a lot of older and current motherboards.
How does your limited hardware support affect adoption?
I think it really used to limit the adoption as the only network driver we used to have was for the older 100mbit Realtek 8139 chipset. I phased out that older driver once the new gigabit drivers were written. The main thing that is holding the OS back right now is software support. At the moment the OS communicates over the network via raw Ethernet frames so I am working on writing a full TCP/IP stack. Also, C applications cannot use standard ANSI calls like printf() and memcpy() since a C library has not yet been finalized. I think that TCP/IP support as well a C library will increase the popularity of the OS and I am working towards both of those items.
What are your future plans?
I already mentioned the TCP/IP stack and C library which are high on the priority list. Other than that a few under the hood things like activating the IO-APIC in the computer as apposed to using the legacy PIC to manage interrupts. For BareMetal Node it would be very interesting to enable the basics of GPU processing if it is available (I think help from AMD and nVIDIA would be required for this). Using the VT extensions of the CPU to create a very lean hypervisor is also on our roadmap.
I remember writing a high-low game in Assembly for a class assignment. That was fun but obviously took a lot of code to get the job done. I think it would be fun to contribute to this project but I doubt I’d be any help
If you would like to get involved, it maybe worth contacting the developers and offer to do bug fixes.
This can achieve two things … you learn how the OS works and you gain trust with the developer/s (if your work is good) and you get to learn.
I remember coding com and exe viruses for dos in assembler. Mhm, old days of MASM and TASM.
I love reading about stories like this. I think it’s pretty cool what he’s doing there. I’ll likely mess around with it myself once the C library is done. In the mean time, best of luck on your project.
I haven’t programmed in assembly for a very long time but I still have a longing for it due to the absolute control it offers. It’s impressive seeing someone tackling huge projects like an OS in pure assembly, I sure couldn’t see myself writing anything but small extremely time critical components in assembly these days, and only if it was to utilize special instructions which compilers still struggle with compared to hand-written assembly (such as sse).
One thing that programming in assembly teaches you is how the generated code actually work when you program in higher level languages. Also if you have ever programmed in assembly things like pointers (which seems to be so hard to grasp for those who has only worked in high level languages) is obvious.
I’d say the overall level of programming has gone down-hill during this past decade (if not longer), we’ve had people come in applying for writing code for embedded devices who can’t even write a doubly linked list from scratch… yes, seriously.
Meanwhile we have this new breed of ‘programmers’ citing how ‘productive’ they are when they use these powerful frameworks where they are in principle doing extremely little programming at all and are just relying on existing framework functionality with ~1% (or less) of the code in their programs actually being written by themselves.
Certainly there’s a place for this kind of ‘rapid development’ but I shudder to think that this is what the majority of programming will be about in the future since it not only abstracts away from hardware (which all high level languages does) but also in my opinion heavily abstracts away from problem solving, particularly in the realm of efficiency.
Ahwell, enough of my rant, get off my lawn and all that.
While it’s a desktop toolkit project, and not an OS project, I think it would be useful for OSNews to interview GNUstep chief maintainer Gregory Casamento to learn about where the project is and where it’s heading.
Edited 2011-06-02 20:56 UTC
Like someone cares. Ask someone from Gnome, KDE, Windows, Os X, Haiku. Asking something about some project which tries to reimplement a dead project (OpenStep) and has only two users isn’t going to be interesting for more than two users.
1) I believe that GNUstep has changed from reimplementing OpenStep to tracking OSX, so that one can write portable programs for both the Linux and Mac platforms. I think that’s interesting.
2) By your logic, OSNews shouldn’t cover any of the obscure OS projects either, such as BareMetal. If OSNews isn’t doing that, then it has no reason to exist — just read ArsTechnica.
That’s exactly my point. I had a fair portion of obscure and non obscure operating systems, during my studies at the Univesity.
I would understand the emphasis of some obscure operating system, given two conditions:
1. the said obscure operating systems have technical merits
2. the articles on the site are presented from a scientific point of view and targeted towards OS programmers and OS architects
The typical article on OSnews is targeted to masses and hordes. Is trying to popularize operating systems science like Popular Science is trying to popularize science.
Physicists and mathematicians generally despise Popular Science because it trivializes the science.
OSnews isn’t targeted to specialists and the articles are written by guys who don’t have a clue about Operating Systems.
I respect Thom Holverda, but he doesn’t have a clue about the inner works of operating systems.
He can write about GUI, feature X, feature Y and so on. Which is alright if you are targeting the masses like OSnews.
I think is ok and OSnews should resume on the general points of view about Apple, Windows, Linux, Haiku, Reactos, Syllable and gadgets and H264 vs VP8, and Internet Freedom and Sony.
You know, light talk about Operating Systems and Internet and gadgets.
However, when you try to cross the line and talk about obscure operating systems, you shoud at least have a clue about what an OS really is. Not the case here. I this was targeted about specialists, we wouldn’t talk about every guy who pulled another os written in asm from his ass.
We would talk about serious business like monolithic kernel versus micro kernel, we would talk about L4 and L4/Fiasco, we would talk about UNIX, Plan 9, Inferno, distributed operating systems, NT architecture, BSD architecture.
We would interview guys like Andy Tanenbaum, Donald Knuth, scientists from MIT, the guys from L4, someone from FreeBSD or NetBSD kernel team, Theo de Raadt from OpenBSD and a lot of scientists from Windows Team @ Microsoft. And some from former Bell Labs and some from IBM and some from former SUN.
Brian Kernighan, Donald Knuth and Andy Tanenbaum would laugh about operating systems written in assembler pulled from someone’s ass. I mean, is great that some guy has a passion and he writes a kernel and a cli. As I forgot a lot of things from my operating system design classes, and I forgot coding in ASM, I can write a functional kernel&cli in less than a month in C. It’s a trivial task. In fact me and my colleagues were asked to write a trivial OS for our exams 10 years ago. So we did.
So OSnews, either you are light and talk about mainstream OSes and general usability, either you talk about serious business, but please interview and ask people who know and can give a qualified answer. Not yet just another ASM os.
I get the impression this post has been modded heavily up and down in near equal measure.
An interview with Knuth would be great, mind.
“This comment has not been moderated.”
My editor superpowers have spoken.
This is going to sound extremely selfish (and it is) but if you ever do get a viable business model and can afford a team, look me up!
I’m not afraid of assembly. I know a thing or two about using the right structures for scalability. I’m fairly proficient in the math department. I have experience developing for multiple operating systems. I’ve got notches on my belt for implementing network protocols. I’ve implemented graphics rendering engines, PKI and async libraries. Oh I have a keen eye for security too.
🙂
Alternatively, is anyone else in suffolk county NY hiring? I could really use a worthy tech job. Under employment is no fun.
I have been approached about possible funding. The only issue is that they want to see a proof of concept and my time is limited.
iseyler,
“I have been approached about possible funding. The only issue is that they want to see a proof of concept and my time is limited.”
I’m not sure if you’d be better off marketing the OS by itself as a high performance clustering solution in general, or trying to focus on some kind of niche.
You and I both know that a baremetal cluster could solve almost any computational problem clients wanted to throw at it, but my gut feeling is that you might get more traction if you emphasize a specific problem domain.
Would you have any in mind?
Edited 2011-06-03 23:34 UTC
Since I can’t respond in the Windows 8 thread I will put my protest here. WTF Thom – locking the entire thread because people are arguing about modding? That’s what moddings for – to downmod offtopic crap.
Regardless, I am perfectly capable of ignoring such crap, and would love to continue to debating the actual issue – were the thread not locked.
But I guess you win the argument now don’t you, because nobody can respond. Tricky.
Please send your complaints to thomholwerda AT osnews DOT com instead of polluting this innocent topic with issues that have nothing to do with it. Thanks in advance.
Edited 2011-06-03 16:35 UTC
I’d pollute the thread it belongs on, were it not locked – and I assume appealing to the guy who locked the thread will accomplish nothing.
And then you assume that polluting this thread will accomplish something? Your sense of logic escapes me.
The site doesn’t have a forum. You have no way to gauge how many people feel the same way as you with a single e-mail. Perhaps if enough people voice their concern, our esteemed editor may see the error in his ways.
I appreciate your efforts Thom – I love this site, but that was not one of your finest moments.
That would not count as pollution in my view, since you’d be in the right discussion topic
But something bugs me : if you have the feeling that discussion will accomplish nothing, why did you post your comment here at all ?
EDIT : Valhalla beats me there.
Edited 2011-06-03 19:56 UTC
To do a public protest? Hard to do it any other way.
Ah, talking about public protests with me is unfairly making use of my patriotic feelings towards them… How could a French guy be against that ?
Edited 2011-06-06 10:37 UTC
Being written in Forth, it could be more easily portable.
You know there are so many languages these days, it’s become difficult to keep track of them.
For example, I already have trouble remembering the substring functions between javascript, c, php, perl, .net, mysql, plsql… very rarely do I use others.
What does forth offer as a compelling reason to learn/use it?
It may be good, but these days languages have way too much overlap and the choice is seemingly arbitrary.
> What does forth offer as a compelling reason to learn/use it?
You didn’t read anything like “Starting Forth”? OK, here you go:
Forth is fast. High-level Forth executes as fast as other high-level languages and between 20 to 75% slower than equivalent assembly-language programs, while time-critical code may be written in assembler to run at full processor speed. Without a traditional operating system, Forth eliminates redundancy and needless run-time error checking.
Forth compiled code is compact. Forth applications require less memory than their equivalent assembly-language programs and consume less power (important for hand-helds and portable gadgets!) Written in Forth, the entire operating system and its standard word set reside in less than 8K bytes. Support for a target application may require less than 1K bytes.
Forth is transportable. It has been implemented on just about every mini- and microcomputer known to the industry. Most microcontrollers and DSPs, even tiny ones, also have a Forth implementation.
Forth has been known to cut program development time by a factor of ten for equivalent assembly-language programming and by a factor of two for equivalent high-level programming in C or Java. Productivity increases because Forth epitomizes “structured programming” and because it is interactive and modular.
Zbigniew,
“You didn’t read anything like “Starting Forth”? OK, here you go:”
No, I never had reason to before. I am looking at it now. It’d take me a while to get used to, but I can see how the stack based approach translates very easily to CPU stack.
“Forth compiled code is compact. Forth applications require less memory than their equivalent assembly-language programs and consume less power (important for hand-helds and portable gadgets!)”
Something doesn’t seem right about this. Either forth is emulating a more compact byte code than x86, or it’s executing native x86 code. I don’t understand how it can be both smaller and as efficient as assembly, can you elaborate?
“Forth is transportable. It has been implemented on just about every mini- and microcomputer known to the industry. Most microcontrollers and DSPs, even tiny ones, also have a Forth implementation.”
Portability is huge, however in my experience platform specific APIs hinder portability more so than the language itself. Does forth have a standard API for things like networking, name resolution, databases, threading, graphics, etc?
From my initial reading, the forth language doesn’t specify these things but I could be wrong.
“Forth has been known to cut program development time…for equivalent high-level programming in C or Java.”
I’m sure this is true for many cases. But what about compared against ruby, or python, C#, or even something like haskell?
The question is difficult to answer (at least for me) because I don’t have the time to implement the same program in a dozen different languages to compare the relative difficulty.
Haskell/Prolog have a very unique capability to run many functions backwards (given the output, it will enumerate all possible inputs).
Forth’s reverse polish notation stands out, but it’s not immediately obvious to me that it’s a better way of thinking about code. If I had more experience with it, maybe I’d change my mind.
In terms of simplicity, there is no contest, the trivial nature of RPN blows everything else out of the water.
In terms of technical superiority, I don’t know so much. Java also uses a similar stack driven implementation under the hood.
I might like it once I got used to it. But, realistically it’s difficult to justify spending time to become fluent in forth when employers aren’t asking for it.
Edit: I wanted to say that I do agree with you that it looks like it would be a natural fit in an operating system context. It does does seem more suitable than the other languages I brought up. Particularly for algorithms.
Edited 2011-06-04 21:01 UTC
But while reading “Starting Forth” you surely noticed, where I copy the above from?
I understand that statement, that using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth. I think, it depends on quality of macroassembler you can use, quality of Forth compiler, which you’re comparing to – and, of course, on your skills both as assembler- and Forth-coder.
No. Actually, programming in Forth is rather “designing one’s own problem-specific language”. Forth is the basis. Then instead of using ready-available high-level function (which you’ll find in langs like Python), you’re designing your own higher-level language using Forth words.
Of course, it’s not that easy to measure it. Since I’m Forth-newbie (learning it about year for now), you may be interested in asking these questions on comp.lang.forth, where you’ll meet several experienced Forth-programmers, coding in Forth more than 20 years.
“But while reading ‘Starting Forth’ you surely noticed, where I copy the above from? ”
Yes.
“…using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth.”
We’re still talking about compiled x86 code? Honestly I don’t understand the logic, but no matter.
“No. Actually, programming in Forth is rather ‘designing one’s own problem-specific language’…instead of using ready-available high-level function”
This is fine for programming algorithms, and it’s probably fine for OS work. However I’d be worried about leaving typical web developers to write their own functions. I imagine this results in a lot of duplicate code between libraries.
“Since I’m Forth-newbie (learning it about year for now), you may be interested in asking these questions on comp.lang.forth, where you’ll meet several experienced Forth-programmers”
Thank you for answering my questions. The language seems to have an almost universal quality to it – I think you’ll know what I mean by that.
If I’m correct, there have been studies into that (Like can an Assembler programmer outperform an optimizing C compiler). Result: Only about 10 percent of programmers can outperform an optimizer.
Ans so I guess, that something similar to the above is behind the logic: Forth makes “dirty work” for you.
Nobody said, that Forth is going to replace HTML. Regarding the libraries: Forth programmers often prefer to “reinvent the wheel” – and to implement the things own way – instead of relying on old, fatty, buggy, and (still more and more) bloated libraries.
You’re welcome.
“..using Forth words, instead of coding in assembly, usually overall size of your code is smaller, when programming in Forth.”
We’re still talking about compiled x86 code? Honestly I don’t understand the logic, but no matter.
It’s been a while since I thought of Forth but from my long term storage…
Technically speaking Forth is a compiled language, but technically speaking Forth is not compiled like other high level languages. Forth has no real syntax, it is mostly code ‘words’ and data on a stack. As such it is already very compact. Forth is very close to the metal, so it is also very optimal. Forth is not for everyone. But if you like it, you love it. If it is for you, you become a Forth zealot and you try to convert all your friends. And of course they become annoyed, because they have never heard of Forth.
Can you point to any examples of an easily portable OS or kernel written in Forth? Or a Forth suitable for writing an OS kernel for x86/x86-64 hardware?
If you mean something “bigger” – try ForthOS ( http://www.forthos.org/ ). The “smaller things” – e.g. for microcontrollers – are obvious (CamelForth, cforth etc.), since Forth “likes to be an OS”.
The biggest sense in using Forth is using it “standalone” – I mean: with NO control of any underlying “external” OS.
Oh, I forgot: http://www.openfirmware.info/Open_Firmware – here you are: “easily portable OS or kernel written in Forth; Forth suitable for writing an OS kernel for x86/x86-64 hardware” – everything you requested in just one software package.
Edited 2011-06-04 17:52 UTC