Next Article in Journal
Existence and Limit Behavior of Constraint Minimizers for a Varying Non-Local Kirchhoff-Type Energy Functional
Previous Article in Journal
Strong Ergodicity in Nonhomogeneous Markov Systems with Chronological Order
Previous Article in Special Issue
On the Positive Recurrence of Finite Regenerative Stochastic Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Investigation of the Fork–Join System with Markovian Arrival Process Arrivals and Phase-Type Service Time Distribution Using Machine Learning Methods

by
Vladimir Mironovich Vishnevsky
1,*,†,
Valentina Ivanovna Klimenok
2,†,
Aleksandr Mikhailovich Sokolov
1,† and
Andrey Alekseevich Larionov
1,†
1
Institute of Control Sciences of Russian Academy of Sciences, 117997 Moscow, Russia
2
Department of Applied Mathematics and Computer Science, Belarusian State University, 220030 Minsk, Belarus
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Mathematics 2024, 12(5), 659; https://doi.org/10.3390/math12050659
Submission received: 9 November 2023 / Revised: 13 February 2024 / Accepted: 21 February 2024 / Published: 23 February 2024
(This article belongs to the Special Issue Stochastic Modeling and Applied Probability, 2nd Edition)

Abstract

:
This paper presents a study of fork–join systems. The fork–join system breaks down each customer into numerous tasks and processes them on separate servers. Once all tasks are finished, the customer is considered completed. This design enables the efficient handling of customers. The customers enter the system in a MAP flow. This helps create a more realistic and flexible representation of how customers arrive. It is important for modeling various real-life scenarios. Customers are divided into K 2 tasks and assigned to different subsystems. The number of tasks matches the number of subsystems. Each subsystem has a server that processes tasks, and a buffer that temporarily stores tasks waiting to be processed. The service time of a task by the k-th server follows a PH (phase-type) distribution with an irreducible representation ( β k , S k ), 1 k K . An analytical solution was derived for the case of K = 2 when the input MAP flow and service time follow a PH distribution. We have efficient algorithms to calculate the stationary distribution and performance characteristics of the fork–join system for this case. In general cases, this paper suggests using a combination of Monte Carlo and machine learning methods to study the performance of fork–join systems. In this paper, we present the results of our numerical experiments.

1. Introduction

Queueing systems with data partitioning and resynchronization (generally accepted as fork–join systems) are natural models of various computer and communication systems, particularly systems that perform parallel computing, customer processing in distributed databases, and parallel disk access [1,2,3,4]. The key feature of these systems is that after a customer enters the system, it is divided into a particular set of K tasks that are serviced by K parallel servers. A customer leaves the system when all subsystems complete all customer tasks. Thus, tasks corresponding to the same customer are joined before departing the system, and, accordingly, the service time of a customer corresponds to the maximum time spent in the system by one of the tasks.
In the case of infinite buffer, difficulties arise in calculating the joint stationary distribution of queue lengths, even under the most straightforward assumptions about the nature of the input flow and service times. Finding such a distribution is the subject of [5], where the case K = 2 , infinite buffer to servers, stationary Poisson flow, and exponential distributions of service times are considered. For such a system, a functional equation for the generating function of the joint distribution of queue lengths is obtained, and questions of the asymptotic behavior of joint probabilities are investigated. The results of [5] are used in [6], where a formula is derived for the mean sojourn time in the mentioned system under the simplifying assumption that the service rates on both servers are equal. In [7], the authors consider a fork–join system with two subsystems and more general time distributions between hyperexponential arrivals and the Erlang distribution of service times.
Due to the complexity of the problem of finding the sojourn time distribution in fork–join systems, in most works, the authors limit themselves to analyzing only mean sojourn time [5,6,7,8], in particular, finding upper or lower bounds for this time [9,10,11]. The overview of research in this area until 2014 can be found in [12].
Extensive applications of fork–join systems not only in computing systems and networks with parallel services but also in other industries, including the banking sector, medicine [13,14], and some others [15,16,17,18], stimulated further research in this area. The authors in [19] considered a method for calculating the stationary distribution of a fork–join system with a Markovian arrival, K 2 homogeneous servers characterized by an exponential service time distribution, and infinite buffer, which involves solving a nonlinear matrix integral equation and the truncation of the state space of the process describing the operation of the system. The main results are obtained for the case K = 2 . In [20], a fork–join system with parallel servicing of customers ( K = 2 ), Poisson input flow, and PH-distribution of service time is considered. The conditions for a stationary mode, the main characteristics of system performance, and analytical expressions for the lower and upper bounds of the mean sojourn time in the system are found. An analysis of more general cases of studying fork–join systems, particularly with an arbitrary distribution of service time, was carried out in the literature only using approximate methods [21,22,23,24]. In the articles [25,26], systems with multiple resources are explored. A distinctive feature of such systems is that tasks from the customer simultaneously occupy a random number of servers. It depends on the number of tasks in the customer. In the article [27], you can familiarize yourself with the use of neural networks for the analysis of fork–join systems and other complex problems of queuing theory (for example, [28,29]).
The previous review showed that, despite using K = 2 and making basic assumptions about the input flow and service time, a detailed analytical solution for determining the stationary characteristics of a fork–join system was not found. This article is important because it analyzes a fork–join system, considering the different assumptions about input flows and service time distribution. This research holds significant practical and theoretical value, making it truly novel and original. This work holds both practical and theoretical significance, marking a crucial advancement in the field. For the case where K = 2 , we obtained analytical expressions for the probability of losses, average queue length, and the distribution function of the response time for the first time. If  K 2 , a new method is created and used. This method combines machine learning and the Monte Carlo methods. It efficiently calculates the characteristics of a complex fork–join system on a large scale. It is particularly useful for building real systems that require effective parallel task management.
This paper considers the various architectures of fork–join systems in more general assumptions about input flow and the distribution of service times. Customers enter the system according to the Markovian arrival process (MAP). Service times have a phase distribution (PH distribution). We organized the article as follows. Section 2 presents the problem statement. Section 3 is devoted to implementing a mathematical algorithm for calculating the stationary distribution and characteristics for the particular case of a fork–join system with K = 2 with an input M A P flow and P H —service time distribution. Section 4 describes a method for solving the general problem of studying a fork–join system using simulation and machine learning methods. Section 5 presents the numerical results of the study.

2. Problem Statement

We consider a fork–join queueing system with K 2 servers in parallel (see Figure 1). Customers enter the system in a Markovian arrival process ( M A P ), which is specified by the underlying process ν t , t 0 , which is a Markov chain with the state space { 0 , 1 , , W } , and the matrices D 0 and D 1 . The non-diagonal entries of the matrix D 0 are the rates of transitions of the chain ν t , t 0 , which are not accompanied by the generation of a customer, while the entries of the matrix D 1 are the rates of transitions of the chain which are accompanied by the generation of a customer. The matrix D ( 1 ) = D 0 + D 1 represents an infinitesimal generator of the chain ν t , t 0 . The arrival rate λ is defined as λ = θ D 1 e , where θ is a vector of the stationary distribution of the process ν t , which is defined as the unique solution of the system of linear algebraic equations θ D ( 1 ) = 0 , θ e = 1 . Here and further, e is a column vector consisting of ones, and 0 is a row vector consisting of zeros. A more detailed description of the M A P can be found, for example, in [30,31].
An arriving customer entering the system forks into K tasks to be served in K independent subsystems G 1 , G 2 , , G k . The service time of a task by the k-th server has a P H (phase-type) distribution with an irreducible representation ( β k , S k ) . This means that the service process on the k-th server is managed by the Markov chain m t ( k ) , t 0 , with the state space { 1 , , M ( k ) , M ( k ) + 1 } , where the state M ( k ) + 1 is an absorbing one. The rates of transitions in the set of unessential states are given by the matrices S k and the transition rates to absorbing states are given by the vectors S 0 ( k ) = S k e . More details about the P H can be found, for example, in [31,32]. A customer that arrives when the buffer of one of the systems G i , i = 1 , 2 , , K is full leaves the system without a service (it is considered to be lost). A customer accepted into the system leaves the system as soon as all servers complete their task services. Thus, tasks corresponding to the same customer are joined before departing the system.
The main stationary characteristics of the performance of the described fork–join system are found, including the sojourn time in the system, average queue lengths, and the loss probability of customers.

