An Efﬁcient Library for Reliability Block Diagram Evaluation

: Reliability Block Diagrams (RBDs) are widely used in reliability engineering to model how the system reliability depends on the reliability of components or subsystems. In this paper, we present librbd , a C library providing a generic, efﬁcient and open-source solution for time-dependent reliability evaluation of RBDs. The library has been developed as a part of a project for reliability evaluation of complex systems through a layered approach, combining different modeling formalisms and solution techniques at different system levels. The library achieves accuracy and efﬁciency comparable to, and mostly better than, those of other well-established tools, and it is well designed so that it can be easily used by other libraries and tools.


Introduction
Reliability is defined as "the ability of a system or component to perform its required functions under stated conditions for a specified period of time" [1]. Reliability is often expressed through the usage of probability theory, i.e., it is defined as the probability that the system has successfully performed its required functions in time interval [t 0 , t) given that it was correctly operating at time t 0 [2].
The expressive power of state-space based models is obviously greater than the one of combinatorial models. On the other hand, expressive power varies among the different combinatorial models [22].
All models that exploit both the usage of combinatorial and state-space based solutions for the quantitative evaluation are classified as hybrid models and are considered as the state-of-the-art approach to dependability evaluation [3]. Both Dynamic RBD (DRBD) [23,24] and Dynamic FT (DFT) [25][26][27] are hybrid models, since they combine CTMC [13] evaluation with, respectively, RBD [6] and FT [8] quantitative analysis. Hierarchical models, i.e., models that combine the usage of different formalisms in order to analyze the system at different levels, have been proposed in order to both exploit the benefits and to limit the drawbacks of combinatorial and state-space based models [3,28,29]. This paper is structured as follows: Section 1 presents the context and motivation for this work; Section 2 recalls the definition of RBDs and the mathematics used to evaluate them; Section 3 describes the design and optimizations of the implemented RBD computation library; Section 4 presents the materials and the methods used to obtain the results; Section 5 evaluates the performance of the RBD computation library and discusses the results; finally, Section 6 concludes the paper with some final remarks.

Context and Motivation
Our aim is to support the layered approach presented in [28,29], where RBDs are adopted to model major transitions of system structure (e.g., in a reconfiguration), while the finer modeling of the lower levels is based on STPNs and GSPNs. Our goal consists of the definition of a predictive diagnostics approach for the health assessment of complex systems. Specifically, we propose the usage of diagnostics data to estimate the reliability of basic components, leveraging the usage of a reliability hierarchical model to estimate the reliability curve of the system under analysis. By using this tuned reliability curve, we can compute the probability of system failure in a given future time interval, thus implementing a predictive diagnostics system. This approach requires a frequent evaluation of the reliability curve, hence efficient tools to evaluate it are needed.
Consider, for example, the system shown in Figure 1. The system has been subdivided into four statistically independent subsystems. The subsystems C 1 and C 2 model two identical power supplies in current sharing, C 3 is the computing subsystem, while C 4 is the acquisition subsystem. Each separate subsystem can then be modeled using an STPN/GSPN: in this example, all subsystems are modeled using GSPNs. The approach to the reliability analysis using this layered model is shown in Figure 2. The input data of this approach is the failure rate function λ(t) for each modeled component. By inserting the failure rates into the STPN/GSPN models, we can analyze the models and we obtain, for each modeled subsystem, its reliability curve. Please note that, by modifying the failure rate function λ(t) of at least one modeled component, we have an impact on its distribution of failures and, as a consequence, we produce a reliability curve of the modeled subsystem with a different shape. Furthermore, by varying both the failure rate functions and their parameters, it is possible to refine the model, hence considering the uncertainties of the model.
Finally, by feeding the reliability curves of all subsystems into the RBD model, we can analyze the whole system and we obtain its reliability curve. Please note that the input data of this second phase are the reliability curves of all subsystems obtained through the analysis of the STPN/GSPN models. Thus, we combine the strength of combinatorial approaches, i.e., their efficiency, with the one of state-space based ones, i.e., their ability to model the statistical dependence of faults.

