Booting A Mainframe Inside Linux

By Moshe Bar
Byte

August 1, 2000

I visited http://www.conmicro.cx/hercules there is indeed a mainframe emulator capable of IPLing MVS along with other mainframe OSes, such as VM (an OS capable of booting other operating systems under it, much like VMware), VSE, and others. Hercules was developed by Roger Bowler and is now maintained by Jay Maynard. Both are two very smart developers with a talent for creating and managing an open-source development community.

I downloaded the latest stable version and compiled it on my dual Coppermine 733-MHz, 1-Gbyte Linux server. Compilation is very easy and the output uses two main executables and some utilities. The executables each are for the older S/370-architecture emulation and for the modern-day S/390 architecture. The S/370 is complete and boots all S/370 capable operating systems correctly. The S/390 emulator can load OS/390 and VS/ESA, but not VM/ESA because of two missing machine instructions on which VM/ESA heavily relies (SIE and VM Assist).

Once I obtained the freely available DASD image (hard disks back then were called Direct Access Storage Devices in "IBMese") of MVT, which is the MVS version in use in the mid-1970s, I booted it up and configured a couple of 3270 terminals for it. Using X3270, an X-Window based 3270 emulator, I was able to log-in and start a time-sharing option (TSO), the first IBM interactive working environment) session. Once there, it was a snap to write assembler programs, assemble them, and run them. S/370 assembler is very easy and about as productive as Cobol or PL/1.

It was complete joy. Doing the stuff I used to do almost 20 years ago on my Linux box at home was a bold feeling. The first day, I stayed glued to the 3270 terminal for almost 20 hours, trying to remember old sequences and commands.

The Hercules emulator is very efficient. I dedicated 4-Mbytes of RAM to my virtual mainframe, and checking the Linux stats I saw that it would use CPU time only when there actually was real action inside the virtual mainframe. By contrast, VMware always is up there at 90 percent CPU time, even when the virtual machines inside it are in the background not doing anything. Of course, every few milliseconds the virtual machine for both VMware and Hercules need to wake up to do kernel house-keeping and update the internal clock, but it seems the Hercules approach to it is far more wisely designed.

On my system, the mainframe virtual machine achieved about 3 MIPS, which makes it comparable to some of the IBM mainframes in use in the mid-1980s, such as the 3083-BX.

Once I was happy with the old MVT, I was eager to try out OS/390, CICS, TSO, DB2, and all the other stuff.

Moshe Bar [ moshe@moelabs.com ] is an Israeli system administrator and OS researcher, who started learning Unix on a PDP-11 with AT&T Unix Release 6 back in 1981. He holds an M.Sc in computer science. Visit his website at http://www.moelabs.com/

Copyright 2000