3. Study of the Characteristics of a Fork–Join System with Parallel Servicing of Tasks ( K = 2 )

The analysis of this particular case is of theoretical interest, because the study of such a system under the assumption of an incoming M A P flow and a P H distribution of service time has not been previously considered in the literature. In addition, the numerical results of this section will be used to validate a simulation model that describes the functioning of the general fork–join system ( K 2 ) considered in this article.

3.1. Markov Chain Describing the Process of System Functioning

Assume that the first service device ( k = 1 ) has infinite buffer, and the capacity of the second ( k = 2 ) is limited.
At time t, let the following:
  • i t denotes the number of tasks in the subsystem G 1 , i 0 ;
  • j t denotes the number of tasks in the subsystem G 2 , j = 0 , J ¯ ;
  • ν t denotes the states of the underlying process of the M A P , v t = 0 , W ¯ ;
  • m t ( k ) denotes the states of underlying process of the P H service process on the kth server, m t ( k ) = 1 , M ( k ) ¯ ,   k = 1 , 2 .
The operation of the system is described by a regular irreducible Markov chain ξ t , t 0 , with the state space
Ω = { ( 0 , 0 , ν ) , ν = 0 , W ¯ } { ( i , 0 , ν , m ( 1 ) ) , i > 0 , ν = 0 , W ¯ , m ( 1 ) = 1 , M ( 1 ) ¯ }
{ ( 0 , j , ν , m ( 2 ) ) , j = 0 , J ¯ , ν = 0 , W ¯ , m ( 2 ) = 1 , M ( 2 ) ¯ }
{ ( i , j , ν , m ( 1 ) , m ( 2 ) ) , i > 0 , j = 1 , J ¯ , ν = 0 , W ¯ , m ( 1 ) = 1 , M ( 1 ) ¯ , m ( 2 ) = 1 , M ( 2 ) ¯ } .
Let us arrange the states of the chain ξ t in the lexicographic order and denote by Q i , i the matrix of transition rates of the chain from the states with the value i of the first component to the states with the value i of this component. We also denote by Q r the matrix that is defined as Q r = Q i , i + r 1 , i 1 , r 0 .
To proceed to writing the infinitesimal generator Q of the Markov chain ξ t , t 0 , we introduce the following notations:
  • I (O) is an identity (zero) matrix;
  • W ¯ = W + 1 ;
  • ( ) is a symbol of the Kronecker product (sum) of matrices;
  • d i a g { Z l , l = 1 , L ¯ } is a diagonal matrix with diagonal blocks Z l ;
  • d i a g { Z l , l = 0 , L ¯ } is a sub-diagonal matrix with sub-diagonal blocks Z l ;
  • d i a g + { Z l , l = 0 , L ¯ } is an over-diagonal matrix with over-diagonal blocks Z l ;
Lemma 1.
The infinitesimal generator Q of the Markov chain ξ t , t 0 , has a block tridiagonal structure
Q = Q 0 , 0 Q 0 , 1 O O O Q 1 , 0 Q 1 Q 2 O O O Q 0 Q 1 Q 2 O O O Q 0 Q 1 Q 2 ;
where non-zero blocks Q i , i have the following form:
  • Q 0 , 0 is a square matrix of size W ¯ ( 1 + J M 2 ) ,
    Q 0 , 0 = d i a g { D 0 , D 0 S 2 , D 0 S 2 , , D 0 S 2 , D ( 1 ) S 2 } +
    d i a g { I W ¯ S 0 ( 2 ) , I W ¯ S 0 ( 2 ) β 2 , I W ¯ S 0 ( 2 ) β 2 , , I W ¯ S 0 ( 2 ) β 2 } ;
  • Q 0 , 1 is a matrix of size W ¯ ( 1 + J M 2 ) × W ¯ M 1 ( 1 + J M 2 ) ,
    Q 0 , 1 = d i a g + { D 1 β 1 β 2 D 1 β 1 I M 2 , D 1 β 1 I M 2 , , D 1 β 1 I M 2 } ;
  • Q 1 , 0 is a matrix of size W ¯ M 1 ( 1 + J M 2 ) × W ¯ ( 1 + J M 2 ) ,
    Q 1 , 0 = d i a g { I W ¯ S 0 ( 1 ) , I W ¯ S 0 ( 1 ) I M 2 , I W ¯ S 0 ( 1 ) I M 2 , , I W ¯ S 0 ( 1 ) I M 2 } ;
  • Q 0 is a square matrix of size W ¯ M 1 ( 1 + J M 2 ) ,
    Q 0 = d i a g { I W ¯ S 0 ( 1 ) , I W ¯ S 0 ( 1 ) β 1 I M 2 , I W ¯ S 0 ( 1 ) β 1 I M 2 , , I W ¯ S 0 ( 1 ) β 1 I M 2 } ;
  • Q 1 is a square matrix of size W ¯ M 1 ( 1 + J M 2 ) ,
    Q 1 = d i a g { D 0 S ( 1 ) , D 0 S 1 S 2 , D 0 S 1 S 2 , , D 0 S 1 S 2 , D ( 1 ) S 1 S 2 } + d i a g { I W ¯ M 1 S 0 ( 2 ) , I W ¯ M 1 S 0 ( 2 ) β 2 , I W ¯ M 1 S 0 ( 2 ) β 2 , , I W ¯ M 1 S 0 ( 2 ) β 2 } ;
  • Q 2 is a square matrix of size W ¯ M 1 ( 1 + J M 2 ) ,
    Q 2 = d i a g + { D 1 I M 1 β 2 , D 1 I M 1 M 2 , D 1 I M 1 M 2 , , D 1 I M 1 M 2 } .
Proof. 
We represent each of the matrices Q i , i in the block form Q i , i = ( Q i , i ) j , j = 0 , J ¯ and explain the probabilistic meaning of their blocks.
The matrix Q 0 , 0 describes the rates of transitions of the Markov chain ξ t , t 0 , that do not lead to an increase in the number of tasks in the subsystems G 1 and G 2 . In this matrix ( Q 0 , 0 ) j , j = O , j > j , j < j 1 , and the others blocks are described as follows:
( Q 0 , 0 ) 0 , 0 contains the rates of transitions of the chain ξ t caused by the idle transitions of the M A P (the rates are described by the matrix D 0 );
( Q 0 , 0 ) j , j 1 , j = 1 , J ¯ , contains the rates of transitions of the chain ξ t accompanied by the end of servicing on server 2 (the rates describe the matrix I W ¯ S 0 ( 2 ) , if j = 1 , and the matrix I W ¯ S 0 ( 2 ) β 2 , if j > 1 );
( Q 0 , 0 ) j , j , j = 1 , J 1 ¯ , contains the rates of transitions of the chain ξ t , that do not lead to the arrival of a customer in the M A P or the completion of the service on server 2. Such transitions are made during idle transitions of the underlying process M A P or the underlying process of the service on server 2 (the rates are described by the matrix D 0 S 2 );
( Q 0 , 0 ) J , J contains the rates of transitions of the chain ξ t that are caused by a change in the state of the underlying process of the M A P (accompanied or not accompanied by the arrival of a customer) or idle transitions of the underlying process of the P H service on server 2 (the rates are described by the matrix D ( 1 ) S 2 );
The matrix Q 0 , 1 = ( Q 0 , 1 ) j , j = 0 , J ¯ describes the rates of transitions of the Markov chain ξ t which entail the arrival of a customer in the M A P . It has a block over-diagonal structure, where, for  j = 0 , the over-diagonal blocks describe the transitions of the underlying process of the M A P accompanied by the establishment of the initial phase of the service processes on the first and on the second servers (the matrix D 1 β 1 β 2 ) ) or, for  0 < j < J , transitions of the underlying process of the M A P accompanied by the establishment of the initial phase of the service process on the first server and an increase in the queue in the system G 2 by one (the matrix D 1 β 1 I M 2 ).
The matrix Q 1 , 0 describes the rates of transitions of the Markov chain ξ t that lead to the completion of the service on the second server ((the rates are described by the matrix I W ¯ S 0 ( 1 ) , if j = 1 , and by the matrix I W ¯ S 0 ( 1 ) β 1 I M 2 , if j > 1 );
The blocks Q 0 , Q 1 , Q 2 of the generator are described similarly to the blocks Q 1 , 0 , Q 0 , 0 , Q 0 , 1 but taking into account the fact that, at the time of the chain transition, the system G 1 is not empty.    □
Corollary 1.
The process ξ t , t 0 , belongs to the class of quasi- birth-and-death ( Q B D ) processes. Proof of the corollary follows from the structure of the infinitesimal generator and the definition of a quasi- birth-and-death process given in [32].

3.2. Ergodicity Condition

The criterion for the existence of a stationary regime in the system under consideration coincides with the necessary and sufficient condition for the ergodicity of the Markov chain ξ t , t 0 . This condition is defined in the following theorem.
Theorem 1.
The necessary and sufficient condition for the ergodicity of the Markov chain ξ t , t 0 , is the fulfillment of the inequality
λ ( 1 y J e ) < μ 1 ,
where
y J = ( λ μ 2 ) J / J ! j = 0 J ( λ μ 2 ) j / j ! .
Proof. 
According to [33], a necessary and sufficient condition for ergodicity is the fulfillment of the inequality
x Q 2 e < x Q 0 e ,
where the stochastic vector x is a solution to a system of linear algebraic equations
x ( Q 0 + Q 1 + Q 2 ) = 0 ,
x e = 1 .
Let us represent the vector x in the form x = ( x 0 , x 1 , , x J ) , where the vector x 0 has order an of W ¯ M 1 and vectors x j , j = 1 , J ¯ have orders W ¯ M 1 M 2 . Then, taking into account the expressions for the blocks Q 0 , Q 1 , Q 2 , specified in Lemma 1, the system (4) will be written as
x 0 A 0 + x 1 ( I W ¯ M 1 S 0 ( 2 ) ) = 0
x j 1 ( D 1 I M 1 β 2 ) + x j A + x j + 1 ( I W ¯ M 1 S 0 ( 2 ) β 2 ) = 0 , j = 1 , J 1 ¯ ,
x J 1 ( D 1 I M 1 β 2 ) + x J ( A + D 1 I M 1 M 2 ) = 0 ,
where
A 0 = I W ¯ ( S 1 + S 0 ( 1 ) β 1 ) + D 0 I M 1 ,
A = I W ¯ ( S 1 + S 0 ( 1 ) β 1 ) I M 2 + D 0 I M 1 M 2 + I W ¯ M 1 S 2 .
Let us now represent the vectors x j in the form x 0 = θ y 0 , x j = θ y j δ 2 , j = 1 , J ¯ , where θ is the stationary vector of M A P , δ 2 is a stationary vector P H 2 , i.e., is the only solution to the system δ 2 ( S 2 + S 0 ( 2 ) β 2 ) = 0 , δ 2 e = 1 , and vectors y j of order M 1 satisfy the normalization equation j = 0 J y j e = 1 . We use these expressions in the equations of system (5), having previously multiplied the first equation by e W ¯ I M 1 , and each of the subsequent equations on e W ¯ I M 1 e M 2 .
Taking into account the relations θ e = 1 , θ D 0 e = θ D 1 e = λ , μ 2 = δ 2 S 0 ( 2 ) , we reduce system (5) to the following system for vectors y j :
y 0 [ λ I M 1 + S 1 + S 0 ( 1 ) β 1 ] + y 1 μ 2 = 0
y j 1 λ I M 1 + y j [ ( S 1 + S 0 ( 1 ) β 1 ) λ I M 1 μ 2 I M 1 ] + y j + 1 μ 2 = 0 , j = 1 , J 1 ¯ ,
y J 1 λ + y J [ ( S 1 + S 0 ( 1 ) β 1 ) μ 2 I M 1 ] = 0 .
Next, we multiply the equations of system (6) on the right by e M 1 . As a result, we are convinced that the probabilities y j e , j = 0 , J ¯ , satisfy the system of equilibrium equations for the process of death and reproduction with death rates μ 2 and reproduction rates λ . Having added the normalization equation, we come to the conclusion that the probability y J e present on the left side of (8) has the form (2).
Now, consider inequality (3), which specifies the ergodicity condition. Our goal in this inequality is to move from vectors x j to vectors y j , whose order is W ¯ M 2 times smaller, and to simplify this inequality as much as possible.
We use the representation x j = θ y j δ 2 and substitute the vectors x j , in this form, into the inequality (3). Then, taking into account the form of the blocks Q 0 , Q 2 of the generator specified in Lemma 1, we reduce inequality (3) to the form
j = 0 J 1 θ D 1 e y j e < j = 0 J y j S 0 ( 1 ) .
Taking into account the relations θ D 1 e = λ , j = 0 J 1 y j e = 1 y J e , j = 0 J y j = δ 1 , μ 1 = δ 1 S 0 ( 1 ) , let us transform inequality (7) into the form
λ ( 1 y J e ) < μ 1 .
Then, taking into account the notation y J = y J e , inequality (8) is reduced to form (1).    □
Remark 1.
The left-hand side of inequality (1) is a rate of the flow of customers accepted into the system, and the right-hand side is a rate of the output flow from the first server (serving an infinite buffer) under overload conditions. It is clear that, for the existence of a stationary regime in the system, it is necessary and sufficient that the first of the mentioned rates is less than the second one. Inequality (1) can be rewritten in terms of the system load factor, ρ ,
ρ = λ ( 1 y J ) μ 1 < 1 .

3.3. Stationary Distribution and Performance Measures

Denote by p i , i 0 the vectors of the stationary probabilities of the Markov chain ξ t , t 0 , corresponding to the state i of the first component. To find these vectors, we use a special algorithm for calculating the stationary distribution of a quasi-birth-and-death process [32,33].
Formulas for calculating stationary probability vectors are as follows (Algortihm 1):
Algorithm 1 Formulas for calculating stationary probability vectors.
p i = p 1 R i 1 , i 1 ,
where the matrix R is the minimal non-negative solution of the matrix equation
R 2 Q 0 + R Q 1 + Q 2 = O ,
and vectors p 0 and p 1 are the only solutions to the following system of linear algebraic equations
p 0 Q 0 , 0 + p 1 Q 1 , 0 = 0 ,
p 0 Q 0 , 1 + p 1 ( Q 1 + R Q 0 ) = 0 ,
p 0 e + p 1 ( I R ) 1 e = 1 .
Having calculated the stationary distribution p i , i 0 , we can calculate a number of performance measures of the system under consideration.
  • Joint distribution of the number of tasks in the subsystems G 1 and G 2
    p 0 , 0 = p 0 e W ¯ 0 J W ¯ M 2 T . p 0 , j = p 0 0 W ¯ [ 1 + ( j 1 ) M 2 ] T e W ¯ M 2 0 W ¯ ( J j ) M 2 T , i = 0 , j = 1 , J ¯ .
    p i , 0 = p i e W ¯ M 1 0 J W ¯ M 1 M 2 T , i > 0 . p i , j = p i 0 W ¯ M 1 [ 1 + ( j 1 ) M 2 ] T e W ¯ M 1 M 2 0 W ¯ ( J j ) M 1 M 2 T , i > 0 , j = 1 , J ¯ .
  • Stationary distribution of the number of tasks in the subsystem G 1
    p i = p i e , i 0 .
  • Average number of tasks in the subsystem G 1
    L 1 = i = 1 i p i .
  • Variance of the number of tasks in the subsystem G 1
    D 1 = i = 1 i 2 p i L 2 .
  • Stationary distribution of the number of tasks in the subsystem G 2
    q j = i = 0 p i , j .
  • Average number of customers in the subsystem G 2 .
    L 2 = j = 1 J j q j .
  • Row vector of joint probabilities that the subsystem G 1 is empty and the M A P is in the state ν , ν = 0 , W ¯ ,
    κ 0 = p 0 I W ¯ I W ¯ e J M 2 .
  • Row vector of joint probabilities that there are j > 0 tasks in the subsystem G 1 , the  M A P is in the state ν , and the service process on server 1 is in the state m 1 , ν = 0 , W ¯ , m 1 = 1 , M 1 ¯ ,
    κ i = p i I W ¯ M 1 I W ¯ M 1 e J M 2 , i > 0 .
  • Row vector of joint probabilities that the usbsystem G 2 is empty and the M A P is in the state ν , ν = 0 , W ¯
    γ 0 = p 0 I W ¯ O W ¯ J M 2 × W ¯ + i = 1 p i I W ¯ e M 1 O W ¯ J M 1 M 2 × W ¯ .
  • Row vector of joint probabilities that there are j > 0 tasks in the subsystem G 2 , the  M A P is in the state ν , and the service process on server 2 is in the state m 2 , ν = 0 , W ¯ , m 2 = 1 , M 2 ¯ ,
    γ j = p 0 O W ¯ × W ¯ M 2 O W ¯ ( j 1 ) M 2 × W ¯ M 2 I W ¯ M 2 O W ¯ ( J j ) M 2 × W ¯ M 2 + i = 1 p i O W ¯ M 1 × W ¯ M 2 O W ¯ ( j 1 ) M 1 M 2 × W ¯ M 2 I W ¯ e M 1 I M 2 O W ¯ ( J j ) M 1 M 2 × W ¯ M 2 , j = 1 , J ¯ .
  • Loss probability
    P l o s s = 1 λ γ J ( D 1 I M 2 ) e .

3.4. Sojourn Time of Tasks in the Subsystems G 1 and G 2

Denote by V k ( t ) the stationary distribution function of the sojourn time of a task accepted into the usbsystem G k and by v k ( u ) = t = 0 e u t d V k ( t ) , R e u 0 , the Laplace–Stieltjes transform of this distribution function, k = 1 , 2 . Using the probabilistic interpretation of the Laplace–Stieltjes transform and the total probability formula, we can write the following expressions for the functions v 1 ( u ) and v 2 ( u ) .
v 1 ( u ) = 1 λ κ 0 D 1 e χ 1 ( u ) + i = 1 κ i ( D 1 e I M 1 ) ( u I S 1 ) 1 S 0 ( 1 ) [ χ 1 ( u ) ] i , R e u 0 .
v 2 ( u ) = 1 λ γ 0 D 1 e χ 2 ( u ) + j = 1 J 1 γ j ( D 1 e I M 2 ) ( u I S 2 ) 1 S 0 ( 2 ) [ χ 2 ( u ) ] j , R e u 0 .
The average value v ¯ k of the sojourn time of a customer accepted into the subsystem G k is calculated by the well-known formula v ¯ k = v 1 ( u ) d u | u = 0 . After differentiation, we obtain the following expressions for v ¯ k , k = 1 , 2 :
v ¯ 1 = 1 λ [ κ 0 + i = 1 i κ i ( I W ¯ e M 1 ) ] D 1 e b 1 i = 1 κ i ( D 1 S 1 1 ) e ,
v ¯ 2 = 1 λ [ γ 0 + j = 1 J 1 j γ j ( I W ¯ e M 2 ) ] D 1 e b 2 j = 1 J 1 γ j ( D 1 S 2 1 ) e .
Also note that any initial moment of the sojourn time of order l > 0 for the subsystem G k can be calculated by the formula
v ¯ k ( l ) = ( 1 ) l d v k l ( u ) d u l | u = 0 , k = 1 , 2 , l > 0 .

3.5. Sojourn Time of a Customer in the System

In this section, we consider the average sojourn time of a customer in the system from the moment it arrives to the moment when tasks corresponding to the same customer are joined before departing the system. Denote this average as V ¯ . Below, we derive the lower and upper bounds for V ¯ . In doing so, we take into account the following considerations.
(1). The average V ¯ is not less than the average value of the maximum service times, V ¯ m a x , s e r v i c e ( G 1 , G 2 ) , of tasks belonging to the same customer.
(2). The average V ¯ is not greater than the average value of the maximum sojourn times of tasks belonging to the same customer, V ¯ m a x , s o j o u r n ( G 1 , G 2 ) , if we assume that the subsystems G 1 and G 2 are independent.
(3). The average sojourn time in the subsystem G 2 , V ¯ ( G 2 ) , is not greater than the average sojourn time in the similar subsystem G ^ 2 having an infinite buffer, V ¯ ( G ^ 2 ) .
(4). The average sojourn time in the subsystem G 1 where the original M A P is thinned out due to the finite buffer in the subsystem G 2 , V ¯ ( G 1 ) is no more than the average sojourn time in the similar subsystem G ^ 1 with an infinite buffer and the original M A P .
From point 1, it follows that
V ¯ V ¯ m a x , s e r v i c e ( G 1 , G 2 ) .
Let us calculate the right-hand side of inequality (10).
Let ζ k be a random variable equal to the service time on the first server, k = 1 , 2 . Then, the average V ¯ m a x , s e r v i c e ( G 1 , G 2 ) is equal to the average value of the random variable ζ = m a x { ζ 1 , ζ 2 } . Taking into account that the service times on the servers of subsystems G 1 and G 2 are independent random variables, it is easy to see that the distribution function Φ ( t ) of the random variable ζ is found as Φ ( t ) = P r ( ζ < t ) = P r ( ζ 1 < t , ζ 2 < t ) = ( 1 β 1 e S 1 t e ) ( 1 β 2 e S 2 t e ) . Let us now calculate the mean value of the random variable ζ .
V ¯ m a x , s e r v i c e ( G 1 , G 2 ) = 0 t d Φ ( t ) =
0 t d [ ( 1 β 1 e S 1 t e ) ( 1 β 2 e S 2 t e ) ] =
= t t [ β 1 S 1 e S 1 t e ( 1 β 2 e S 2 t e ) + ( 1 β 1 e S 1 t e ) β 2 S 2 e S 2 t e ] =
= 0 t β 1 S 1 e S 1 t e + 0 t β 1 S 1 e S 1 t e β 2 e S 2 t e ) 0 t β 2 S 2 e S 2 t e + 0 t β 1 e S 1 t e β 2 S 2 e S 2 t e =
= 0 t β 1 S 1 e S 1 t e + 0 t β 1 S 1 e S 1 t e β 2 e S 2 t e ) 0 t β 2 S 2 e S 2 t e + 0 t β 1 e S 1 t e β 2 S 2 e S 2 t e ) =
{ 0 t β 1 S 1 e S 1 t e β 2 e S 2 t e ) = 0 t β 1 S 1 e S 1 t e β 2 e S 2 t e ) = ( β 1 β 2 ) ( S 1 I M 2 ) 0 t e ( S 1 S 2 ) t d t e =
= ( β 1 β 1 ) ( S 1 I M 2 ) ( S 1 S 2 ) 2 e = ( β 1 S 1 β 2 ) ( S 1 S 2 ) 2 e } =
= [ β 1 ( S 1 ) 1 + β 2 ( S 2 ) 1 + ( β 1 S 1 β 2 ) ( S 1 S 2 ) 2 + ( β 1 β 2 S 2 ) ( S 1 S 2 ) 2 ] e .
Furthermore, from points 2–4, the following inequalities follow
V ¯ V ¯ m a x , s o j o u r n ( G 1 , G 2 ) V ¯ m a x , s o j o u r n ( G ^ 1 , G ^ 2 ) .
The systems G ^ 1 , G ^ 2 introduced above are M A P / P H / 1 systems that differ only in the parameters of the service time distribution. The distribution of the service time in the system G ^ k is described by an irreducible representation ( β k , S k ) , k = 1 , 2 . Let us find an upper bound, V ¯ m a x , s o j o u r n ( G ^ 1 , G ^ 2 ) , of the desired average, V ¯ , as the average of the maximum of sojourn times in the systems G ^ 1 and G ^ 2 . It is known, as can be seen in [33], that the sojourn time in the system M A P / P H / 1 has a P H distribution. Denote the irreducible representation of this distribution for the system G ^ k as ( τ k , T k ) , k = 1 , 2 . To calculate the upper bound V ¯ m a x , s o j o u r n ( G ^ 1 , G ^ 2 ) , we will use the proof similar to that for formula (12). As a result, we obtain the following relations:
V ¯ m a x , s o j o u r n ( G ^ 1 , G ^ 2 ) = 0 t d ( 1 τ 1 e T 1 t e ) ( 1 τ 2 e T 2 t e ) =
= [ τ 1 ( T 1 ) 1 + τ 2 ( T 2 ) 1 + ( τ 1 T 1 τ 2 ) ( T 1 T 2 ) 2 + ( τ 1 τ 2 T 2 ) ( T 1 T 2 ) 2 ] e .
Next, it is necessary to obtain expressions for the parameters τ k , T k , k = 1 , 2 , of the sojourn time distributions in the systems G ^ 1 and G ^ 2 . These expressions were obtained in [33] and will be given below for the convenience of the reader. Since all further results on finding the sojourn time are valid for any system M A P / P H / 1 , including the systems G ^ 1 and G ^ 2 , in order to avoid cumbersome expressions, we will omit the index k in the notation β k , S k , τ k , T k . That is, we will consider the distribution of the sojourn time in the M A P / P H / 1 system with M A P given by the matrices D 0 , D 1 and P H , and the service time distribution given by the Mth-order representation ( β , S ) .
According to [33], when deriving expressions for the parameters τ , T , the blocks of the Markov chain generator describing the operation of the system M A P / P H / 1 are used. This generator looks like
A = A 0 , 0 A 2 O O A 0 A 1 A 2 O O A 0 A 1 A 2 ,
where
A 0 , 0 = D 0 I M , A 0 = D 1 I M , A 1 = D 0 S , A 2 = I W ¯ ( S 0 β ) .
Denote by π i , i 0 , the vectors of the stationary distribution of the system states at an arbitrary time. The vectors π i , i 0 , are calculated using an algorithm similar to Algorithm 1 with minimal changes. For the convenience of the reader, we present this algorithm below (Algorithm 2).
Algorithm 2 The vectors of the stationary state probabilities of the M A P / P H / 1 system.
π i = π 0 R i , i 0 ,
where the matrix R is the minimal non-negative solution of the matrix equation
R 2 A 0 + R A 1 + A 2 = O ,
and the vector π 0 is the unique solution of the following system of linear algebraic equations
π 0 ( A 0 , 0 + R A 0 ) = 0 , π 0 ( I R ) 1 e = 1 .
Next, we use the results of [33] for the sojourn time in the queueing system, the operation of which is described by the general Q B D process. According to these results, the indicated sojourn time has a P H distribution, the parameters of which are defined in [33]. In our case, we modify these results to the case of the M A P / P H / 1 system, which is a special case of the system considered in [33]. Taking into account this difference, we derive the following statement.
Statement 1.
The sojourn time in the system M A P / P H / 1 under consideration has a P H distribution with an irreducible representation ( τ , T ) , where the row vector τ and the square matrix T have orders ( W ¯ M ) 2 and are calculated by the following formulas:
τ = ζ T ( I W ¯ M Δ ^ ) , T = ( A 1 + A 2 ) I W ¯ M + A 0 Δ ^ 1 R ^ T Δ ^ ,
where
ζ = ζ 1 ζ 2 ζ 3 ζ W ¯ M ,
ζ l is a column vector of order W ¯ M whose lth entry is equal to one and the remaining entries are equal to zero, Δ ^ -diagonal matrix of order W ¯ M , whose diagonal entries are equal to the corresponding entries of the vector
η ^ = { π 0 A 2 [ I + ( A 1 + R A 0 ) 1 A 2 ] 1 e } 1 π 0 A 2 ( I R ^ ) 1 ,
where the matrix R ^ is calculated as
R ^ = ( A 1 + R A 0 ) 1 A 2 .
Corollary 2.
The upper bound V ¯ m a x , s o j o u r n ( G ^ 1 , G ^ 2 ) is calculated by formula (13), where the vectors τ k and the matrices T k , k = 1 , 2 , are defined by formulas (14)–(17) in which all occurring notations (except W ¯ ) are provided with the index k.
Thus, it follows from formulas (10)–(13) that the lower and upper bounds for mean sojourn time, V ¯ , in the fork–join queue under consideration are defined from the following inequalities:
[ β 1 ( S 1 ) 1 + β 2 ( S 2 ) 1 + ( β 1 S 1 β 2 ) ( S 1 S 2 ) 2 + ( β 1 β 2 S 2 ) ( S 1 S 2 ) 2 ] e
V ¯
[ τ 1 ( T 1 ) 1 + τ 2 ( T 2 ) 1 + ( τ 1 T 1 τ 2 ) ( T 1 T 2 ) 2 + ( τ 1 τ 2 T 2 ) ( T 1 T 2 ) 2 ] e ,
where the vectors τ k and the matrices T k , k = 1 , 2 , are defined by Statement 1 and Corollary 2.

