## 3 Results
### Response Time of Slave and Master Modules
#### 3.4.3 Mathematical Model with Virtual Wires and Multiprocessing
Probability of a system failure:  
\[\text{P(Failure)}=1-\text{P(TF)} \tag{10}\]  
Probability of a failure occurring in modules A, B, or C (at least one failure):  
\[\text{P(A}\cup\text{B}\cup\text{C)}=\text{P(A)}+\text{P(B)}+\text{P(C)}-\text {P(A}\cap\text{B)}-\text{P(A}\cap\text{C)}-\text{P(B}\cap\text{C)}+\text{P(A} \cap\text{B}\cap\text{C)} \tag{11}\]  
Figure 12: Comparison between response time of slave and master modules with I2C virtual wires and multiprocessing, and original slave and master modules with different workloads. Probability of a failure occurring in modules A and B:  
\[\text{P(A}\cap\text{B)}=\text{P(A)}\times\text{P(B)} \tag{12}\]  
Probability of a failure occurring in modules A and C:  
\[\text{P(A}\cap\text{C)}=\text{P(A)}\times\text{P(C)} \tag{13}\]  
Probability of a failure occurring in modules B and C:  
\[\text{P(B}\cap\text{C)}=\text{P(B)}\times\text{P(C)} \tag{14}\]  
Probability of a failure occurring in modules A and B and C:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]0  
Probability of recovery after a failure:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]1  
Probability of software fault tolerance:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]2  
Probability of code recovery after a failure in terms of the above probabilities:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]3  
Probability of the system correctly repairing the code after a failure in terms of the above probabilities:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]4  
We represent the probability of successful code recovery after a failure as P(SuccessfulRecovery). A successful recovery is when the error repair is achieved and the master module executes the slave module again without any errors. We use the following notations:  
P(Failure): Probability of a failure occurring in the system. P(A): Probability of a failure occurring in module A.  
P(B): Probability of a failure occurring in module B.  
P(C): Probability of a failure occurring in module C.  
P(RF): Probability of recovery after a failure. P(R): Probability of software fault tolerance (probability of code recovery after a failure). P(TF): Probability of software fault tolerance (complement of the failure probability). The unified equation is:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]5  
The above can also be expressed in the following manner, breaking down the probabilities:  
\[T\_improved\_master(C)=ce^{-dC}g(C) \tag{7}\]6  
This equation considers that the probability of successful recovery occurs when the failure does not happen or is minimal (\(1-P(Failure)\)), multiplied by the probability of recovery after a failure (\(P(RF)\))/\(P(Failure)\). The probability of a system failure, P(Failure), is the complement of the probability of software fault tolerance, \(P(TF)\). This is derived from the fact that if a system is not fault-tolerant, \(P(TF)=0\), the probability of failure is maximal, \(P(Failure)=1\), and vice versa. Therefore, these probabilities are complementary and their sum is 1. In practical terms, errors cannot be controlled as in the testing environment where we test the software, which is why we cannot rely on specific numbers to determine if recovery will occur. The most accurate approach is to rely on probabilities, as observed in Figure 13, where the software has the ability to work with fault tolerances ranging from 0% to 50%. This is the probability of recovery from failures. As mentioned, the probability of recovery cannot be just a fixed value like 50% since complications outside the logic of the software can arise, reducing the probability. Therefore, the overall probability of recovery while the code is running ranges from 0 to 50 percent, with the latter being the most prevalent probability. On the other hand, in the same Figure 13a, we can observe the probability of recovery from a code breakage.