Here is a query for you: How do you get an working system that first appeared 33 years in the past to run on a processor that is nearly 20 years older, from 1971? Nicely, it seems the reply is to make the traditional chip emulate one thing that is solely 36 years outdated, strip the software program right down to its naked necessities, after which simply wait nearly 5 days for the kernel in addition.
Whereas the challenge itself serves no apparent sensible goal, the work of Dmitry Grinberg (through Ars Technica) deserves real admiration. If you happen to’re an everyday reader of our {hardware} information, then the identify is perhaps acquainted—it is the identical hacking wizard that ported Doom to run on a Def Con attendee badge.
However that challenge pales compared to Grinberg’s newest one. In brief, he managed to get the kernel of Debian Linux in addition on a 4-bit Intel 4004 processor, the primary ever commercially manufactured microprocessor. Even by the requirements of the Seventies, the 4004 is as primary because it will get.
With simply 2,600 transistors to work with, the variety of operations it could actually deal with is extraordinarily restricted (principally simply add and subtract, and no logic ops in anyway) and whereas it has a stunning variety of registers (16 in whole), it would not help {hardware} interrupts making any sort of multitasking considerably of a problem!
The truth is, it’s miles too primary a chip to run Linux and that is the place Grinberg obtained actually inventive. With a RAM goal of simply 4 kB, he coded up a program to emulate a MIPS R3000 processor on the 4004. That specific chip is from the identical period as the unique model of Linux so it was a pure alternative for the emulation activity, although it was removed from simple to realize.
However with some extra {hardware} emulation and a raft of period-correct parts, Grinberg put collectively a customized circuit board with a primary show to show that Linux was certainly firing as much as a command immediate. The one actual concern with all of it is a matter of velocity.
Even with a 5% overclock, the 790 kHz clock velocity of the 4004 (sure that is kilohertz, not mega or giga) is desperately gradual. Preliminary projections of how lengthy it will take in addition the kernel (the basic core of the working system) produced a determine of just below 9 days! Cue a lot tweaking and neat little tips, and Grinberg obtained all of it the best way right down to 4.76 days.
If you happen to watch the above video, you may see the laptop computer’s clock whizzing alongside—the video recording of Linux loading up and operating is sped up significantly, as even when YouTube allowed movies to have a runtime of a number of days, I do not suppose anybody may handle to observe it all through in actual time!
The entire challenge is one heck of an achievement. Positive, it has completely no sensible use however who cares? It is a tribute to the sheer ingenuity and dedication of a gifted and hardworking engineer. I believe the one downside Grinberg has now’s how on Earth does one high this. Oh, I do know—it needs to be Doom, in fact. I’m wondering if he can get it to run at 30 fpm (frames monthly)?