4. Study of General Fork–Join Systems

In the previous section, we obtained the analytical solution only when the customer consisted of two tasks. It is a complex problem to obtain a similar solution for the general case K > 2 even with the most straightforward assumptions about the incoming flow of customers and the distribution of the task’s service time (the Poisson incoming flow and exponential service time). Such a solution and the corresponding algorithms and programs for finding numerical results are necessary for using the fork–join model of systems for practical applications.
The Monte Carlo method takes several seconds to several minutes to calculate the performance characteristics of the fork–join system depending on the input parameters and the required accuracy. This method has proven itself well when solving a direct problem, i.e., when all the system’s characteristics are known, and it is necessary to find the performance characteristics of the system. In system design problems in which the inverse problem is solved, to select a system based on initial performance characteristics and find optimal characteristics for it, it is necessary to go through many different options, using, for example, the branch and bound method. Using the Monte Carlo method in this case can take significant time and computational resources. In order to accelerate the production of results and find quick performance estimates, in this article, we suggest a combined approach based on the Monte Carlo method and machine learning (ML) to find the performance characteristics of a general fork–join system.
Figure 2 shows a diagram using the combined method. Within the framework of this scheme, at the first stage, an algorithm and software package is implemented in Python to obtain numerical results for assessing the performance characteristics of the fork–join system ( K = 2 ), the description of which is given in Section 3. We used these numerical results to validate the simulation model for a fork–join system of general form ( K 2 ) developed at the second stage. We used the open source library Pyqumo when we developed the simulation model (Monte Carlo method). The library is available at the link https://github.com/ipu69/pyqumo (accessed on 8 November 2023). After that, we generated synthetic data for training ML algorithms.
The following section will provide a detailed description of the implementation of the Monte Carlo method and the use of ML algorithms to predict the performance of a general fork–join system.

