Portability refers to the usability of the same software in different computing environments. In this context, a computer environment is defined by its hardware architecture, operating system and runtime libraries.
Software is portable when the cost of porting it to a new platform is significantly less than the cost of writing it from scratch. The lower the cost of porting software, relative to its implementation cost, the more portable it is said to be.
A prerequirement for portability is the generalized abstraction between the application logic and system interfaces.
The instructions supported by a particular processor and their byte-level encodings are known as its instruction-set architecture (ISA). A program compiled for one type of machine will not run on another. On the other hand, there are many different models of processors within a single family. Each manufacturer produces processors of ever-growing performance and complexity, but the different models remain compatible at the ISA level. Popular families, such as x86-64 or ARM, have processors supplied by multiple manufacturers.
Examples of notable CPU architectures:
- x86 instruction sets (32 and 64 bits).
- Intel’s IA-32 architecture, also called x86-32.
- x86-64 with AMD’s AMD64 and Intel’s Intel 64 versions.
- Single Instruction Multiple Data (SIMD) instruction set extensions: SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, FMA, AVX-512, and others (see the Intel Intrinsics Guide for a full list of technologies).
DEC’s Alpha architecture for workstations and servers (64-bit).
Intel’s Itanium architecture (formerly called IA-64) for enterprise servers and high-performance computing systems (64-bit).
MIPS Computer Systems Inc.’s MIPS architecture: big-endian and little-endian, 32 and 64 bits.
Oracle’s SPARC architecture for high-end servers (64-bit).
IBM System z: IBM’s architecture for mainframe computers (64-bit).
MIL-STD-1750A: the U.S.’s military standard computer (16-bit).
- IBM’s AP-101: the Space Shuttle’s computer (32-bit).
In addition, a software-defined GNSS receiver can perform computation offloading, which consists in the transfer of certain computing tasks from the Central Processing Unit (CPU) to an external platform, such as a Graphics Processing Unit (GPU), a Field Programmable Gate Array (FPGA) device or a cloud-based service.
An operating system (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.
Software-defined GNSS receivers are applications, that is, computer programs designed to perform a group of coordinated functions, tasks, or activities for the benefit of the user.
Applications that do not need an operating system are called bare metal applications.
Unix and Unix-like operating systems:
- The present owner of the trademark UNIX is The Open Group, an industry standards consortium. Only systems fully compliant with and certified to the Single Unix Specification qualify as “Unix” (others are called “Unix system-like” or “Unix-like”). Examples:
- The Linux kernel, used in some popular distributions such as Debian, Fedora, Ubuntu, openSUSE, Arch Linux, Linux Mint, Linaro, Raspbian or Google’s Android.
Microsoft Windows is a family of proprietary operating systems designed by Microsoft Corporation and primarily targeted to Intel architecture based computers, with a relevant percent total usage share on Web connected computers. Latest version is Windows 10, which was preceded by Windows 7, Windows Vista and Windows XP.
In case of using compiled programming languages, software libraries and executables are generated from the source code through three kind of tools:
- Build system generators, which automatically generate build files from human-written configuration files. Popular examples of those tools are the GNU Build System (also known as Autotools), CMake and SCons.
- Build automation tools, which automatically build executable programs and libraries from the source code with the aid of build files that contains rules describing targets, components and dependencies. Example are GNU Make, Unix’s make, Ninja and others.
- Compilers, which are programs that convert instructions into a machine-code or lower-level form so that they can be read and executed by a computer. In general, it is desirable to be able to build the source code with different compilers, since it improves the overall quality of code by providing different checks and alerts. Examples of compilers are:
- the GNU Compiler Collection, which provides front ends for C (
gcc), C++ (
g++), Fortran (
gfortran), Java (
gcj) and other languages;
- the LLVM project, which provides front-ends for C / Objective-C (
clang) and C++ (
clang++), while other external projects allow the compilation of Ruby, Python, Haskell, Java, D, PHP, Pure, Lua, and a number of other languages.
- Those included in Microsoft Visual Studio, such as the Microsoft C++ Compiler (MSVC) provided by Microsoft Visual C++;
vbc.exe, the Visual Basic .NET compiler; and
csc.exe, the C# compiler, among others;
- other compilers.
- In case of targeting embedded platforms, it is desirable the availability of cross-compilers, which are compilers capable of creating executable code for a platform other than the one on which the compiler is running. Examples are GCC and the .NET Framework compiler.
- the GNU Compiler Collection, which provides front ends for C (
Using popular, widely available cross-platform tools helps to ensure portability among different systems and architectures.
In case of using interpreted programming languages, portability is determined by the availability of a language interpreter above the minimal required version in the targeted platform(s).
- Examples of interpreted languages are GNU Octave, Matlab, Mathematica, Maple, Tcl, Haskell, Perl and Excel spreadsheets.
- Other interpreted languages use an intermediate representation, which combines compiling and interpreting. This is the case of Java, Python or Ruby, among others.
Indicators of Portability
It follows a list of possible portability indicators for a software-defined GNSS receiver:
Number of supported processor architectures (specify distribution and release).
- Number of supported operating systems:
- GNU/Linux: specify distributions and minimum working version.
- OS X: specify minimum working version.
- Microsoft Windows: specify minimum working version.
- Real Time Operating System (specify OS and minimum working version).
- Others (define) / None (bare metal program).
- Number of supported building toolchains:
- Use of cross-platform build system generators such as Autotools or CMake (specify minimum working version).
- Use of cross-platform build automation tools such as Make or Ninja (specify minimum working version).
- Use of cross-platform compiler(s) or language interpreter(s) (specify minimum working versions).
- Possibility to build the code with more than one build automation tool and/or compiler.
- Availability of cross-compilation toolchains.
- Provision of a cross-compilation Software Developer Kit (SDK) for developers.
- Supported SIMD technologies.
- In x86-based architectures: SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, FMA, AVX-512 family.
- In ARM architectures: NEON, AArch64 NEON.
- Support of GPU offloading (define GPU’s vendor/model).
- Through OpenCL.
- Through CUDA.
- Support of FPGA offloading (define FPGA’s vendor/model).
- Other software dependencies (define required minimal versions).
- Availability of software dependencies in the targeted platform(s).
- Minimal memory and storage requirements.