Input data (components λ(t))
Intermediate data (subsystems R(t)) Output data (system R(t)) This hierarchical approach to the reliability evaluation can be extended to model the system-level reliability, i.e., the reliability of the whole system composed by both hardware and software. In general, hardware-related failures are statistically independent from software-related ones, i.e., software bugs [30,31]. The estimation of the number of failures in the source code is a difficult task [32]. However, in recent years, several methodologies have been developed to model and increase the software reliability [33][34][35].
The ORIS tool [36] has been adopted to support STPN and GSPN modeling. In this paper, we focus on the implementation of an efficient tool to evaluate RBD blocks.
More specifically, we looked for a tool with the following characteristics: • To be highly optimized.

•
To allow the resolution of RBD basic blocks (excluding singleton given its trivial formula).

•
To allow the reliability computation of an RBD basic block in a time interval.

•
To be available as a free software.

•
To be available for the most common Operating Systems (OS), i.e., Windows, Mac OS and Linux.
Several tools for RBD definition and analysis exist, although the majority of them are commercial tools. We provide a list of tools that were considered during our work:

•
RBDTool: this open-source and multiplatform tool allows the definition of RBD models and it provides support for their quantitative analysis [37]. • Edraw Block Diagram: this commercial tool allows the definition of RBD models [38]. • Reliability Workbench: this commercial tool allows the definition and analysis of scalable RBD models through the usage of submodels. Furthermore, it supports the minimal cut-set analysis of the RBD model [39]. • Relyence RBD: this commercial tool has features comparable with Reliability Workbench [40]. • SHARPE: the Symbolic Hierarchical Automated Reliability and Performance Evaluator (SHARPE) tool is a general hierarchical modeling tool that analyzes stochastic models of reliability, availability, performance and performability [41,42]. This tool al-lows the definition of hierarchical reliability models with several formalisms, including RBDs, and it supports the time-dependent reliability analysis.
Of all considered tools, SHARPE is the closest to all our requirements. Since no one fits completely all of them, we have implemented a custom library that provides the RBD evaluation, from now on referred as librbd. More specifically, the librbd library supports the numerical computation of the reliability curve for all RBD basic blocks, it exploits several optimizations and multithreading paradigm, and it is multiplatform. Finally, we have publicly released this open source library under the AGPL v3.0 license [43].

Reliability Block Diagrams
An RBD decomposes a system into its independent components and shows the logical connections needed for the successful operation of the system [3][4][5]44,45]. The basic assumptions of the RBD methodology are the following ones: 1.
The modeled system, as well as each component, has only two states, i.e., success and failure.

2.
The RBD represents the success state of the modeled system through the usage of success paths, i.e., the connections of the success states of its components. 3.
The system components are statistically independent. Under this assumption, the probability of failure of the block A, P(A), is not related with the probability of failure P(B) of the block B ∀ A, B such that A = B.

Basic Blocks
An RBD is built by drawing success paths between blocks composing the system. In order to correctly model an RBD, the following basic blocks are defined:

•
Singleton. This block is the simplest one and it is composed by a single component. Bridge. This block is composed by 5 components arranged as shown in Figure 3. The block state is equal to success if at least one of the four following conditions is satisfied: 1.
Components A and B are correctly operating.

2.
Components C and D are correctly operating.

3.
Components A, E and D are correctly operating.

4.
Components C, E and B are correctly operating.
An example is a network infrastructure.
A C E B D Figure 3. Layout of RBD bridge block.

Quantitative Evaluation Using RBDs
In this section, we recall the mathematical formulas used to quantitatively evaluate the probability that a block is correctly operating, i.e., its state is equal to success, by using the RBD formalism. More specifically, we firstly introduce the general formulas that can be always used; afterwards we present simplified formulas that can be used if and only if all components inside a block are equal, i.e., they have the same probability of being in success state.
Let p i be the probability that the state of the i-th component is equal to success, and let q i = 1 − p i be the probability that the state of the i-th component is equal to failure.
Since a singleton block is composed by only one component, its probability of being in success state p singleton is trivially equal to the probability of being in success state of its sole component p.

Quantitative Evaluation: General Formulas
The following general formulas can be used to quantitatively evaluate the probability that the state of an RBD block composed by N components is equal to success:

•
Series. The probability of success of the series block p series is computed as: • Parallel. The probability of failure of the parallel block q parallel is computed as: The probability of success of the parallel block p parallel is thus computed as: • K-out-of-N (KooN). In order to compute the probability of success of a KooN block, we can use one of the following approaches: 1. Let C(N, i, j) be the j-th unique combination of i out of N components correctly working. For a given couple <i, N>, the number of unique combinations is equal to the binomial coefficient ( N i ). We define path(N, i, j) as the specific realization of one of the possible system states for which i components out of N are correctly working while the other (N − i) have failed: the exact set of the working components is selected through the usage of unique combination C(N, i, j). Its probability of occurrence is: The state of a KooN block is equal to success if and only if the current system state is satisfied by one path of at least K working components. The probability of success of the KooN block can be defined as: 2.
Observe that the probability of success of a system with 0 or more components out of I in success state is equal to 1 and observe that the probability of success of a system with J or more components out of I with J > I in success state is equal to 0. A recursive approach for evaluating the probability of success of a KooN system is derived by conditioning on the state of the N-th component [3]. The N-th component can assume only two states, success with probability p N and failed with probability q N . Let us assume that the N-th component is correctly working: for a KooN system to be correctly operating, we need at least K − 1 working components out of the remaining N − 1. If, on the other hand, the N-th component is failed, we need at least K working components out of the remaining N − 1 in order to have a correctly operating KooN system. The probability of success of a KooN block can then be recursively computed as: • Bridge. In order to compute the probability of success of a bridge block, we apply the same decompositional approach used in the second set of formulas to compute the probability of success of a KooN block. Let us analyze the bridge block by conditioning the status of component E. If E is failed, the state of the block is equal to success if either A and B or C and D are correctly operating, i.e., if the parallel of two series A, B and C, D is satisfied. The probability of occurrence of this first event is equal to the probability of failure of E. On the other hand, if E is correctly operating, the state of the block is equal to success if at least one component between A and C is correctly operating and if at least one component between B and D is correctly operating, i.e., if the series of two parallel A, C and B, D is satisfied. The probability of occurrence of this second event is equal to the probability of success of E. The probability of success of a bridge block can then be computed through the formula: One could argue that the formulas to compute probability of success of series and parallel blocks are specific cases of the KooN block: series block can be treated as a NooN block, while parallel block can be treated as a 1ooN. On the other hand, the mathematical representation for the specific cases of series and parallel blocks is simpler, thus justifying the usage of two additional formulas.

Quantitative Evaluation: Identical Components' Formulas
Under the assumption of N identical components having probability of success p, the following simplified formulas can be used to evaluate the probability of success of an RBD block: • Series. By substituting p i with p in Equation (2), we can compute the simplified probability of success of the series block p series as: • Parallel. By substituting p i with p in Equation (4), we can compute the simplified probability of success of the parallel block p parallel as: • K-out-of-N (KooN). By substituting p i with p in Equations (5) and (6), we can compute the simplified probability of success of the K-out-of-N block R KooN as: • Bridge. By substituting p A to p E with p and q A to q E with q in (8), we obtain simplified probability of success of the bridge block p bridge as:

Reliability Evaluation Using RBDs
The same mathematics described in Section 2.2 can be used to analytically compute the reliability curve of a block given the reliability curves of its components. In order to perform this time-dependent analysis, it is sufficient to replace each occurrence of p x and q x in equations from Equation (2) to Equation (12) with, respectively, R x (t) and F x (t).
The statement above is trivial and it is justified as follows: recall the probabilistic definition of reliability, i.e., the probability that the state of a given system or component at a given time t is equal to success given that it was correctly operating at the initial time t 0 . We can then apply the same mathematics in Section 2.2 to quantitatively evaluate the probability that the state of an RBD block is equal to success at time t, i.e., its reliability.
The described approach can be easily adapted to those applications for which the analytical reliability curve is not needed but only samples acquired from it are sufficient. For example, the reliability curve of a system can be sampled at time instants t 0 + k · ∆t, where t 0 is the initial time, k ∈ N and ∆t is the sampling period, by sampling the reliability curves of its components and by applying the proper equations for each evaluated time instant.