4.1. Description of Simulation Model of a General Type Fork–Join System

The discrete-event model allows us to obtain accurate results by modeling many events. There are events such as the generation of new customer, the processing of task, and the servicing and joining of tasks. All events are in a priority queue and sorted by the event’s time. Thus, time in the model changes in jumps. After the occurrence of an event, the time inside the model will change to the time of the next event.
The selection of the next event and the generation of the subsequent one is carried out until the required accuracy is achieved or the required number of customers is generated. Sometimes, a time limit is set for executing the simulation model. The algorithm for executing the simulation model (the Monte Carlo method) is shown in Figure 3.
The input parameters for the simulation model are as follows:
  • M A P , which is specified by the matrices D 0 and D 1 ;
  • An array of P H k distributions, each of which consists of both the S k and β k matrices, the size of array equals to subsystems number;
  • An array of buffer sizes R k for each server, the size of array equals to subsystems number.
To validate the simulation model, we used the implementation of the analytical model of Section 3 and compared the results of their execution.

4.2. Description of the Machine Learning Model

In this section, we describe machine learning methods to predict various characteristics of a fork–join system. We built models to estimate the system response time and the probability of losing a customer.
The main problem when using ML models to predict the performance of a fork–join system is the parameterization of the distributions. As noted in the article, M A P and P H distributions have a matrix representation. In addition, to specify systems, it is necessary to specify the P H distribution for each service. To parameterize M A P , we used the following parameters: intensity ( λ a ), coefficient of distribution asymmetry ( γ a ), coefficient of variation ( c v a ), and distribution lag (l). Next, we used the M A P recovery algorithm described in [34]. A similar algorithm was used to restore P H on each server. To restore the P H distributions, It is necessary to know the following parameters: intensity ( λ s ), coefficient of variation ( c v s ), and asymmetry coefficient ( γ s ). A similar method is used for recovery [34,35]. When parameterizing the K distributions in the model, we added several restrictions:
  • All P H distributions have the same c v s and γ s ;
  • The buffer capacity of all subsystems is the same;
  • To set the intensity of distributions, two schemes are used: in the first, λ s m a x and λ s m i n are specified, and the dependence λ ( i ) is restored using 2 points, where i is the index of server, λ ( 1 ) = λ s m i n , and λ ( K ) = λ s m a x , the remaining values i = 2 , , K 1 are calculated from the resulting equation. In the second case, λ s m a x and λ s m i n are also generated. The share of slow servers is also generated, whose intensity is equal to λ s m i n , and the remaining servers have an intensity of λ s m a x , respectively.
