Software incompatibility
This article includes a improve this article by introducing more precise citations. (December 2016) ) |
This article relies largely or entirely on a single source. (March 2024) |
Software incompatibility is a characteristic of
Examples
Deadlocks
Consider sequential programs of the form:
RequestresourceA Request resource B Perform action using A and B Release resource B Release resource A
A particular
If several such programs P1,P2,P3 ... operate at the same time, then the first one to
Note, however, that
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
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 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
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. 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
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 Q1' 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
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.
See also
References
- C. M. Krishna, K. G. Shin, Real-Time Systems, McGraw-Hill, 1997