Hercules emulator

From Wikipedia, the free encyclopedia

Jump to: navigation, search
Hercules logo
Design by Roger Bowler
Developed by Jay Maynard
Initial release 1999 (1999)
Latest release 3.06 / 2009-01-11; 96 days ago
Written in C
Operating system Linux, Windows, Mac OS X
Development status Active
Type Emulator
License Q Public License
Website http://www.hercules-390.org/

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.


[edit] Background

The emulator is written almost 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 are two exceptions: hardware assists are used to provide inter-processor consistency when emulating multiple CPUs on SMP host systems; and assembler assists are used to convert between little-endian and big-endian data on platforms where the operating system provides them, or if the host processor is a member of the x86 or x86-64 families.

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. OpenSolaris has been ported to System z but does not currently run under Hercules as it depends on features of z/VM.

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.

The open source nature of Hercules means that anyone can produce their own customized version of the emulator. For example, there are at least two projects[1][2] underway whose aim is to produce a hybrid "System/380" which would combine the characteristics of System/370 and System/390.One of the “System/380” projects has been successfully implemented and demonstrates the hybrid features of “System/370” and “System/390”.

[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.

Hercules Control Panel

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.

Hercules Linux/390

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. This is partially due to the difficulty of 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. Newer System z systems still outperform Hercules: A relatively fast dual processor machine is capable of sustaining about 50 to 60 MIPS under Hercules for code that utilizes both processors in a realistic environment, with sustained rates rising to a reported 300 MIPS on current (early 2009) leading-edge PC-class systems. It can have peaks of over 1200 MIPS when running in a tight loop (such as in a synthetic instruction benchmark or other small compute intensive codes). 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 z10 systems are capable of performance up to around 28,000 MIPS (for aggregate performance of many CPUs in a fully configured 64-CPU multiprocessor server), so Hercules is outperformed by several orders of magnitude. However, Hercules on a PC costs several orders of magnitude less than those high end System z systems.

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] References

  1. ^ Hercules-OS/380 Yahoo Group
  2. ^ Hercules-380 Yahoo Group

[edit] External links

Personal tools