Thus, the features when training ML algorithms were as follows:
  • λ a —intensity of the M A P ;
  • c v a —coefficient of variation of M A P ;
  • γ a —coefficient of asymmetry of M A P ;
  • l a M A P distributions lag;
  • c v s —coefficient of variation of P H distribution;
  • γ s —coefficient of asymmetry of P H distribution;
  • λ s m i n —minimum intensity of P H distribution;
  • λ s m a x —maximum intensity of P H distribution;
  • K—the number of tasks that the customer contains, and the number of subsystems;
  • R—buffer capacity for servers;
  • N—number of slow servers ( 0 N K ).
Figure 4 shows the complete data preparation cycle for training ML models. In the first stage, a dataset is generated; the intervals for each characteristic are given in Table 1. To transfer the parameters to the simulation model, M A P and P H distributions are restored. After restoring the distributions, we calculated characteristics using the Monte Carlo method.

5. Results of Numerical Research

This section presents numerical results obtained during the study of fork–join systems. At the beginning, we present the results of the validation of the simulation model using an analytical solution for K = 2 . We also present the time it takes to find stationary characteristics of the system depending on the parameters: buffer size, order of the input M A P flow, orders of distributions P H 1 , and P H 2 . The remainder describes the results obtained using the combined method to predict the probability of loss and system sojourn time.
The analytical model was implemented in Python language using the Numpy library. The ML algorithms were trained in Jupyter-Lab. We used scikit-learn and PyTorch libraries. The research results are available at https://github.com/ipu69/queues-fork-join (accessed on 8 November 2023).

5.1. Validation of Monte Carlo Method Implementation

As noted in the previous section, the implementation of the analytical calculation of a particular case of the fork–join system for K = 2 was used to validate the implementation of the Monte Carlo method for calculating the characteristics of an arbitrary system. A feature of the calculation of the analytical model is the significant time required to calculate the characteristics.
Figure 5 shows the dependence of the time of calculating characteristics analytically depending on various system parameters: M A P size, P H size, and buffer size. The dependence on the size of M A P and P H is power-law, and on the buffer size, it is linear. This is due to the dependence of the block sizes Q i , j on the matrices D 0 , 1 , S 1 , 2 and the dependence of the number of blocks on the parameter J in the analytical model.
Figure 6 shows the results of comparing the calculations of the characteristics of the fork–join system for the case K = 2 using the analytical method and the Monte Carlo method. According to the validation results, the error in calculating characteristics using the Monte Carlo method was about 1 % . One of the advantages of calculating characteristics using the Monte Carlo method is that the time for calculation almost does not depend on input parameters. The calculation time does not depend on the size of M A P and P H , but depends only on the number of simulated customers and the accuracy of the calculation. Figure 7 shows the dependence of the execution time of the simulation model on the number of generated customers.

5.2. Predicting Customer Sojourn Time Using ML Algorithms

In this problem, using the fork–join system parameters, we trained classical ML [36,37] algorithms and a neural network to predict the sojourn time of the fork–join system for the case when a linear function approximates the tasks P H intensities at the servers. We generated a synthetic dataset consisting of approximately 150 thousand records. In the experiment, we used classical algorithms on trees—decision trees [36] and gradient boosting [37]—as well as a neural network. During training, the dataset was divided into 80 % for training, 15 % for testing, and 5 % for validation.
Figure 8 shows scatterplots for various methods. The best result in terms of metrics was shown by gradient boosting. The maximum subtree depth in the gradient boosting algorithm was equal to 10, and the number of trees was equal to 1200.
The neural network for the regression problem contained one input layer and one hidden layer. The hidden layer consisted of 128 neurons. The input layer used L e a k y R e L u as the activation function, and the hidden layer used R e L u . We used m s e as the loss function and Adam’s algorithm [38] as the optimization algorithm. Absolute errors for ML algorithms are shown in Figure 9.
The validation used a dataset in which all parameters were fixed and others varied. The values by which the dependence of the system sojourn time was plotted with other fixed parameters: the intensity of the M A P flow, the buffer size, as well as the number of serving devices or the number of requests in the application. The following fixed system parameters were used during validation: λ a = 5   λ s m i n = 20 , λ s m a x = 20 , K = 4 , R = 14 , c v a = 4 , c v s = 0.9 , γ a = 20 , l a = 0.5 , γ a = 60 . When validating the intensity M A P , parameter λ a varied from 5 to 50. When constructing the sojourn time dependence, the buffer size varied from 2 to 18 with a step of 2. Accordingly, when constructing the dependence on the number of servers, which is the same as the number of requests in the customer, parameter N varied from 4 to 14.
Figure 10 shows the results of a comparison of the sojourn time calculations using ML algorithms and using the Monte Carlo method. It is worth noting that the trained algorithms demonstrated relatively high accuracy rates. Table 2 shows a comparison of metrics for algorithms. Gradient boosting and neural network show approximately the same results.
Table 3 shows the sojourn time calculation times using the Monte Carlo method and using various ML algorithms. ML algorithms provide a speed of calculation time of approximately 10 4 times, which gives a significant gain when designing natural technical systems. For example, to design a fork–join system, it is necessary to solve the problem using the branch-and-bound method to find optimal parameters. When using the Monte Carlo method to solve problems of this kind, finding the optimal solution can take much time. The use of ML algorithms reduces the time required to find a solution.

5.3. Predicting the Loss Probability of a Customer Using ML Methods

During this experiment, the accuracy of predicting the loss probability in a fork–join system was studied in function of the speed of service, and servers were divided into slow and fast. For training, we used a synthetic dataset generated using the Monte Carlo method, consisting of approximately 100 thousand rows. This experiment also used classical tree algorithms and a neural network. As noted in the previous section, one of the features was the number of slow servers.
The scatterplot is shown in Figure 11. As well as for predicting the system sojourn time, the gradient boosting algorithm showed the best results. The optimal hyperparameters for classical algorithms were found using the sklearn library. Thus, for a decision tree, the optimal maximum depth is 12; and the mse function is selected as a criterion. For gradient boosting, the optimal depth equals 8, the number of weak classifiers is 1000, and we used mse as the error function. Metric values for regression models are shown in Table 4.
Several charts are presented comparing the calculation of characteristics using the Monte Carlo method and the results of predicting the values of ML algorithms. Figure 12 shows the dependence of loss probability on the intensity of the input customers flow, the number of slow servers in the system, and the intensity of slow server servicing. The rest remained constant when examining the dependence of the probability of loss on a specific metric. Absolute errors for ML algorithms are shown in Figure 13.
Thus, when studying the dependence of the loss probability on the M A P intensity, the remaining parameters were equal to the following values: λ s m i n = 10 , λ s m a x = 100 , K = 10 , N = 5 , R = 10 , c v a = 4 , c v s = 0.9 , γ a = 20 , l a = 0.4 , γ a = 60 . Using similar parameters, we calculated the dependence of the customer loss probability on the number of servers with a low intensity of servicing tasks. When constructing the dependence, the intensity of the M A P was fixed and was equal to λ a = 50 , and the number of slow servers varied from 0 to 10. In the third experiment, when constructing the dependence of the customer loss probability on the intensity of slow server servicing, the intensity of M A P flow was also fixed at the level of λ a = 50 , and the number of slow servers also remained constant throughout the experiment and amounted to N = 5 , that is, half of all servers K = 10 . The service intensity on the slow server varied from 10 to 100 (the service intensity of a conventional server). As shown in Figure 12, they adequately describe the dependence of the customer loss probability on the parameters. In this experiment, the neural network showed the best accuracy; tree algorithms the demonstrated lower prediction accuracy.
Table 5 compares the time for calculating the loss probability for different methods. Just as when calculating the sojourn time of a system, ML algorithms allow us to obtain results much faster than the Monte Carlo method.

6. Conclusions

