World Library  
Flag as Inappropriate
Email this Article

Portability (software)

Article Id: WHEBN0014160890
Reproduction Date:

Title: Portability (software)  
Author: World Heritage Encyclopedia
Language: English
Subject: Lisp (programming language), System call, Porting, Hugs, Data dictionary, GNU Portable Threads, Trillium Digital Systems, POCO C++ Libraries
Collection:
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Portability (software)

Not to be confused with Application portability.
This article is about portability in itself. For the work required to make software portable, see Porting.

Portability in high-level computer programming is the usability of the same software in different environments. The prerequirement for portability is the generalized abstraction between the application logic and system interfaces. When software with the same functionality is produced for several computing platforms, portability is the key issue for development cost reduction.

Strategies for portability

Software portability may involve:

  • Transferring installed program files to another computer of basically the same architecture.
  • Reinstalling a program from distribution files on another computer of basically the same architecture.
  • Building executable programs for different platforms from source code; this is what is usually understood by "porting".

Similar systems

When operating systems of the same family are installed on two computers with processors with similar instruction sets it is often possible to transfer the files implementing program files between them.

In the simplest case the file or files may simply be copied from one machine to the other. However, in many case the software is installed on a computer in a way which depends upon its detailed hardware, software, and setup, with device drivers for particular devices, using installed operating system and supporting software components, and using different drives or directories.

In some cases software, usually described as "portable software" is specifically designed to run on different computers with compatible operating systems and processors without any machine-dependent installation; it is sufficient to transfer specified directories and their contents. Software installed on portable mass storage devices such as USB sticks can be used on any compatible computer on simply plugging the storage device in, and stores all configuration information on the removable device. Hardware- and software-specific information is often stored in configuration files in specified locations (the registry on machines running Microsoft Windows).

Software which is not portable in this sense will have to be transferred with modifications to support the environment on the destination machine.

Different operating systems, similar processors

When the systems in question have compatible processors (usually x86-compatible processors on desktop computers), they will execute the low-level program instructions in the same manner, but the system calls are likely to differ between different operating systems. Later operating systems of UNIX heritage, including Linux, BSD, Solaris and OS X, are able to achieve a high degree of software portability by using the POSIX standard for calling OS functions. Such POSIX-based programs can be compiled for use in Windows by means of interface software such as Cygwin.

Different processors

As of 2011 the majority of desktop and laptop computers used microprocessors compatible with the 32- and 64-bit x86 instruction sets. Smaller portable devices use processors with different and incompatible instruction sets, such as ARM. The difference between larger and smaller devices is such that detailed software operation is different; an application designed to display suitably on a large screen cannot simply be ported to a pocket-sized smartphone with a tiny screen even if the functionality is similar.

Web applications are required to be processor independent, so portability can be achieved by using web programming techniques, writing in JavaScript. Such a program can run in a common web browser, which as of 2011 can be assumed to have a Java package containing the Java virtual machine and its Java Class Library. Such web applications must, for security reasons, have limited control over the host computer, especially regarding reading and writing files. Non-web programs, installed upon a computer in the normal manner, can have more control, and yet achieve system portability by linking to the Java package. By using Java bytecode instructions instead of processor-dependent machine code, maximum software portability is achieved. Programs need not be written in Java, as compilers for several other languages can generate Java bytecode: Jruby does it from Ruby programs, Jython from Python programs, and there are several others.

Source code portability

Software can be recompiled and linked from source code for different operating systems and processors if written in a programming language supporting compilation for the platforms. This is usually a task for the program developers; typical users have neither access to the source code nor the required skills.

In open-source environments such as Linux the source code is available to all. In earlier days source code was often distributed in a standardised format, and could be built into executable code with a standard Make tool for any particular system by moderately knowledgeable users if no errors occurred during the build. Some Linux distributions distribute software to users in source form. In these cases there is usually no need for detailed adaptation of the software for the system; it is distributed in a way which modifies the compilation process to match the system.

Effort to port source code

Even with portable languages like C and C++ the effort to port source code can vary considerably. Sometimes the effort consists of recompiling the source code, but sometimes it is necessary to rewrite major parts of the software. Many language specifications describe implementation defined behaviour (e.g. right shifting a signed integer in C can do an logical or an arithmetic shift). Operating system functions or third party libraries might not be available on the target system. Some functions can be available on a target system, but exhibit slightly different behaviour (E.g.: utime() fails under Windows with EACCES, when it is called for a directory). The program code itself can also contain unportable things, like the paths of include files. Drive letters and the backslash as path delimiter are not accepted on all operating systems. Implementation defined things like byte order and the size of an int can also raise the porting effort.

See also

Sources

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.