If it is a TEOWAKI situation in computing then it will likely be best to look back at the challenges of the computer pioneers rather than try to come up with new solutions in a vacuum. In other words, bell bottom blues, return of the 1970’s
Allisontheolder commented on Nov 11, 2019
via https://github.com/hsoft/collapseos/issues/52#issuecomment-552606208
I’ve used CP/M since the 70s and when P2DOS a z80 clone was introduced I used it. FYI it was assembled using CP/M as the development environment with no issues for space to re-create. In fact I’ve use cp/m systems to assemble CCP/BDOS using native tools. After all it was always done that way. FYI Ron Cains Small C needed 48K to compile itself and maybe 200K of disk space.
The minimum functioning disk system was Northstar dos, it fit in about 0A00h bytes that 2560 bytes. Enough to load, save, and run programs. anything else was loaded as a utility.
CP/M is not overstuffed. Its a complete file system with scatter/gather media usage and a complete set of utilities and tools with it but stored on the media so if not needed delete them. A typical system build is about 8K usually it can be a bit less. When a program is loaded the CCP the use interface is overlaid and on return its restored. Same for the BDOS is more space is needed and yes on return it is also restored. The BIOS is in ram (or Eprom if one chooses) and nominally resident as its all of the IO. So a system can have a memory space with BDOS resident of about 4K to 5K less than 64K. Typical was 56-58K. With it brings a large library of accessible programs. (Walnut Creek CP/M CD is on the ‘net and has 85% of everything ever). Its real advantage is anything block replaceable for storage is possible and has been done. That covers floppies (all sizes), MFM and RLL hard disks, SCSI disks, CDrom (scsi), and IDE, CF, SD, uSD, EEPROM and FLASH, and tape!
As to a compact OS for minimal hardware likely most here have no knowledge of system-1 or the similar integrated packages that would runn on 8080/8085/z80. This is a 1976 this that ran on the first Altairs and IMSAIs with maybe 8k of ram and was loaded from paper tape of audio cassette. An example of this that can be fond on the ‘net is Processor Technology ALS-8 and it contains a monitor (as called here a shell), and assembler and simple line editor (CRTs were later!). It was enough to given about 10K of ram to assemble itself in modules. ALS-8 is romable so it was also available as a board with Eproms as well TEH PT SOL was among one of the first complete integrate terminal (CRT, Keyboard, and 8080 CPU) systems.
RE: PX-8 the tape was terminally slow but worked. The other approach they took a wedge that was an attachable ramdisk of 120Kb with battery backup. I have two they work very well though every ten years the NiCds need to be replaced (they are ca 1984ish new). There was also a external Floppy with about 350K (5.25 and 3.5 inch). For those trying to grok programming in 120k , it is adequate since CP/M is in rom and same for utilities and Basic. I have three, two with 120K wedge and one with 64K wedge.
Most modern OSs for small system are written in C and invariably the OS and supporting east something int he 32K region even UZI-unix. That is not so bad but there is not a large catalog of useful programs. Those being Editors, assembler, loaders, spreadsheets, database tools.
Tape based OS can be a block replaceable system and the only difference is speed for access. I have a few that still work such as DEC tu58. Those are 256K of storage per DC100 (two drives per deck) tape and about 60 seconds for a full rewind and search for first. Some however are serial ( the whole file runs as several/many blocks) file systems and are compact but slow, still useful.
In the dark ages (1970s to early80s) tape could also be the common then portable cassette recorder and the data was encoded as tones for writing and read back as if it was paper tape. Cheap as in minimal electronics and those recorders were typically 40-50 bucks then, simple and remarkably effective. Usig two you could read from one ans write to the other as a crude database system or assemble and write to tape.
Of course if one is into TEOWAKI [the end of the world as we know it] then I suggest the 1802 CMOS CPU as its rad hard compared to NMOS and if you have to build it from transistors you will use a whole lot less of them.
All one has to do is look back for the answer instead of reinventing the incompatible wheel.