RBD Computation Library-librbd
As already stated in Section 1, our aim was to develop a library with the following characteristics: • To be highly optimized; • To support the most common OSes, i.e., Windows, Mac OS and Linux; • To support the numerical computation of the reliability curve for all RBD basic blocks; • To be available as a free software.
In order to meet the third goal, librbd implements the resolution formulas for series, parallel, KooN and bridge RBD blocks over time by accepting the following parameters: • Number N of components within the block; • Number T of temporal instants to be analyzed; • Reliability values R for the modeled components over the requested time instants.
In order to meet the first two goals, several optimizations have been designed and implemented, as described in Section 3.1. Finally, in Section 3.2 we validate the results obtained using librbd by comparing the reliability curves of several blocks with the ones obtaining by using SHARPE tool.

Design
The two goals of portability and optimization tend to be in contrast. Interpreted languages, for example, are portable by nature, but they often lack performance; compiled languages, on the other hand, offer greater performance, but they are less portable when an interaction with the OS is required [46]. We decided to implement librbd in C language, at the cost of introducing small parts of conditional compilation when an interaction with the OS is needed. Furthermore, librbd is available both as a dynamic and static library.
In order to minimize numerical errors, all computations are performed using doubleprecision floating-point format (double) compliant with binary64 format [47].
Both the uncertainties and the numerical errors are due to the chosen format and, since the reliability is a real number in range [0, 1], they are limited to the maximum resolution of floating-point numbers in the same range as described in [47].
We decided to implement both formulas for RBD blocks with identical components and for RBD blocks with generic components. This choice implies doubling the Application Programming Interfaces (APIs), thus almost doubling the size of the library itself, but it allows for the achievement of higher performance in the identical case, especially for KooN blocks.

Optimizations for KooN Computation
Several optimizations have been designed and implemented for RBD KooN blocks. Two trivial optimizations, applicable to both RBD KooN blocks with generic and identical components, have been implemented. A KooN system with K = N is solved as an RBD series block, while a KooN system with K = 1 is solved as an RBD parallel block.
A major optimization, applicable to both RBD KooN blocks with generic and identical components, minimizes the number of computational steps. This optimization exploits the formula of the trivial configuration 0ooN, which is shown in Equation (13): Starting from Equation (13), we divide the outer sum into two separate sums, the first one ranging from 0 to K − 1, the second one ranging from K to N, and we substitute the contribution shown in Equation (6). Finally, we resolve for R KooN as: where F KooN is the unreliability of a KooN block, i.e., the probability of having at least N − K + 1 components failed in a block of N components. We finally observe that, when N − K > K − 1, we can compute R KooN exploiting Equation (14) decreasing the mathematical complexity.
For RBD KooN blocks with identical components, we compute and store all coefficients ( N i ) , ∀i ∈ [K, N] that will be used during the computation of the reliability for each time instant. For RBD KooN blocks with generic components, we try to compute all combinations of i out of N components with i ∈ [K, N] that are needed to compute the reliability for each time instant. The number of these combinations is equal to ∑ N i=K ( N i ).
The last optimization, which is applicable to RBD KooN blocks with generic components, is the adoption of a heuristic to decrease the computation time by using either Equation (7) or Equation (14). The number of recursion steps performed while applying Equation (7) is limited to N 2 [41]. On the other hand, the number of iterative steps performed while applying Equation (14) is limited to ∑ N i=K ( N i ), with K ≥ N/2. The chosen heuristic used to compute reliability of a KooN block with generic components is the following one: • Use Equation (7) when all the following conditions are true:

-
The OS is able to allocate the memory to store all combinations of i out of N components with i ∈ [K, N] that are needed to compute the reliability for each time instant; Use Equation (14) otherwise.
Algorithm 1, together with auxiliary functions shown in Algorithm 2, is used to compute the reliability of an RBD KooN block with generic components, while Algorithm 3 is used to compute the reliability of an RBD KooN block with identical components.

