What Linux should have been... and a challenge!
-
While browsing a stackoverflow-recommended post at https://arstechnica.com/features/2020/12/a-damn-stupid-thing-to-do-the-origins-of-c/ giving an interesting history of the original development of C, I was struck by the remarkable:
The PDP-7 had 8,192 “words” of memory (a word in this instance was 18 bits—the industry had not yet standardized on the 8-bit ‘byte’).
Unix took up the first 4k, leaving 4k free for running programs.That is 4k for the Unix OS kernel!! Those were the days :) And shame on Linux....
The Linux download/install is now approaching 4GB! (Yes, I know, it's Ubuntu, and doubtless much of it is apps/bloatware, but still...) Which would be a million times larger.
Challenge: I will buy a beer for anyone who produces a cut-down but "workable" Unix-a-like OS in 4k.... Heck, I'll even buy a pretzel for anyone who manages it in 4MB nowadays :) [My first System V.0 fitted in 1--1.5MB RAM, and came on about 20 720k floppies; installation was slow.]
-
Here you go: Linux + shell + some games fit into 8MB. Root filesystem is < 3MB. https://www.thirtythreeforty.net/posts/2019/12/my-business-card-runs-linux/
(it's not my project of course, just linking this awesomeness I've found a while back)
-
@sierdzio
Fair enough, and I do owe you/that author a pretzel! However, I think you'll agree it would be another order of magnitude to reduce this to the original 4K !!My very first home computer was a ZX81. That had 1K of RAM; you could extend it to 16K (or was it 32K?) with an external "dongle", though a big problem was that weighed a bit such that it pulled away from the port you plugged it into it, so you had to prop it up with blu tack, sellotape and a book so it didn't fall out :) I wish I had known it was capable of running UNIX...!
-
@JonB said in What Linux should have been... and a challenge!:
@sierdzio
However, I think you'll agree it would be another order of magnitude to reduce this to the original 4K !!Yes it would be hard to do. But not because 4K is some magical limit of awesome power - it's because you would have to decide which modern features of the kernel to remove. I guess it's still very possible to get some working OS at 4K, but surely it won't support the array of hardware that Linux does, it won't have all the features, scheduling, security measures etc.
-
Hi
Due to using virtual machines, im did look around for a
more slim version of linux and the best i found was
http://www.porteus.org/
Its around 300 MB with full desktop etc.There is also http://tinycorelinux.net/
which was around 19MB for a FLWM desktopThere is also a 30 MB ubuntu for docker
https://ubuntu.com/blog/minimal-ubuntu-releasedI never saw anything in 4k size as that would be so stripped that it would be close to
useless. But im sure it exists for firmware / mini devices. -
http://www.tinycorelinux.net/
Their "big" distro is like 64MB. It has x11 and all sorts of goodies. Designed for embedded. Won't actually write data to disk unless given specific command to do so. Good for flash drives with limited write wear and tear.Also, Arch is a kind of build from scratch Linux. Have not used it myself.
-
keep in mind that these stone age ancestors ran on machines that did not have virtual memory, but a flat real-mode address space...and were subsequently limited in their capabilities because of that. memory management is a very significant portion of any modern OS footprint. The UNIX you wrote of really bore absolutely no resemblence to modern UNIX.
I fondly remember the days of the 16KB Z80, where half of it was a prom BASIC interpreter, and if you wanted to do anything snazzy you had to allocate stack space, stuff hex machine code into it, and syscall() the address of that stack buffer.
Ah, nostalgia. About the closest to a 4KB OS you have these days is some of the microkernel RTOS systems that cater to microcontrollers.
-
This post is deleted!