87 points · by lioeters · 3y ago · 19 comments
It is alive and still being used, worked on and updated.
Documentation:
[0]: https://www.freertos.org/ [1]: https://aosabook.org/en/v2/freertos.html
Also, 2kloc is what I expect to be in a few files at most, not a dozen spread out over (nested!) subdirectories --- that makes it feel much bigger than it really is.
QNX was and is very small, but not small enough to run inside a CPU's cache when it was current and in the news, no. Today, yes, but not in 2kB! 2MB, more like.
The product I can recall that ran inside a CPU's cache was Symbolics OpenGenera.
Genera is an OS written in Lisp for Symbolics Lisp machines. I.e. a CPU that ran a Lisp-like bytecode.
https://en.wikipedia.org/wiki/Genera_(operating_system)
To make OpenGenera, a version for non-Lisp hardware, Symbolics wrote a tiny Lisp interpreter for the DEC Alpha which fit inside the Alpha CPU's cache.
It was described in their paper at the time (circa 1994):
http://pt.withy.org/publications/VLM.html
Later, a version of this was built to run on x86-64 Linux:
https://jaoswald.blogspot.com/2020/05/open-genera-vlm-on-lin...
That gets it running on Ubuntu 18.04.
I would love to see this packaged as a Snap or something for more recent Ubuntu versions.
To put a 2 KB OS into context, the average x86 instruction is going to be around 3-4 bytes, so that OS would need to be around 500 assembly instructions in total.
[1] http://web.archive.org/web/20011106140711/http://www.qnx.com...
A minimal OS that supports the features included in modern ISAs such as ARMv8 or x64 would be way more then 2k LOC, probably more then 20k LOC.
Also, I was pointing out that 2 KB of executable code you originally suggested for QNX is a suspicious number and should set off warning bells and how to do the back of the envelope calculation to build the intuition for why it is suspicious.