7 ms·
BareMetal OS: A 64-bit Operating System in only 16KiB
- mathgladiator 16y agoKeep it up, I love new OSes. My dream is to write a cloud programming language that compiles high level code to a low-level kernel and deploys. I abhor waste, so efforts like this are a great start. I look forward to more!
- there 16y agohttp://github.com/avsm/mirage http://github.com/avsm/mirage
- c00p3r 16y agodon't reinvent the wheel - hack a Scheme. ^_^
- pedrocr 16y ago> My dream is to write a cloud programming language that compiles high level code to a low-level kernel and deploys. I'm curious as to what you want to gain from that compared to running a custom compiled Linux kernel with your program as init or as the only running process.
- mathgladiator 16y agoNothing from an engineering standpoint. http://en.wikipedia.org/wiki/Art_for_art%27s_sake http://en.wikipedia.org/wiki/Art_for_art%27s_sake
- logicalmind 16y agoYour dream idea will work for cpu-bound programs but it seems the majority of applications are bound by factors other than the cpu. The waste frequently comes from waiting for I/O to complete.
- mathgladiator 16y agoThat's exactly true which is why I'm working on understanding IO bound applications (my current research: http://github.com/mathgladiator/node.ocaml http://github.com/mathgladiator/node.ocaml )
- icey 16y agoSome years ago a friend of mine and I built a "self-propagating" system to speed up server deployment. Every server inside the datacenter would periodically look for hardware it wasn't previously aware of in its subnet, and then it would try a few known exploits to root the box, and run our shim. The shim would install all the software we wanted on the box, apply patches, reboot the machine, bring it online and register it so that all the other machines knew about it. It was kind of a fun experiment, but in the end didn't save us enough time to maintain it for very long - the real time sink was getting the hardware bootable and into the datacenter to begin with. (This was pre-"cloud" days, I guess if we were doing it again now we might have used it for a little longer.)
- shawndumas 16y agohttp://www.returninfinity.com/baremetal.html http://www.returninfinity.com/baremetal.html
- antidaily 16y agoCan you play Doom on it?
- junkbit 16y agoThe spin-off Pure64 looks very interesting. It looks like they have factored out the code for getting up and running with your own project: "The loader gets the computer into a full 64-bit state with no legacy compatibility layers and also enables all available CPU Cores in the computer." "Two very simple kernels are included to get you started with your new 64-bit OS (One written in Assembly, the other in C)."
- zokier 16y agoPure64 also is proprietary :( Is BareMetal bootable via GRUB?
- prosa 16y agoI think that was just a poor choice of words. They mean proprietary in the sense of "we built one ourselves". You can download source from the links at the bottom of the page: http://www.returninfinity.com/pure64.html http://www.returninfinity.com/pure64.html
- zokier 16y agoThe distribution zip actually just contains binary pure64.sys file and sources for their example kernels. The sources for Pure64 are not included. Also, no information on licensing is included.
- wmf 16y agoThere seems to be some "64-bit" buzzwordism going on here. There's nothing special about 64-bit; it's just a different processor mode. Writing 64-bit code is no different than 32-bit.
- zokier 16y agoAMD64 also included a lot more registers, and has some extensions to the instruction set. It also makes a baseline for other features like SSE, as all CPU:s supporting AMD64 are relatively modern. Also having larger address space to work with may affect some design decisions. So while you can write 64-bit code just like 32-bit code, it's bit like saying that writing c++ is no different than writing c.
- dryicerx 16y agoThis reminds me of MenuetOS (http://www.menuetos.net http://www.menuetos.net), although a bit larger BareMetal OS, still manages to cram in a unholy amount of functionality in to a couple of megs.
- swolchok 16y agoFWIW, I found a local privilege escalation vulnerability (arguably just a bug allowing apps to trash the kernel, since it's single-user anyway) in Menuet32, and I'm not optimistic about the network stack. I would have expected ping of death to work, but it doesn't even seem to support IP packet fragmentation. These throwback OSes are cute, but there would be hell to pay if they ever took off.
- cschneid 16y agoOther than the academic nerdiness of minimal OSs, what is this good for? Do modern OSs cause too much overhead for certain operations?
- runjake 16y agoI read the link in the article, so I'll just paste what it says: * High Performance Computing - Act as the base OS for a HPC cluster node. Running advanced computation workloads is ideal for a mono-tasking Operating System. * Embedded Applications - Provide a platform for embedded applications running on commodity x86-64 hardware. * Education - Provide an environment for learning and experimenting with programming in x86-64 Assembly as well as Operating System fundamentals.
- tjr 16y agoIf it can [be made to] run in real time, it could be useful in avionics software. We often use a minimalized Linux-based system.
- hxr 16y agoyes, see Zepto OS and publications. http://www.mcs.anl.gov/research/projects/zeptoos/ http://www.mcs.anl.gov/research/projects/zeptoos/
- CapitalistCartr 16y agoThey cause too much overhead for teaching. A minimal OS is a great way to show how one works, what the essentials are, and even what weaknesses it has.
- pjscott 16y agoIt's amazing, when you look at a simple operating system like TinyOS, just how simple some of the things are. (Once you start actually hacking on the OS code, you realize that they're also very finnicky and easy to mess up if you don't know what you're doing. And hard to debug.)
- orblivion 16y agoSo is this like the demoscene stuff or is there a practical use for it?
- runjake 16y agoI read the link in the article, so I'll just paste what it says: * High Performance Computing - Act as the base OS for a HPC cluster node. Running advanced computation workloads is ideal for a mono-tasking Operating System. * Embedded Applications - Provide a platform for embedded applications running on commodity x86-64 hardware. * Education - Provide an environment for learning and experimenting with programming in x86-64 Assembly as well as Operating System fundamentals.
- _delirium 16y agoFor the first use, it seems like it'd be nice if there were some way it could reuse existing hardware-compatibility work done on projects like the Linux kernel or the BSD kernels. Even if you want a single-tasking system with little in the way of OS services, you still usually don't want to be debugging the quirks of every hardware device, or writing your own driver every time you get a machine with a new SATA controller or NIC.
- tankenmate 16y agoWow, from the queue presentation this OS looks even less usable than DOS (MS aka Q). Why would the CLI terminate when it runs a programme? How do you run more than one programme at once? If each core polls the run queue does that mean that it busy cycles when there is no more work to do? Won't this waste energy? (A sin in the HPC world). Does it do the same for IO? IO request completion on a slow and/or busy disk could take as long as 50ms, for a 2.5GHz CPU for example this is 125 million clock cycles. Will the CPU busy cycle this as well? If you want a simple OS that fits a lot into a small space, why not get a copy of the Lions' Commentary and translate the edition 6 kernel into asm. If you wanted to go gung ho you could add a simple BKL, demand paging and a network stack to complete the job. You could probably do all the above and keep it somewhere close to 20,000 lines of assembly (excluding drivers). If you are looking for an education doing the above will probably do you just as good a job as trying from scratch. Lions' Commentary on UNIX 6th Edition, with Source Code http://en.wikipedia.org/wiki/Lions%27_Commentary_on_UNIX_6th_Edition,_with_Source_Code http://en.wikipedia.org/wiki/Lions%27_Commentary_on_UNIX_6th... The Art of Computer Programming http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming
- efutch 16y agoThe MIT guys have already created a port?/reengineering? of 6th edition, check out xv6: http://pdos.csail.mit.edu/6.828/2009/xv6-book/index.html http://pdos.csail.mit.edu/6.828/2009/xv6-book/index.html
- rmathew 16y agoThat links to an older version - the current version seems to be at http://pdos.csail.mit.edu/6.828/xv6/ http://pdos.csail.mit.edu/6.828/xv6/
- onan_barbarian 16y agoTAOCP and the Lion's commentary? Edition 6 kernel into asm? Why? You're working hard to sound old-school, but these are just random allusions. TAOCP is not especially relevant to OS programming, and translating _all_ of an OS into asm to make it "fit a lot into a small space" is just... plain... stupid... You will make the code smaller (as compared to gcc -Os) in a few places; you will likely give yourself a hernia maintaining it, and you are likely to get considerably worse performance than a decent compiler will.
- JoeAltmaier 16y agoCould be useful if it did something new - support virtual apps, manage restartable/persistent state processes, something. Just another thread/memory/interrupt kernel? Why?
- losethos 16y agoMy reality if fucked-up--only get indirectly mentioned. Whole world media talks to me, though. It's pointless until reality is not FUBAR. God says...external heresy sentences defers Bishop confessed people sanctuary however lying beholdeth gladness rolled loads existing urgedst Every ungodlily HAVE followed false changed alloy drinking entireness