Hercules emulator
From Wikipedia, the free encyclopedia
The Hercules emulator is a computer program which allows software designed for IBM mainframe computers (System/370, System/390 and zSeries) to be run on other types of computer hardware: notably on low-cost personal computers. Although there are other mainframe emulators which perform a similar function, Hercules is significant in that it enables private individuals to run mainframe computer software on their own personal computers. Hercules runs under Linux, Windows, FreeBSD, Solaris and Mac OS X and is released under the open source software license QPL. It emulates the CPU and peripheral device hardware only; the operating system has to be supplied by the user. Hercules was notably the first mainframe emulator to incorporate 64-bit z/Architecture support, beating out commercial offerings.
Development of the Hercules emulator was started in 1999 by Roger Bowler, a mainframe systems programmer. The project is currently maintained and hosted by Jay Maynard.
Contents |
[edit] Background
The emulator is written entirely in C. Machine specific assembly code, which other emulators use, was ruled out due to its lack of portability even though it could significantly improve performance. There is one exception: hardware assists are used to provide inter-processor consistency when emulating multiple CPUs on SMP host systems.
The IBM public domain operating systems OS/360, DOS/360, DOS/VS, MVS, VM/370, and TSS/370 run under the emulator. Newer operating systems, such as OS/390, z/OS, VSE/ESA, z/VSE, VM/ESA, and z/VM will run, but cannot legally be used except in very limited circumstances for license reasons. Linux/390 and Linux on zSeries run well on Hercules, and much development work is done on the emulator. Several Linux distributions include ports for S/390 and some also include a separate zSeries port, the most popular being SUSE Linux Enterprise Server. Other distributions with mainframe ports include Red Hat Enterprise Linux, Debian Linux, CentOS, and Slackware.
One of the prime uses for Hercules is as a cheap way of getting multiprocessor and 64-bit environments for development purposes to verify that code is portable and works with SMP and is 64-bit clean. There is also a large community of current and former mainframe operators and programmers, as well as those with no prior experience, who use Hercules and the public domain IBM operating systems as a hobby and for learning purposes.
In November 2007, efforts to compile GCCMVS on the Turnkey 3 Update Beta failed due to lack of region size (size of private address space in MVS). This has inspired work to create a new, Hercules-only System/380 computer model to extend MVS 3.8J with XA 31-bit addressing, extending Hercules function from emulating actual mainframes to inventing a synthetic one capable of running public domain System/370 operating systems, but with a larger address space. This will allow more modern application programs to run on a future Turnkey CD-ROM. Programs that rely on newer (XA) I/O definitions will not work with the System/380 selected and MVS/380 running. Persons with appropriate expertise are encouraged to join Hercules-380 Yahoo Group to modify the latest available 24-bit release of MVS, DOS/VS, VM/370, etc.
[edit] Example usage
The screenshot below shows the Hercules control panel, which is roughly equivalent to the Hardware Management Console (HMC) on an IBM S/390 mainframe. PSW means "Program Status Word", which includes what is known as "Instruction Pointer" on some other architectures, along with other status information. All counters are zero because the machine has not yet been told to boot. The console is active and ready to take commands, however the actual operating system (Debian GNU/Linux 390 in this case) has not been loaded yet.
To the right is what you see after an operating system is booted, in this case Debian GNU/Linux 390. The panel command "IPL 0800" (Initial Program Load) was issued to boot from the device found at address 0800. A Linux boot sequence takes place that looks more or less as it does on Alpha, Intel or other platforms. Interaction here is still via the control panel, where the rule is that any commands prefixed by a dot "." are passed through to the mainframe operating system and anything else is interpreted as a panel command. An alternative is to connect via a 3270 session or a TCP/IP connection over ssh or X11/xterm just as for a personal computer.
The screenshot on the left is after logging in (with password in plain text due to the HMC pass-through arrangement). The user has shown that Linux/390 thinks it is running on a dual processor S/390 with a serial number of Pi.
[edit] Performance
It is difficult to determine exactly how Hercules emulation speeds correspond to real mainframe hardware partially due to the difficulty in comparing real mainframe hardware to other PCs and servers as well as the lack of a concrete performance measurement. Hercules expresses its processing performance in MIPS. Due to the age of the earlier System/360 and System/370 hardware, it is a relatively safe assumption that Hercules will outperform them when running on moderately powerful hardware, despite the considerable overhead of emulating a computer architecture in software. In the case of newer System/390 and zSeries/z9 operating systems, mainframes unsurprisingly still outperform Hercules. A relatively fast dual processor machine is capable of sustaining about 50 to 60 MIPS when executing code that utilizes both processors in a realistic environment with a peak of around 100 to 130 MIPS when running in a tight loop (not doing any useful processing). Hercules generally outperforms IBM's PC based mainframes from the mid-1990s, which have an advertised peak performance of around 29 MIPS. Compared to the more powerful but still undersized Multiprise 2000 and 3000 mainframes, Hercules would be considered a mid-range server. For every mainframe after the 9672 Generation 1, Hercules would generally be the lowest end system. Current high end System z9 systems are capable of performance around 12,000 MIPS (for aggregate performance of many CPUs in a multiprocessor server), so Hercules is outperformed by several orders of magnitude.
Processing power alone is only a small part of a larger picture. Mainframes are renowned for reliability, disk I/O performance, and their ability to handle many concurrent tasks, among other things. These aspects are generally lacking on most desktop or notebook PCs available to the hobbyist, though perhaps not on server-class platforms, so even though Hercules may be capable of performing more instructions per second than some mainframes, disk bottlenecks may degrade performance.
[edit] External links
- Hercules Emulator home page
- Hercules discussion group
- Hercules, Son of Z's (Review on Tech-news.com)
- Public domain OS library (MVS version 3.8, VM/CMS release 6, DOS/VS release 34, TSS/370 version 3)
- Public domain software archive (includes Turnkey MVS CD image)
- Running GNU/Linux Debian s390 under a i386
- Tur(n)key 3 MVS documentation (Hercules with MVS 3.8 ready to run)
- Tur(n)key 4 MVS (BETA) on PUP Linux Bootable CD/USB image