Bridging the Gap: Developing Applications for Linux on IBM z Systems and Intel Processors

Jerry Saulman
4 min readJun 12, 2023

--

Photo by Brian Kostiuk on Unsplash

In the modern era of computing, where diversity in hardware platforms is the norm, developers are faced with the challenge of writing applications that run seamlessly across different architectures. IBM z Systems, built on the s390x architecture, and Intel processors are two prominent platforms that cater to distinct enterprise computing needs. In this blog, we will explore the key differences developers encounter when writing applications for Linux on IBM z Systems versus Intel processors.

As someone who works with ISVs porting their software, these are all issues I am aware of. As long as the ISV is able to handle these ideas with whatever resources we can make available from IBM (classes to SMEs) to help them get the idea down, there really isn’t a good reason why anyone can’t port their software to run on s390x platforms.

Having awareness of these issues also means that code can be optimized for the platform it is on and perhaps include feature/function that takes advantage of native capabilities even if it means that some features work better on one platform than the other, as a hypothetical. A dedicated cryptographic co-processor, for example, may mean that overall performance increases where data is encrypted between the end user and the server (as one example.)

  1. Architecture and Instruction Set: The primary difference between IBM z Systems and Intel processors lies in their underlying architectures and instruction sets. IBM z Systems employs the s390x architecture, which is known for its reliability, scalability, and mainframe capabilities. On the other hand, Intel processors, such as those found in x86-based servers, are prevalent in commodity hardware and offer a different set of features.
  2. Endianness: Endianness refers to the ordering of bytes in memory representation. IBM z Systems use big-endian byte ordering, while Intel processors predominantly employ little-endian byte ordering. This distinction impacts applications that exchange data between these platforms. Developers need to carefully handle data conversions and ensure proper endianness awareness to maintain data integrity across different architectures.
  3. System Calls and APIs: Linux on s390x and Intel processors provides a standard POSIX API for application development. However, there might be some architecture-specific system calls and APIs that developers need to consider when writing applications. As one example, when querying the OS to determine what on intel is an OS command, there is a set of C-library functions that you should use to do the same thing on s390x-based platforms.
  4. Performance and Optimization: IBM z Systems excel at handling massive workloads and delivering exceptional throughput. The inherent design of z Systems, including its hardware accelerators and vector processing capabilities, provides unique performance advantages for specific workloads, such as financial transactions or database processing. zSystems boxes feature things like hundreds of I/O processors (IBM Power chips) to offload I/O completely from the s390x processors which makes transfers of data lightning fast and keeps the processors on the box doing what it should be doing… crunching the instructions.

Developers need to be aware of these architectural differences while writing applications. They must understand the instruction sets, memory models, and hardware-specific features to optimize their code for the target architecture.

For example, IBM z Systems offer Extended Addressability (EA) mode, allowing applications to address memory beyond the 2 GB limit of 31-bit addressing. Developers targeting z Systems can leverage this feature to build high-performance applications that require large memory footprints. Such considerations are not applicable to Intel processors.

Developers writing applications for IBM z Systems should take advantage of these architectural strengths. Optimizations can include exploiting SIMD (Single Instruction, Multiple Data) instructions, leveraging the cryptographic coprocessor, or utilizing hardware decimal floating-point instructions. On the other hand, Intel processors have their own set of performance considerations, focusing on factors like cache utilization, pipelining, and parallelization.

Development Environment and Tools: When developing applications for Linux on IBM z Systems, developers can use familiar development environments and toolchains, such as GCC, Eclipse, or IBM Developer for z/OS. These tools provide features to simulate and debug applications specific to the z Systems architecture.

For Intel processors, the development environment may include compilers like GCC or Intel C++ Compiler, as well as IDEs like Visual Studio Code or JetBrains CLion. The tooling and debugging support are generally tailored to the x86 architecture.

In addition, cross-compilation tools are available so that you can use a single platform to compile code for intel and for s390x. You don’t have to be on the s390x platform to compile the code! This makes is easier for workflows and CI/CD pipelines to be constructed that can integrate with code repositories and re-spin versions for both types of platforms.

Conclusion: Developing applications for Linux on IBM z Systems and Intel processors requires an understanding of the underlying architectural differences, performance characteristics, and optimization techniques. While both platforms offer robust environments for running Linux, developers must be mindful of factors such as endianness, system calls, APIs, and leveraging architecture-specific features. By considering these aspects, developers can ensure their applications perform optimally and seamlessly across diverse hardware landscapes, catering to the unique demands of IBM z Systems and Intel processors.

--

--

Jerry Saulman
Jerry Saulman

Written by Jerry Saulman

A little wiser than my years. A little younger than age.

No responses yet