Algorithm 3: Computation of RBD KooN block with identical components.
Input: Reliability R c of each component

Symmetric Multi-Processing (SMP)
In order to further increase performance, librbd adopts the Symmetric Multi-Processing (SMP) paradigm. The external library chosen for adding SMP support is pthreads. This library implements the management of threads and is compliant with the POSIX standard OS interface [48]. This library is always available on fully and mostly POSIX-compliant OSes (e.g., Mac OS and Linux). Microsoft Windows does not offer a native support to pthreads, but it is still possible to use it through one of the following two methods: • Download pthreads-win32, a freely available library which implements a large subset of the POSIX standard threads related API for Windows [49]. After pthreads-win32 has been downloaded, it is possible to use the desired IDE and Compiler (e.g., Visual Studio). • Download and install Cygwin, a freely available environment (i.e., tools and libraries) which provides a large collection of GNU and Open Source tools, including GCC, and a substantial POSIX API functionality, including pthreads-win32 [50].
In order to fully exploit the SMP paradigm, a key point is the subdivision of the task into batches. For this particular problem, the best subdivision is to assign a subset of data, i.e., a batch, to each thread. In particular, each thread receives as input the reliability values of all components over a subset of time instants. Furthermore, librbd interrogates the OS to retrieve the total number of CPU cores and uses this number as the maximum number of threads that can be created.
The usage of the SMP paradigm adds an overhead: each time an application requests the creation of a new thread and each time a thread terminates its computation, the OS has to perform additional operations. This overhead negates the benefits of SMP when the computational task is too small. In order to mitigate this issue, several tests have been conducted to find a minimum to the batch size. This minimum has been empirically set to 10, 000 time instants.
The SMP functionality can be enabled or disabled at compile time. When SMP is not needed, i.e., when librbd is built as a Single Threaded (ST) library, it is compiled providing external compiler flag CPU_SMP defined with value 0. When SMP is needed, librbd is compiled without providing external compiler flag CPU_SMP or by defining it with a value different from 0.

Validation
To validate the developed library, we perform a comparison of librbd output with the one obtained by using SHARPE tool [41]. Two different RBD models for each RBD block have been generated, one using identical components and the other using generic components. The validation process has been carried out by using fifteen electronics components with constant failure rate validated using Telcordia SR-332 [51]: their failure rate is shown in Table 1. The eight RBD blocks modeled during the validation process are shown in Table 2. For each RBD model, we have produced an output file containing the reliability of each analyzed time instant using both librbd and SHARPE. The reliability has been formatted using scientific notation with eight decimal places. Please note that, due to the chosen numerical representation, the uncertainty of the comparison operations is limited to 1.00 × 10 −8 . The reliability curves obtained for each analyzed block are shown in Figure 4a-h. For a better graphical visualization, only the first 100,000 h are plotted for each reliability curve. The blue line represents the reliability curve obtained using librbd, while the red one uses SHARPE tool. In all the figures, the blue and red curves are overlapping, with the blue line completely hiding the red one. The visual inspection of the reliability curves obtained from the RBD models with both librbd and SHARPE tool proves the validity of the developed library.    To further strengthen the results of this validation we have computed, for each analyzed RDB model, the error function as the difference between the two reliability curves and we have computed the maximum and minimum value of this error function. The obtained minimum and maximum error are shown, for each RBD model, in Table 3. We suppose that this error is due to the different implementation of the two tools, in particular regarding the exact sequence of operations performed over floating-point numbers. From the analysis of the obtained results, we can observe that the maximum and minimum error between the two solutions is lower than the maximum uncertainty, hence it can be considered negligible.
Hence, we can conclude that librbd produces the valid result, i.e., the correct reliability curve, for each implemented RBD basic block. Table 3. Error function between librbd and SHARPE tool.

librbd Usage
This section covers the library API. As already stated, librbd provides, for each RBD basic block, two distinct interfaces, one for the case of generic components and the other one for identical components. The library exposes a single header file, "rbd.h", which provides access to the entire API.

