Linux on System z is the collective term for the Linux operating system compiled to run on IBM mainframes, especially System z machines. Other terms with the same meaning include Linux/390, Linux on zSeries, Linux for zSeries, Linux on System z9, zLinux, z/Linux, etc.
At the start of IBM's involvement, Linux patches for zSeries included some object code only (OCO) modules, without source code. However, currently Linux on zSeries is completely open source under the GNU General Public License. This 100% open source status is unusual among Linux distributions, many of which still contain OCO drivers from various vendors who wish to hide proprietary driver implementation details.
IBM announced in May 2006, that over 1,700 customers run Linux on their mainframes — which is a considerable number in the mainframe market.
IBM currently supports two Linux distributions, Red Hat and Novell SuSE. Other notable Linux on zSeries distributions are Debian, Gentoo, Slackware, and CentOS. The Linux kernel architecture designation is "s390" for 31-bit kernels and "s390x" for 64-bit kernels.
System z mainframes are capable of multiple levels of virtualization. In the first level of virtualization, a single machine can be divided into as many as 60 logical partitions (LPARs), and each LPAR is a separate virtual machine running a separate operating system (OS). LPARs are implemented in hardware using a feature called PR/SM which can (optionally, typically) dynamically adjust LPAR boundaries according to real-time demands. This hardware feature is always active in modern mainframes, even in the simplest configuration with a single LPAR spanning the entire machine.
However, most Linux on System z customers take advantage of an additional virtualization level, z/VM. This is a mainframe OS with a long history, and one of its main functions is a hypervisor, a provider and manager of virtual machines. Operating systems, such as Linux, that run within a z/VM virtual machine are called guests or images. z/VM virtualizes not only processors and memory but also mainframe (ESCON or FICON) disk storage, networking, cryptographic accelerators, and other mainframe resources.
z/VM operates inside an LPAR, like any other mainframe OS. This provides two levels of Linux virtualization: based on hardware, and based on a hardware-assisted hypervisor. Moreover, z/VM can also be a guest of z/VM, creating nested levels of virtualization at any number of levels deep. Nested virtualization has little extra overhead and is practical on mainframes.
Linux on zSeries is available in both 31-bit and 64-bit versions, with the 64-bit versions rapidly gaining popularity as z/Architecture mainframes become more prevalent than earlier ESA/390 generation. The 64-bit distributions can still run 31-bit applications. The Linux 2.6.x kernel added substantial support for mainframe hardware, such as ESCON, FICON, SCSI-attached storage devices, and zSeries cryptographic accelerators. Also several vendor distributions backported 2.6.x patches to the Linux 2.4.x kernel.
As one of the most scalable platforms for Linux computing, System z has several major advantages. First, companies and governments can simplify their computing infrastructure. Numerous small Linux and PC servers can be combined onto one mainframe, gaining all the benefits of centralization, but still keeping a multitude of specialized servers thanks to virtualization support, thereby reducing operating costs. File servers, web servers, print servers, name/directory servers, and other "utility" servers are well-suited for that.
Second, Linux on zSeries can take advantage of mainframe qualities of service, especially their reliability and security features, to support continuous business operations. For example, transparent use of redundant processor execution steps and integrity checking. Many industries, including financial services, need this unique capability for their Linux applications. Also, mainframes support "hot" processor replacement. Linux and its applications continue to run, undisturbed, while adding or replacing processors, allowing business-friendly scaling according to demand. Third, IBM's mainframe customers benefit, like other Linux users, from the vast and growing portfolio of useful software applications, including open source innovations.
When Linux applications access mainframe-based data and applications in CICS, IBM DB2, IMS, and other mainframe subsystems, running on the same physical mainframe, they can utilize HiperSockets – fast, memory-only TCP/IP connections. As compared to TCP/IP over standard network interface cards (NICs, in the mainframe world called Open System Adapters, OSAs), HiperSockets can improve end-user responsiveness (reduce network latency and processing overhead), security (since there's no network connection to intercept), and reliability (since there's no network connection to lose).
z/OS still has numerous reliability and availability advantages over Linux, so most Linux on zSeries customers run both operating systems and will likely do so for the foreseeable future. However, some new, 21st century mainframe buyers run Linux on their systems, some exclusively. It is possible to configure any new mainframe with IFLs only.
A Linux-capable 64-bit mainframe starts at about $40,000 (z800 model 0E1, U.S. early 2008 used system price on Ebay) plus the cost of external disk array plus console and network interconnects. Each additional IFL ranges from $95,000 (System z9 BC only) to $125,000, according to IBM's publicly announced list prices as of early 2008. When upgrading a mainframe to a new generation, IBM typically charges a base upgrade fee for the machine hardware but will not charge extra to enable the same number of IFLs that were activated on the prior machine, even though newer models have faster IFLs. This IBM pricing practice is probably unique among servers but has a long history in the mainframe market.
Nonetheless, Linux on System z is not appropriate for small businesses that would have fewer than about 10 distributed Linux servers, although some expensive per-processor licensed software can quickly reduce that rule of thumb. Most software vendors, including IBM, treat the highly virtualized IFLs just like non-virtualized processors on other platforms for licensing purposes. In other words, a single IFL running scores of Linux instances still counts as one "ordinary" CPU, at the same CPU price, for software licensing. Test, development, quality assurance, training, and redundant production server instances can all run on one IFL (or more IFLs, but only if needed for peak demand performance capacity). Thus, beyond some minimum threshold, Linux on System z can quickly become cost-advantageous when factoring in labor and software costs.
The cost equation for Linux on System z is not always well understood and is controversial, and many businesses and governments have difficulty measuring, much less basing decisions on, software, labor, and other costs (such as the costs of outage and security breaches). Acquisition costs are often more visible, and small, non-scalable servers are "cheap." Nonetheless, non-acquisition costs are no less real and are usually far greater than hardware acquisition prices. Also, individual users and departments within larger businesses and governments sometimes have difficulty sharing computing infrastructure (or any other resources, for that matter), citing a loss of control. Server centralization, as Linux on System z provides, might reward cooperation with better service and lower costs, but that's not to say that cooperation is always easily accomplished within a corporate bureaucracy.
Linux on System z also supports less expensive disk storage devices than z/OS because Linux does not require FICON or ESCON attachment, although z/OS may use disk space more efficiently due to hardware-assisted database compression on z/OS; however this effect is highly variable, and may be eliminated due to the minimum space allocation requirements for z/OS data sets (a full disk track).
On the other hand, mainframes in general, and Linux on zSeries in particular, do not perform well, at least on a cost basis, for single task computations. Examples include most scientific simulations, weather forecasting, and molecular modeling. Supercomputers, including Linux-based supercomputers, excel at these workloads. This distinction has blurred since the introduction of the System z10, a machine based on quad-core 4.4 GHz processors with hardware decimal floating point. In this regard, the System z10 more resembles a supercomputer processor than previous mainframes.
Mainframes do not provide any advanced graphics or sound adapters, and are as such ill-suited for digital media editing or computer-aided design (CAD) except perhaps in support roles (e.g. content storage, parts inventories, etc.).
Most Linux on zSeries customers, particularly those with business-critical production workloads, purchase a software support contract from commercial Linux vendors such as Novell SuSE or Red Hat. IBM Global Services also offers support contracts, including 24x7 coverage. Some standard Linux software applications are readily available pre-compiled, including popular closed-source enterprise software packages such as WebSphere, DB2 and Oracle databases, SAP R/3, and IBM's Java Developer's Kit (JDK). Nearly every open source software package available for Linux generally is available for Linux on zSeries, including Apache HTTP Server, Samba software, JBoss, PostgreSQL, MySQL, PHP, Python programming language, Concurrent Versions System, GNU Compiler Collection, and Perl, among many others.
The developer resources can be particularly helpful for performance tuning. Performance tuning is particularly important in mainframe environments with large numbers of users. Mainframe customers tend to expect applications which can scale to high numbers of users and transactions, because that's how they use their systems every day. Sloppy programming is less tolerated, although the mainframe operating environment will keep any such programming from degrading other OS instance's performance. Some Linux application programmers do not expect this exceptional focus on code quality that the mainframe culture and mainframe operating environment demand. However, most developers quickly understand and appreciate this phenomenon, and there's a great deal of professional pride among the growing community of developers with Linux on zSeries experience.
Linux on zSeries supports Unicode and ASCII just like any other Linux distribution—it is not an EBCDIC-based operating system. There is nothing inherent in z/Architecture that requires EBCDIC. Even z/OS, for that matter, supports Unicode, ASCII, and EBCDIC. Moving Linux applications to Linux on zSeries almost always involves just simple recompilation of the source code. The few exceptions might include source code which assumes a particular "endian" byte order or inline machine instructions for a specific processor, although these issues are not unique to Linux on zSeries, usually easily remedied, and quite rare.
Although programs can be easily cross compiled to z/Architecture binaries on non-mainframe Linux system, at some point such binary is usually tested either on a real mainframe, or at least on an emulated one.