8

Maybe a silly question but has there ever been a mainframe OS running on a Z80 system, of course with sufficient memory and memory management unit?

I'm thinking of a ported MVS running, with TSO, the classic OS/370 editor, a COBOL and/or FORTRAN compiler. Or am I the only one having such weird ideas?

1

4 Answers 4

15

I'm confident that the answer is "no", for two reasons:

  • Z80-based system with the multiple megabytes of RAM that would be needed for something of the complexity of MVS have existed, but were always expensive and never mainstream.

  • The Z80 architecture is not suited for emulating the 360/370 hardware features that MVS relies on. It doesn't have logical address spaces with logical-to-physical address mapping.

You might feasibly be able to create something like BOS/360, a very basic operating system for the smallest 360 models. However, nobody actually wants or runs that any more.

There is a mainframe hobbyist community, based round the Hercules mainframe emulator. That can run MVS at a useful speed on modern hardware under Linux or Windows. If you're interested in playing with MVS, that's the easiest option by miles.

7
  • Z80 systems have existed with many megabytes of storage - although at a time when Z80 wasn't exactly what one would have used them for such a project (aka mid 1980s). They were either for special use, or simply run using MPM or custom multi user systems.
    – Raffzahn
    Commented Mar 17, 2023 at 10:53
  • @Raffzahn: Thanks, added. Commented Mar 17, 2023 at 12:38
  • They weren't that rare. Altos for example sold several thousand of each of their ACS-8000, ACS-580 and System 5. Those systems started early as 1977, with RAM up to 256 KiB and 4-9 Users depending on OS and application. Memory was never an issue really stopping the Z80.
    – Raffzahn
    Commented Mar 17, 2023 at 12:50
  • "It doesn't have logical address spaces" Though it would be fascinating to implement something like this similar to this 6502 modification.
    – dirkt
    Commented Mar 17, 2023 at 13:14
  • 2
    When IBM did this, the 8088 wasn't sufficient, they used the M68k.
    – user71659
    Commented Mar 17, 2023 at 22:48
8

Maybe a silly question but has there ever been a mainframe OS running on a Z80 system,

I'd say rather not - at least not as anything past some for fun/for learning projects.

of course with sufficient memory and memory management unit?

Of course - after all, a Z80 without extended address space (and thus some form of management) wouldn't work past emulating some very basic /360 models.

I'm thinking of a ported MVS running, with TSO, the classic OS/370 editor, a COBOL and/or FORTRAN compiler.

Erm ... the whole point of /370 and its software is that there is no porting needed. It's a 100% compatible environment. Everything model/hardware specific is hidden in some deep down abstraction layer within the OS.

So the only way to go is having the Z80 emulating the /370.

Or am I the only one having such weird ideas?

No, not at all. It's a very obvious idea. I'm as guilty as you (*1). The real issue here is speed. The Z80 is simply way too slow for any useful application - especially with that software burden.

One needs a lot of instructions to emulate. For /370 to Z80 I would assume a ratio of 1:100 (*2) for most of the emulation. With an average of 8 cycles per Z80 instruction (*3) this means the average /370 instruction will take about 800 Z80 cycles. At a time where this may have been interesting, say before 1980(*4), the Z80 was specced as Z80A at 4 MHz. So one could expect an upper boundary around 5,000 instructions per second. In fact it might be even less considering the address translation.

That is 1/3rd of the lowest full /360, the Model 30(*5) and about 1/5th to 1/10th of a /370-115(*6), the lowest end /370. Neither is capable of even loading MVS. To set this into context, by 1980 IBM's offerings were between 1.2 MIPS for a 3031 and 5 MIPS for a 3033u. So that Z80-based beast would have been 250 and 1000 times slower.

Even worse, all of that is without I/O - the part the /370 architecture was really good at - and micros never.

But hey, it might have been for a single user. Sure, but that doesn't change that any of the mentioned software packages has a code path of several 10k instructions per function, making anything EXTREMELY slow, up to simply not usable.

The 1982 Z80H wouldn't change that picture much. At that time way faster 16- and 32-bit capable CPUs would have been used, not a Z80. Even today's up-to-50-MHz Z80 compatible (EZ80, etc.) would still be way below acceptable in 1980, even more so when they finally were available.

Bottom Line:

Z80 were throughout all of their existence far too slow to be used as base for any useful /370 system. Memory, by contrast, would not have been an issue.


Maybe as a reference, a 2000s' Pentium III at 500 MHz running Hercules cranks out about 1.5-1.8 /370 MIPS. That's 20+ years of development later, clocked at >100 times faster than the Z80, having native 32-bit support and built-in hardware memory management, still barely hitting the low end 3031 CPU of 1977 Mainframe CPU (again not considering any I/O load).(*7)


*1 - I did so in 1980 for the 6502-based Apple 2. It was really more a fun issue. Other than intended, I didn't use it for any development.

*2 - For the non-FP instruction set and at the very minimum one can assume 10 instructions for each of

  • Scheduler (using a table)
  • Calculating an address (1-2 per instruction)
  • each byte handled by that instruction (average 12 for character)

So with 1.5 Addresses and 8 bytes (average between word and character) that's about ~100 instructions. This is on purpose estimated toward the lower end.

*3 - A value gathered a very long time ago using an LA while running Multiplan.

*4 - In 1980, or later, much faster CPUs would have been chosen for such endeavour - after all, we are talking about customers that paid more for a terminal than a whole micro setup would cost.

*5 - The Model 30 peaked at 35 kOPS for basic 32-bit add. It also had a memory of 8..64 KiB of RAM.

*6 - Offered with 64 or 96 KiB RAM, so quite within reach of a 1976 Z80 system.

*7 - To finish the picture, although modern (non mainframe) CPUs have caught up quite a bit in the following 20 years, they still have not dethroned the dedicated mainframe CPU. But they have found a place in low end machines emulating /370.

0

I'm going to be a contrarian here, and answer "yes". The previous two answers quite correctly pointed out that the Z80 just could not compete with mainframes of its era. With that I agree.

But if you compare a capable Z80 system with mainframes of a decade or more prior, the answer is not so clear. For example, I am aware of a shop which used a 64 kbyte Z80 server to support 4 simultaneous users from 4 different serial terminals. IIRC, it could even support up to 8 users. Each user would be running their own tasks.

Impossible? Nope, not on a system running the Forth OS/Language/Editor/Developement-environment/Applications. Was there memory protection or huge commercial database? Of course not. Could a single user crash or dominate the whole system? Yes. Was it a speed demon? No. Cost? pretty much unbeatable. This sort of Forth model depends on co-operative multi-tasking and experienced users.

But compare it to a 1967 mainframe (10 years prior to the Z80's release) in overall power -- yes, it competes. Admittedly it does not meet your criteria for what a mainframe should be able to do, but it does a lot that mainframes of an earlier decade could not.

1
  • 4
    No, it does not. As shown a 1977 Z80 is about 1/3 of the lowest end mainframe of 1967 - even worse when considering that noone in his right mind would have connected a terminal to a Model 30. That's something that might have been added to a Model 148, ten times that speed, and even then only for a few users. More relevant, the question was never about number of users,but running applications. Mainframes of that time weren't about a few independent users but hundreds or thousands of simultaneous terminals.
    – Raffzahn
    Commented Mar 17, 2023 at 17:04
0

Here is something that could be attributed as having sufficient memory and (kind of) memory management unit: https://nedoos-ru.translate.goog/?_x_tr_sch=http&_x_tr_sl=ru&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp (unfortunately main language used by its developers is Russian so the link given is google translated one). You can also browse SVN repository mirror here: http://nedoos.ru/svn/

It runs on a specific branch of ZX Spectrum compatible machines that also have sufficient memory amount (1..4 Mb).

Those machines have (sort of, primitive) memory management: there are 4 windows of 16 kB each. Any 16 kB memory page (of a total of 256 pages) can be inserted into any of 4 windows. There are also 2 sets of such page mappings, facilitating fast switch to the kernel. However, no real memory protection exists.

This OS is multitasking and implements preemptive task switching.

It supports floppy disks, HDDs, SD cards and USB flash sticks.

There are lots of tools and games, some games are ported ZX Spectrum games, some are originally developed for the platform/OS.

It also has internet support (via ethernet card), there is a http (obviously no https) browser, gopher browser, file transfer utility (between the machine running this OS and conventional browser on pc), AY music player driven through network, several network games, IRC client etc.

Not the answer you're looking for? Browse other questions tagged .