API for Generic Components
The following interfaces are used to evaluate the reliability of RBD blocks with generic components: The capitalized and bold characters identify the following input parameters: • N: the number of components inside the block. Note that, for the bridge block, the number of components must be equal to 5. All interfaces return 0 in case of successful computation and a negative number otherwise.

API for Identical Components
The following interfaces are used to evaluate the reliability of RBD blocks with identical components: The capitalized and bold characters identify the following input parameters: • N: the number of components inside the block. Note that, for the bridge block, the number of components must be equal to 5. • K: the minimum number of components inside the block. Note that this parameter is available for KooN blocks. • T: the number of time instants over which the reliability curve is computed. • R: the reliability curves for the input components. Since this is the identical components case, this parameter underlies an array of T elements. • O: the computed reliability curve, returned as an array of T elements.
All interfaces return 0 in case of successful computation, a negative number otherwise.

Example of librbd Usage
Let us consider the system shown in Figure 1. Since components C1 and C2 are identical in parallel configuration, the reliability curve of this first block can be computed by invoking rbdParallelIdentical. Finally, the reliability of the whole system can be computed through a series block with components C3 and C4 and the reliability of the previously evaluated parallel block by invoking rbdSeriesGeneric.
Listing 1 shows the C source code used to implement and analyze the described system. The reliability curves of all components are evaluated over T = 10 time instants. The source code, through the consecutive invocation of two different librbd APIs, evaluates the reliability of the whole system. Finally, the evaluated reliability is printed to the standard output.
The C source code related to the described example and shown in Listing 1 has been compiled and executed. Its output is shown in Listing 2.

Materials and Methods
In this section, we present the materials and the methods used to evaluate the performance of librbd. In particular, in Section 4.1 we present the materials used, while in Section 4.2 we discuss the methodology adopted to evaluate the performance of librbd and to compare it with SHARPE.

Materials
The five PCs listed in Table 4 have been used in order to measure the performance of librbd [43].
Both librbd and test binaries were built using the following compiling options: • Optimization level set to the maximum level (−O3); • Target architecture set as follows: -Advanced Micro Devices X86-64 (amd64) for Intel CPUs; -ARMv6 with VFPv2 coprocessor (armv6+fp) for ARM CPU.
To compare the performance of librbd, we use SHARPE [41,42] since it is the closest tool to all our requirements. SHARPE tool is available on Windows OS only. To perform the comparison with SHARPE tool, we exploited the dual boot-able PC1. The second OS installed on this machine is Windows 7 with Cygwin GCC 7.4.0.

Methods
The evaluation of performance has been conducted through the usage of a test application instrumented in order to measure the execution time of librbd of several RDB blocks over different time instant configurations. In particular, we defined the following set of RBD models to be used during the execution time monitoring: Each RBD model has been analyzed for 50,000, 100,000 and 200,000 time instants. To further investigate the performance of KooN RBD blocks, we used the following models and we analyzed them over 100,000 time instants: • All blocks ranging from 1oo15 to 15oo15 with generic components; • All blocks ranging from 1oo15 to 15oo15 with identical components.
The chosen instrumentation method has been implemented through a succession of invocations to clock_gettime API, one immediately preceding the librbd invocation and the other one as soon as librbd returned. The usage of this API has the following advantages and drawbacks: • It returns a monotonic clock (i.e., guaranteed to be nondecreasing), which allows to measure the time spent in executing a program routine with a time resolution up to nanoseconds; • It takes into account not only user time (application time) but also system time; • It is defined by The Open Group POSIX standard [48].
In order to minimize the impact from the second point, each experiment has been repeated 15 times and, after all experiments were run, the median time of execution has been selected. We chose the median time since it minimizes the impact of the time spent by the OS which is unrelated to the RBD block analysis.
To compare the performance of librbd w.r.t. SHARPE, we define the following set of RBD models analyzed for 100,000 time instants: The comparison experiments were done for series, parallel, KooN and bridge blocks for a time interval of 200,000 time instants. The failure rate λ of each component has been chosen using the same criteria described in Section 3.2 and in Table 1.
To compare the execution time, we created a test application that uses librbd to run the aforementioned RBD models and that produces an output log file with the same formatting of SHARPE tool.

Results and Discussion: Evaluation of librbd Performance
In this section, we evaluate the performance of the librbd library. In Section 5.1 we evaluate the execution time of librbd using different computers and different RBD layouts. Finally, in Section 5.2, we compare the execution time needed to analyze the same problem by both SHARPE and librbd.

Evaluation of librbd Execution Time
The measurement experiments were performed as described in Section 4.2 and the execution time results are presented in Tables 5-14 for generic and identical components, for each of the different RBD blocks (namely, series, parallel, N/2ooN, Koo15, bridge).
As expected, for both series and parallel blocks with generic and identical components (see Tables 5-8 This result hence confirms the correctness of librbd design w.r.t. the optimization of both series and parallel blocks.          The experiments with N/2ooN blocks are used to evaluate the worst case execution time of KooN blocks (see Tables 9-10). Using the optimized computation Algorithms 1 and 2 for KooN blocks with generic components we verify that the complexity is O(N 2 · T) and that the complexity for KooN blocks with identical components computed using Algorithm 3 is O(N · T). The experiments with Koo15 blocks are used to evaluate the impact of the optimized algorithms for KooN computation with a fixed number of components (see Tables 11-12). For these experiments, we observe that the execution time is, as expected, symmetrical w.r.t. the worst case K = N/2.
The experiments performed on all KooN blocks are aligned with the foreseen complexity and hence they validate the correctness of both librbd design and optimization algorithms implemented for the most complex RBD block.
Finally, as expected, for bridge block with both generic and identical components, we observe that the computation time is linear w.r.t. the number of time intervals (see Tables 13 and 14).
In addition, for this last result, we confirm the correctness of librbd design w.r.t. the optimization of bridge blocks.
Finally, it is important to note the execution times on the different PCs. We observe that, for all Intel i7 CPUs, we have obtained comparable results. The difference between the Intel i5 CPU and the other Intel CPUs may be due to both differences in the CPU architecture and in the OS used. Finally, we observe a sensible difference between all Intel-based PCs and the ARM-based one. This may be due to several architectural differences of the two CPU architectures. The principal one could be that, while the tested ARM CPU incorporates 4 physical cores, i.e., with the number of concurrently executing threads equal to 4, the tested Intel CPUs incorporate 4 physical cores with Hyper-Threading technology, thus providing a number of concurrently executing threads ranging from 4 to 8. Nonetheless, the performed experiments show promising results also on low-power and low-cost CPUs.

Comparison with SHARPE
SHARPE provides a Graphical User Interface for specifying performance, reliability and performability models through the usage of a specification language. It then provides analysis and solution methods for the previously generated models. The analysis methods are available as a Command Line Interface executable. This tool acquires the input model through the usage of a SHARPE specification language file and produces as output a textual log file.
The comparison experiments were performed as described in Section 4.2 and the obtained results are presented in Table 15. We observe that the execution times of librbd are significantly lower than the ones obtained by using SHARPE.

Conclusions and Future Work
In this paper, we presented librbd, an open source optimized library for reliability evaluation using the RBD formalism. After the mathematical background description, we illustrated the library design and characteristics. Then, we showed its execution times on different platforms and performed a comparison with the most similar tool identified at the state-of-the-art. The good results achieved enable the usage of librbd in hierarchical approaches for reliability evaluation exploiting strengths of both combinatorial and statespace based models. In particular, the comparison experiments show that the execution time of librbd is, in general, almost 9 times faster than the one obtained using SHARPE.
These good results encourage the usage of librbd to implement a prognostics application that leverages a frequent computation of the tuned reliability curve.
Future research and advancements of librbd include the following: • Development of a tool that allows the graphical definition of RBDs and their analysis through the usage of librbd. • Development of a tool that allows the graphical definition of hierarchical models (RBDs and STPNs/GSPNs) and that integrates librbd and SIRIO library for their quantitative evaluation.

•
Usage of native Windows APIs for SMP to decrease the execution time on this OS.

•
Investigation on the performance loss experienced for KooN block with generic components. This performance loss is visible with N = 15 and it is probably due to a nonoptimized usage of the cache memory.