In this paper, we investigated a fork–join queuing system with an input M A P flow of customers consisting of an arbitrary number of tasks K into which the customer forks when it enters the system, as well as an arbitrary size of the buffer of the subsystem processing a specific task. Such systems have not been studied in the literature. An analytical solution is presented for the fork–join system when a customer forks into two tasks for processing. We obtained a stationary distribution for this case, formulas for calculating the system’s main characteristics, including the average size of the queue, the customer loss probability, and the sojourn customer time in the system.
We suggested a new methodology for quickly estimating the system performance using a combination of Monte Carlo simulation and machine learning to study the general K 2 case. Numerical experiments using the suggested method confirmed the high accuracy of estimating the characteristics of a fork–join system (96–98%). Additionally, estimation with a trained machine learning model requires orders of magnitude less time than the Monte Carlo method. Gradient boosting showed the best results among ML algorithms used in this paper. This methodology makes it possible to use the fork–join model in complex optimization problems that arise in the design and implementation of modern systems. Moreover, using this methodology, it is possible to solve the inverse problem. For example, using a known sojourn time, select the optimal number of servers or server performance. This method can be used to solve optimization problems and enhance the performance of the fork–join system.

Author Contributions

Conceptualization, V.M.V. and V.I.K.; methodology, V.M.V., V.I.K. and A.A.L.; software, A.M.S. and A.A.L.; validation, A.M.S., A.A.L. and V.I.K.; formal analysis, V.I.K. and V.M.V.; investigation, V.I.K., V.M.V., A.A.L. and A.M.S.; resources, V.M.V.; data curation, V.I.K.; writing—original draft preparation, V.I.K., A.M.S., A.A.L. and V.M.V.; writing—review and editing, A.M.S., A.A.L. and V.M.V.; visualization, A.M.S. and A.A.L.; supervision, V.M.V. and A.A.L.; project administration, V.M.V. and A.A.L.; funding acquisition, V.M.V. All authors have read and agreed to the published version of the manuscript.

Funding

The reported study was funded by Russian Science Foundation, project number 22-49-02023.

Data Availability Statement

The source code and all research data are available in Github repository: https://github.com/ipu69/queues-fork-join (accessed on 8 November 2023).

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
MAPMarkovian arrival process
PHPhase type distribution
MLMachine learning
ANNArtificial neural network
MSEMean squared error
CVCoefficient of variation

References

  1. Vianna, E.; Comarela, G.; Pontes, T.; Almeida, J.; Almeida, V.; Wilkinson, K.; Kuno, H.; Dayal, U. Analytical performance models for mapreduce workloads. Int. J. Parallel Program. 2013, 41, 495–525. [Google Scholar] [CrossRef]
  2. Rizk, A.; Poloczek, F.; Ciucu, F. Stochastic bounds in Fork–Join queueing systems under full and partial mapping. Queueing Syst. 2016, 83, 261–291. [Google Scholar] [CrossRef]
  3. Nguyen, M.; Alesawi, S.; Li, N.; Che, H.; Jiang, H. ForkTail: A black-box fork-join tail latency prediction model for user-facing datacenter workloads. In Proceedings of the HPDC 2018—2018 International Symposium on High-Performance Parallel and Distributed Computing, Tempe, AZ, USA, 11–15 June 2018; pp. 206–217. [Google Scholar] [CrossRef]
  4. Enganti, P.; Rosenkrantz, T.; Sun, L.; Wang, Z.; Che, H.; Jiang, H. ForkMV: Mean-and-Variance Estimation of Fork-Join Queuing Networks for Datacenter Applications. In Proceedings of the 2022 IEEE International Conference on Networking, Architecture and Storage (NAS), Philadelphia, PA, USA, 3–4 October 2022; pp. 1–8. [Google Scholar] [CrossRef]
  5. Flatto, L.; Hahn, S. Two Parallel Queues Created By Arrivals With Two Demands I. SIAM J. Appl. Math. 1984, 44, 1041–1053. [Google Scholar] [CrossRef]
  6. Nelson, R.D.; Tantawi, A.N. Approximate Analysis of Fork/Join Synchronization in Parallel Queues. IEEE Trans. Comput. 1988, 37, 739–743. [Google Scholar] [CrossRef]
  7. Kim, C.; Agrawala, A.K. Analysis of the Fork-Join Queue. IEEE Trans. Comput. 1989, 38, 250–255. [Google Scholar] [CrossRef]
  8. Varma, S.; Makowski, A.M. Interpolation approximations for symmetric Fork-Join queues. Perform. Eval. 1994, 20, 245–265. [Google Scholar] [CrossRef]
  9. Lui, J.C.; Muntz, R.; Towsley, D. Computing Performance Bounds for Fork-Join Queueing Models; University of California: Los Angeles, CA, USA, 2001. [Google Scholar]
  10. Balsamo, S.; Donatiello, L.; Van Dijk, N.M. Bound performance models of heterogeneous parallel processing systems. IEEE Trans. Parallel Distrib. Syst. 1998, 9, 1041–1056. [Google Scholar] [CrossRef]
  11. Lebrecht, A.S.; Knottenbelt, W.J. Response Time Approximations in Fork-Join Queues. In Proceedings of the 23rd Annual UK Performance Engineering Workshop, Ormskirk, UK, 9–10 July 2007. [Google Scholar]
  12. Thomasian, A. Analysis of fork/join and related queueing systems. ACM Comput. Surv. 2014, 47. [Google Scholar] [CrossRef]
  13. Jiang, L.; Giachetti, R.E. A queueing network model to analyze the impact of parallelization of care on patient cycle time. Health Care Manag. Sci. 2008, 11, 248–261. [Google Scholar] [CrossRef]
  14. Armony, M.; Israelit, S.; Mandelbaum, A.; Marmor, Y.N.; Tseytlin, Y.; Yom-Tov, G.B. On patient flow in hospitals: A data-based queueing-science perspective. Stoch. Syst. 2015, 5, 146–194. [Google Scholar] [CrossRef]
  15. Narahari, Y.; Sundarrajan, P. Performability analysis of fork–join queueing systems. J. Oper. Res. Soc. 1995, 46, 1237–1249. [Google Scholar] [CrossRef]
  16. Gallien, J.; Wein, L.M. A simple and effective component procurement policy for stochastic assembly systems. Queueing Syst. 2001, 38, 221–248. [Google Scholar] [CrossRef]
  17. Kemper, B.; Mandjes, M. Mean sojourn times in two-queue fork-join systems: Bounds and approximations. Spectrum 2012, 34, 723–742. [Google Scholar] [CrossRef]
  18. Schol, D.; Vlasiou, M.; Zwart, B. Large Fork-Join Queues with Nearly Deterministic Arrival and Service Times. Math. Oper. Res. 2022, 47, 1335–1364. [Google Scholar] [CrossRef]
  19. Qiu, Z.; Pérez, J.F.; Harrison, P.G. Beyond the mean in fork-join queues: Efficient approximation for response-time tails. Perform. Eval. 2015, 91, 99–116. [Google Scholar] [CrossRef]
  20. Klimenok, V. Performance characteristics of the fork-join queuing system. Informatics 2023, 20, 50–60. [Google Scholar] [CrossRef]
  21. Marin, A.; Rossi, S. Power control in saturated fork-join queueing systems. Perform. Eval. 2017, 116, 101–118. [Google Scholar] [CrossRef]
  22. Lee, K.; Shah, N.B.; Huang, L.; Ramchandran, K. The MDS Queue: Analysing the Latency Performance of Erasure Codes. IEEE Trans. Inf. Theory 2017, 63, 2822–2842. [Google Scholar] [CrossRef]
  23. Wang, W.; Harchol-Balter, M.; Jiang, H.; Scheller-Wolf, A.; Srikant, R. Delay Asymptotics and Bounds for Multi-Task Parallel Jobs. SIGMETRICS Perform. Eval. Rev. 2019, 46, 2–7. [Google Scholar] [CrossRef]
  24. Nguyen, M.; Alesawi, S.; Li, N.; Che, H.; Jiang, H. A black-box fork-join latency prediction model for data-intensive applications. IEEE Trans. Parallel Distrib. Syst. 2020, 31, 1983–2000. [Google Scholar] [CrossRef]
  25. Morozov, E.; Rumyantsev, A. Stability analysis of a MAP/M/s cluster model by matrix-analytic method. In Proceedings of the Computer Performance Engineering: 13th European Workshop, EPEW 2016, Chios, Greece, 5–7 October 2016; Volume 9951 LNCS, pp. 63–76. [Google Scholar] [CrossRef]
  26. Rumyantsev, A.; Morozova, T.; Basmadjian, R. Discrete-event modeling of a high-performance computing cluster with service rate control. In Proceedings of the Conference of Open Innovation Association, FRUCT, Bologna, Italy, 13–16 November 2018; pp. 224–231. [Google Scholar] [CrossRef]
  27. Vishnevsky, V.; Gorbunova, A.V. Application of Machine Learning Methods to Solving Problems of Queuing Theory. Commun. Comput. Inf. Sci. 2022, 1605 CCIS, 304–316. [Google Scholar] [CrossRef]
  28. Efrosinin, D.; Vishnevsky, V.; Stepanova, N. Optimal Scheduling in General Multi-Queue System by Combining Simulation and Neural Network Techniques. Sensors 2023, 23, 5479. [Google Scholar] [CrossRef]
  29. Dieleman, N.; Berkhout, J.; Heidergott, B. A neural network approach to performance analysis of tandem lines: The value of analytical knowledge. Comput. Oper. Res. 2023, 152, 106124. [Google Scholar] [CrossRef]
  30. Lucantoni, D.M. New results on the single server queue with a batch markovian arrival process. Commun. Statistics. Stoch. Model. 1991, 7, 1–46. [Google Scholar] [CrossRef]
  31. Dudin, A.N.; Klimenok, V.I.; Vishnevsky, V.M. The Theory of Queuing Systems with Correlated Flows; Springer: Berlin, Germany, 2019; pp. 1–410. [Google Scholar] [CrossRef]
  32. Neuts, M.F. Matrix-Geometric Solutions in Stochastic Models; The Johns Hopkins University Press: Baltimore, MD, USA, 1981; p. 348. [Google Scholar]
  33. Ozawa, T. Sojourn time distributions in the queue defined by a general QBD process. Queueing Syst. 2006, 53, 203–211. [Google Scholar] [CrossRef]
  34. Horváth, G. Efficient analysis of the queue length moments of the MMAP/MAP/1 preemptive priority queue. Perform. Eval. 2012, 69, 684–700. [Google Scholar] [CrossRef]
  35. Vishnevsky, V.; Larionov, A.; Ivanov, R.; Semenova, O. Estimation of IEEE 802.11 DCF access performance in wireless networks with linear topology using PH service time approximations and MAP input. In Proceedings of the 2017 IEEE 11th International Conference on Application of Information and Communication Technologies (AICT), Moscow, Russia, 20–22 September 2017; pp. 1–5. [Google Scholar] [CrossRef]
  36. Gordon, A.D.; Breiman, L.; Friedman, J.H.; Olshen, R.A.; Stone, C.J. Classification and Regression Trees. Biometrics 1984, 40, 874. [Google Scholar] [CrossRef]
  37. Friedman, J.H. Stochastic gradient boosting. Comput. Stat. Data Anal. 2002, 38, 367–378. [Google Scholar] [CrossRef]
  38. Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
