Software incompatibility
Encyclopedia
Software incompatibility is a characteristic of software components or systems
Software system
A software system is a system based on software forming part of a computer system . The term "software system" is often used as a synonym of computer program or software; is related to the application of systems theory approaches in software engineering context and are used to study large and...

 which cannot operate satisfactorily together on the same computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

, or on different computers linked by a computer network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

. They may be components or systems which are intended to operate cooperatively or independently. Software compatibility is a characteristic of software components or systems which can operate satisfactorily together on the same computer, or on different computers linked by a computer network. It is possible that some software components or systems may be compatible in one environment and incompatible in another.

Deadlocks

Consider sequential programs of the form:

Request resource
Resource (computer science)
A resource, or system resource, is any physical or virtual component of limited availability within a computer system. Every device connected to a computer system is a resource. Every internal system component is a resource...

 A
Request resource B
Perform action using A and B
Release resource B
Release resource A

A particular program
Computer program
A computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...

 might use a printer
Computer printer
In computing, a printer is a peripheral which produces a text or graphics of documents stored in electronic form, usually on physical print media such as paper or transparencies. Many printers are primarily used as local peripherals, and are attached by a printer cable or, in most new printers, a...

 (resource A) and a file
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 (resource B) in order to print the file.

If several such programs P1,P2,P3 ... operate at the same time, then the first one to execute will block
Blocking (computing)
Blocking occurs when a subroutine does not return until it either completes its task or fails with an error or exception. A process that is blocked is one that waits for some event, such as a resource becoming available or the completion of an I/O operation.In a multitasking computer system,...

 the others until the resources are released, and the programs will execute in turn. There will be no problem. It makes no difference whether a uni-processor
Uniprocessor
A uniprocessor system is a computer system with a single central processing unit. As more and more computers employ multiprocessing architectures, such as SMP and MPP, the term is used to refer to systems that still have only one CPU. Most desktop computers are now shipped with multiprocessing...

 or a multi-processor system is used, as it's the allocation of the resources which determines the order of execution.

Note, however, that programmers are, in general, not constrained to write programs in a particular way, or even if there are guidelines, then some may differ from the guidelines. A variant of the previous program may be:

Request resource B
Request resource A
Perform action using A and B
Release resource A
Release resource B

The resources A and B are the same as in the previous example – not simply dummy variables, as otherwise the programs are identical.

As before, if there are several such programs, Q1,Q2,Q3 which run at the same time using resources as before, there will be no problem.

However, if several of the Ps are set to run at the same time as several of the Qs, then a deadlock
Deadlock
A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does. It is often seen in a paradox like the "chicken or the egg"...

 condition can arise. Note that the deadlock need not arise, but may.

P: Request resource A
Q: Request resource B
Q: Request resource A (blocked by P)
P: Request resource B (blocked by Q)
...

Now neither P nor Q can proceed1.

This is one kind of example where programs may demonstrate incompatibility.

Interface incompatibility

Another example of a different kind would be where one software component provides service to another. The incompatibility could be as simple as a change in the order of parameters
Parameter (computer science)
In computer programming, a parameter is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are called arguments...

 between the software component requesting service, and the component providing the service. This would be a kind of interface
Interface (computer science)
In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software...

 incompatibility. This might be considered a bug
Software bug
A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's...

, but could be very hard to detect in some systems. Some interface incompatibilities can easily be detected during the build stage
Software build
In the field of computer software, the term software build refers either to the process of converting source code files into standalone software artifact that can be run on a computer, or the result of doing so...

, particularly for strongly typed
Data type
In computer programming, a data type is a classification identifying one of various types of data, such as floating-point, integer, or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of...

 systems, others may be hard to find and may only be detected at run time, while others may be almost impossible to detect without a detailed program analysis.

Consider the following example:

Component P calls component Q with parameters x and y. For this example, y may be an integer.

Q returns f(x) which is desired and never zero, and ignores y.

A variant of Q, Q' has similar behaviour, with the following differences:

if y = 100, then Q' does not terminate.

If P never calls Q with y set to 100, then using Q' instead is a compatible computation
Computation
Computation is defined as any type of calculation. Also defined as use of computer technology in Information processing.Computation is a process following a well-defined model understood and expressed in an algorithm, protocol, network topology, etc...

.
However if P calls Q with y set to 100, then using Q' instead will lead to a non-terminating computation.

If we assume further that f(x) has a numeric value, then component Q defined as:

Q behaves as Q except that
if y = 100 then Q does not terminate
if y = 101 then Q returns 0.9 * f(x)
if y = 102 then Q returns a random value
if y = 103 then Q returns 0.

may cause problem behaviour. If P now calls Q with = 101, then the results of the computation will be incorrect, but may not cause a program failure. If P calls Q with y = 102 then the results are unpredictable, and failure
Crash (computing)
A crash in computing is a condition where a computer or a program, either an application or part of the operating system, ceases to function properly, often exiting after encountering errors. Often the offending program may appear to freeze or hang until a crash reporting service documents...

 may arise, possibly due to divide by zero
Divide By Zero
Divide By Zero was a British video game developer. It was disestablished sometime in 1996.Divide By Zero is a BBS originally started in 1996 in Columbia SC by Keven and Eric Coots...

 or other errors such as arithmetic overflow
Arithmetic overflow
The term arithmetic overflow or simply overflow has the following meanings.# In a computer, the condition that occurs when a calculation produces a result that is greater in magnitude than that which a given register or storage location can store or represent.# In a computer, the amount by which a...

.
If P calls Q with y= 103 then in the event that P uses the result in a division operation, then a divide by zero failure may occur.

This example shows how one program P1 may be always compatible with another Q1, but that there can be constructed other programs Q1' and Q1 such that P1 and Q' are sometimes incompatible, and P1 and Q1 are always incompatible.

Performance incompatibility

Sometimes programs P and Q can be running on the same computer, and the presence of one will inhibit the performance of the other. This can particularly happen where the computer uses virtual memory
Virtual memory
In computing, virtual memory is a memory management technique developed for multitasking kernels. This technique virtualizes a computer architecture's various forms of computer data storage , allowing a program to be designed as though there is only one kind of memory, "virtual" memory, which...

. The result may be that disk thrashing occurs, and one or both programs will have significantly reduced performance. This form of incompatibility can occur if P and Q are intended to cooperate, but can also occur if P and Q are completely unrelated but just happen to run at the same time. An example might be if P is a program which produces large output files, which happen to be stored in main memory, and Q is an anti-virus program which scans many files on the hard disk. If a memory cache
Cache
In computer engineering, a cache is a component that transparently stores data so that future requests for that data can be served faster. The data that is stored within a cache might be values that have been computed earlier or duplicates of original values that are stored elsewhere...

is used for virtual memory, then it is possible for the two programs to interact adversely and the performance of each will be drastically reduced2.

For some programs P and Q their performance compatibility may depend on the environment in which they are run. They may be substantially incompatible if they are run on a computer with limited main memory, yet it may be possible to run them satisfactorily on a machine with more memory. Some programs may be performance incompatible in almost any environment.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK