Hercules mainframe emulator
Shadow Files Instead of Snapshots
Hercules does not use snapshots like other virtualization programs, but it does implement shadow files, which can be put to similar use. To use a shadow file, you need to change the lines with the hard disk configuration slightly (Listing 2, line 29ff.):
0A01 3390 dasd/sys1.dasd ro sf=shadow/sys1_*.dasd 0A02 3390 dasd/sys2.dasd ro sf=shadow/sys2_*.dasd
After starting, Hercules automatically writes the shadow/sys?_1.dasd files. The sf+ * command at the Hercules console creates a new set of shadow files, up to a maximum of eight files. sf- * merge or sf- * nomerge accepts or discards the changes to the current shadow step. Accepting means that sf- merge writes the changes from, for example, sys1_2.dasd to sys1_1.dasd. To write changes to the original files, you must specify sf- * force (or omit the read-only option ro).
The Hercules suspend and resume commands save and restore the complete system state; however, this mechanism does not work reliably – zLinux will not work after you use it.
z/OS and MVS
From a Linux perspective, the mainframe is just one architecture out of many, so it makes sense to look at the operating systems that normally run on mainframes. On the current crop of systems, the operating system is z/OS 1.x. (Version 1.9 was released in September 2007.)
Unfortunately, z/OS is not free. Although there is an "ADCD" package for developers and a z/OS demo package, you at least need to lease an IBM machine to use it legally. This just leaves the granddaddy of today's z/OS, MVS (version 3.8), as an alternative for experimenting at home.
MVS (Multiple Virtual Storage) was developed from earlier IBM operating systems; its direct predecessor is the OS/360 MVT (Multitasking with a Variable number of Tasks) variant. MVS then became the operating system for the next generation of hardware, the System/370 computer, which supported virtual memory as of 1972.
Interestingly, the older S/360-67 models did support virtual memory, but at the time, batch processing was regarded as far more important and hardware support for memory virtualization was thus omitted from the S/370 series.
MVS was released in 1974 and led directly via MVS/XA, MVS/ESA, and OS/390 to z/OS. Now MVS is freely available because operating systems at the time were distributed openly.
A "turnkey" MVS system is available for Hercules: the MVS Turnkey System [7][8]. The only additional software you need is a 3270 terminal emulator; Linux users can install the x3270 package that comes with their distributions.
If you think you can set up a mainframe system quickly and start using it, you will be disappointed. Although you can boot and down the system using the "Cookbook" [8], it will not help you much if you do not have any previous mainframe experience. If you are seriously interested in immersing yourself in this material and working your way through the available documentation – including the current z/OS documentation, which is freely available from IBM – you will enjoy the experience of your own mainframe.
Conclusions
Hercules offers a stable emulator for mainframe architecture. Running on a powerful midrange system, the performance should be sufficient to replace a zLinux test LPAR. If you are thinking of porting your software to zLinux, you can use Hercules or the Community Development System for Linux (LCDS), a service provided by IBM [9].
Infos
- Hercules: http://www.hercules-390.org
- Conversion table for DASD sizes: http://www.sdisw.com/vm/dasd_capacity.html
- ThinkBlue/64 Linux for zSeries: http://linux.zseries.org
- CentOS: http://www.centos.org
- MacIsaac, Michael, Ronald Annuss, Wolfgang Engel, et al. Linux for IBM eServer zSeries and S/390: Distributions. Redbooks, 2001: http://www.redbooks.ibm.com/redbooks/pdfs/sg246264.pdf
- Linux Redbook portal: http://www.redbooks.ibm.com/Redbooks.nsf/portals/Linux
- The MVS 3.8j Turnkey System: http://www.ibiblio.org/jmaynard/turnkey-mvs-3.zip
- Information about the MVS Turnkey System: http://www.bsp-gmbh.com/turnkey/index.html
- Community Development System for Linux (LCDS): http://www-03.ibm.com/systems/z/os/linux/lcds
« Previous 1 2 3 4
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
![Learn More](https://www.linux-magazine.com/var/linux_magazin/storage/images/media/linux-magazine-eng-us/images/misc/learn-more/834592-1-eng-US/Learn-More_medium.png)
News
-
NVIDIA Released Driver for Upcoming NVIDIA 560 GPU for Linux
Not only has NVIDIA released the driver for its upcoming CPU series, it's the first release that defaults to using open-source GPU kernel modules.
-
OpenMandriva Lx 24.07 Released
If you’re into rolling release Linux distributions, OpenMandriva ROME has a new snapshot with a new kernel.
-
Kernel 6.10 Available for General Usage
Linus Torvalds has released the 6.10 kernel and it includes significant performance increases for Intel Core hybrid systems and more.
-
TUXEDO Computers Releases InfinityBook Pro 14 Gen9 Laptop
Sporting either AMD or Intel CPUs, the TUXEDO InfinityBook Pro 14 is an extremely compact, lightweight, sturdy powerhouse.
-
Google Extends Support for Linux Kernels Used for Android
Because the LTS Linux kernel releases are so important to Android, Google has decided to extend the support period beyond that offered by the kernel development team.
-
Linux Mint 22 Stable Delayed
If you're anxious about getting your hands on the stable release of Linux Mint 22, it looks as if you're going to have to wait a bit longer.
-
Nitrux 3.5.1 Available for Install
The latest version of the immutable, systemd-free distribution includes an updated kernel and NVIDIA driver.
-
Debian 12.6 Released with Plenty of Bug Fixes and Updates
The sixth update to Debian "Bookworm" is all about security mitigations and making adjustments for some "serious problems."
-
Canonical Offers 12-Year LTS for Open Source Docker Images
Canonical is expanding its LTS offering to reach beyond the DEB packages with a new distro-less Docker image.
-
Plasma Desktop 6.1 Released with Several Enhancements
If you're a fan of Plasma Desktop, you should be excited about this new point release.