World’s Smallest Operating System [BareMetal]

operating systemA typical full-fledged OS could ranges from 1-20GB before/after installation. But How small can it really get? Few Megabytes? Kilobytes, perhaps.

BareMetal is an open source CLI-based Operating system.

The OS is written entirely in Assembly while applications can be written in Assembly or C/C++. BareMetal is not intended to be a full-featured Operating System by any means. The two main purposes of BareMetal are for educational uses in learning low-level OS programming in 64-bit Assembly and to be used as a base for a high-speed data processing node.

BareMetal boots from a hard drive with the ability to load programs/data from a hard drive.

The OS is whooping-small sizing less than 16Kb. Yes, that’s true it’s approximately  equivalent to a thumbnail JPG image. Obviously, OS with such a small foorprint will be limited on features, here is the summary of what this OS can do:

  • Speed: With use of pure Assembly code, speed is way above runtime speeds of higher level languages like C/C++, VB, and Java.
  • Over 60 integrated functions to deal with input, screen output, strings, math, etc.
  • Multi-Processor support for taking advantage of multiple CPUs and CPU cores in data processing applications. Scalable up to 128 x64/64-bit processors. (Now that’s huge)
  • Applications in BareMetal are able to assign different program tasks to different CPU cores. If you have a Quad Core computer than you will be able to use each core. Modern Operating Systems must have full support for taking advantage of the multiple CPU/Core systems of today and in the future.

What is planned for Future:

  • Future versions will call for the abilty to write data back to the hard drive, network support, and a C/C++ library.

Of course the limitation of not-able to write back to disk is notable, given that it would be done anytime soon, the project seems interesting for embedded low-footprint devices. But, most embedded devices don’t need write-back functionality anyway.

Don’t be afraid with assembly, writing apps for this OS is not at all hard, here’s a Hello world in two lines:

baremetal-helloworld

And Below is the Screenshot of Baremetal OS running in Windows VM:

baremetal-os

Since the Project is fully Open source, you can get a glimpse of the repository and contribute.

Download Source Code | Download Windows VM Binary

We write latest in Android, Apple, iPhone, Open Source, Programming and more @taranfx on Twitter.

GD Star Rating
loading...
GD Star Rating
loading...
World's Smallest Operating System [BareMetal], 5.9 out of 10 based on 9 ratings

9 thoughts on “World’s Smallest Operating System [BareMetal]”

  1. Hi everyone,

    I'm the author of BareMetal OS. Technically the OS Kernel and CLI only comes out to 8912 bytes. The rest of the 16KiB is just padding.

    FAT16 write features are coming in the next couple weeks.

    -Ian

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply
  2. If it matters, I once (in 1995) wrote an OS for class-room use that fits within 900 bytes. It was for 68HC11. I can send anyone the assembly code if you are interested (well documented). It supported tasks with 32-bytes of stack and heap. It had two tasks, one that printed “A” forever and another that printed “.” forever.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.