Figure 1. A fork–join system when a customer consists of K > 2 tasks.
Figure 1. A fork–join system when a customer consists of K > 2 tasks.
Mathematics 12 00659 g001
Figure 2. Scheme of a combined method for calculating the performance characteristics of a fork–join system using Monte Carlo and ML methods.
Figure 2. Scheme of a combined method for calculating the performance characteristics of a fork–join system using Monte Carlo and ML methods.
Mathematics 12 00659 g002
Figure 3. Operation scheme of the simulation model (Monte Carlo method).
Figure 3. Operation scheme of the simulation model (Monte Carlo method).
Mathematics 12 00659 g003
Figure 4. Scheme for generating a dataset for training ML models.
Figure 4. Scheme for generating a dataset for training ML models.
Mathematics 12 00659 g004
Figure 5. Dependence of the time for calculating the characteristics of a fork–join system in an analytical way depending on various system parameters: MAP size, PH size, and buffer size.
Figure 5. Dependence of the time for calculating the characteristics of a fork–join system in an analytical way depending on various system parameters: MAP size, PH size, and buffer size.
Mathematics 12 00659 g005
Figure 6. Validation of Monte Carlo calculations using the implementation of analytical calculations in Python.
Figure 6. Validation of Monte Carlo calculations using the implementation of analytical calculations in Python.
Mathematics 12 00659 g006
Figure 7. Dependence of the time for calculating the characteristics of the fork–join system on the number of generated customers.
Figure 7. Dependence of the time for calculating the characteristics of the fork–join system on the number of generated customers.
Mathematics 12 00659 g007
Figure 8. Scatterplots of the system sojourn time prediction for regression algorithms.
Figure 8. Scatterplots of the system sojourn time prediction for regression algorithms.
Mathematics 12 00659 g008
Figure 9. Error chart of ML algorithms when predicting system sojourn time.
Figure 9. Error chart of ML algorithms when predicting system sojourn time.
Mathematics 12 00659 g009
Figure 10. Comparison of prediction results of ML algorithms with results obtained using Monte Carlo method.
Figure 10. Comparison of prediction results of ML algorithms with results obtained using Monte Carlo method.
Mathematics 12 00659 g010
Figure 11. Scatterplots of prediction of customer loss probability for regression algorithms.
Figure 11. Scatterplots of prediction of customer loss probability for regression algorithms.
Mathematics 12 00659 g011
Figure 12. Comparison of prediction results of ML algorithms with results obtained using the Monte Carlo method.
Figure 12. Comparison of prediction results of ML algorithms with results obtained using the Monte Carlo method.
Mathematics 12 00659 g012
Figure 13. Comparison of the results of predicting the customer loss probability using ML algorithms with the results obtained using the Monte Carlo method.
Figure 13. Comparison of the results of predicting the customer loss probability using ML algorithms with the results obtained using the Monte Carlo method.
Mathematics 12 00659 g013
Table 1. Table of limits within which the value of each model parameter was generated.
Table 1. Table of limits within which the value of each model parameter was generated.
ParameterMinimum ValueMaximum Value
λ a 0.150
c v a 0.15
γ a 0100
l a 0.51
c v s 0.15
γ s 1100
λ s m i n 0.150
λ s m a x λ s m i n 50
K132
R020
N0K
Table 2. Metric values for regression models predicting system sojourn times.
Table 2. Metric values for regression models predicting system sojourn times.
AlgorithmCorrelationR2Mean Square Error
Decision tree0.970.950.27
Gradient boosting0.990.990.029
Neural network0.990.990.037
Table 3. Comparison of the system sojourn time calculations using different algorithms.
Table 3. Comparison of the system sojourn time calculations using different algorithms.
AlgorithmTime, s
Monte Carlo method10
Decision tree0.0003
Gradient boost0.0012
Neural network0.0017
Table 4. Metric values for regression models predicting customer loss probability.
Table 4. Metric values for regression models predicting customer loss probability.
AlgorithmCorrelationR2Mean Square Error
Decision tree0.960.920.007
Gradient boost0.990.990.0007
Neural network0.990.990.0009
Table 5. Comparison of the time for calculating the customer loss probability in the system using various algorithms.
Table 5. Comparison of the time for calculating the customer loss probability in the system using various algorithms.
AlgorithmTime, s
Monte Carlo method10
Decision tree0.00027
Gradient boost0.0011
Neural network0.0017
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Vishnevsky, V.M.; Klimenok, V.I.; Sokolov, A.M.; Larionov, A.A. Investigation of the Fork–Join System with Markovian Arrival Process Arrivals and Phase-Type Service Time Distribution Using Machine Learning Methods. Mathematics 2024, 12, 659. https://doi.org/10.3390/math12050659

AMA Style

Vishnevsky VM, Klimenok VI, Sokolov AM, Larionov AA. Investigation of the Fork–Join System with Markovian Arrival Process Arrivals and Phase-Type Service Time Distribution Using Machine Learning Methods. Mathematics. 2024; 12(5):659. https://doi.org/10.3390/math12050659

Chicago/Turabian Style

Vishnevsky, Vladimir Mironovich, Valentina Ivanovna Klimenok, Aleksandr Mikhailovich Sokolov, and Andrey Alekseevich Larionov. 2024. "Investigation of the Fork–Join System with Markovian Arrival Process Arrivals and Phase-Type Service Time Distribution Using Machine Learning Methods" Mathematics 12, no. 5: 659. https://doi.org/10.3390/math12050659

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop