A method for calculating waiting time of M / M / 1 queuing system considering failure
By using the M/M/1 queuing system model and considering the randomness and recoverability of server failures, a distribution model of customer waiting time was derived. This solved the problem of server failures affecting waiting time in cloud service platforms and improved the accuracy and practicality of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIANGTAN UNIV
- Filing Date
- 2023-02-24
- Publication Date
- 2026-04-21
AI Technical Summary
Existing cloud service platform queuing system models fail to effectively consider the impact of server failures on waiting time and lack a specific waiting time distribution model for M/M/1 systems.
Using an M/M/1 queuing system model, considering the random occurrence and recovery of server failures, the probability distribution and probability density function of generalized service time are derived, and the convolution theorem and Laplace transform are combined to calculate the customer's waiting time in the queuing system.
It provides a detailed distribution model of customer waiting time in cloud service platforms, taking into account the impact of server failures on supply and demand, and provides a more comprehensive research basis for the reliability and profitability of cloud service platforms.
Smart Images

Figure CN116186489B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for calculating the waiting time of an M / M / 1 queuing system that takes into account faults. Background Technology
[0002] Cloud technology service platforms are platforms that centralize computing resources to provide paid services to customers. They offer exceptional flexibility and significant economic benefits, and have received widespread attention in recent years. When a customer has a large computing demand, a typical server cannot handle such a massive workload. Therefore, the customer sends a service request to a cloud service queuing platform with servers possessing powerful computing capabilities. Due to various uncertainties, the process by which the service request reaches the service platform is random; it is assumed that the service request arrives at the cloud technology service platform following a Poisson flow process.
[0003] On the one hand, due to the limited service resources and the unpredictable arrival of customer service requests, congestion in cloud service channels is foreseeable. If servers provide services on a first-come, first-served basis, then when congestion occurs, newly arriving service requests will inevitably have to wait in a queue. The length of this waiting time has a crucial impact on service quality and customer satisfaction, thus affecting the service request arrival rate and customer choice of the service platform, directly affecting the cloud service platform's profits. Therefore, research on the distribution of waiting time in cloud service platforms has become a hot topic in this field.
[0004] On the other hand, during the service provision process of a queuing system, the service channel may be affected by malfunctions or other types of service interruptions, which are beyond the control of the server itself and administrators. Once a server malfunctions, it will be unable to provide any type of service, and unfinished services will be interrupted. The time spent on service during this period continues to accumulate, meaning that server malfunctions can lead to a relatively longer customer waiting time. In conclusion, server malfunctions can severely impact system performance. Therefore, including potential queuing system malfunctions in research is highly valuable, both from the perspective of queuing theory and from the perspective of cloud service platform reliability and profitability.
[0005] Regarding the two aspects mentioned above, current research suffers from the following two problems. First, a common characteristic of current research methods on cloud service queuing systems is the assumption that the cloud service platform is permanently and continuously available, and that servers never fail. However, this assumption is highly impractical in reality. Second, most current queuing theory research considering server failures and interruptions is based on the M / G / 1 queuing system. The difference between this and the M / M / 1 system lies in the lack of specific modeling of intermediate processes, i.e., no specific model of the waiting time distribution is provided. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention provides a method for calculating the waiting time of an M / M / 1 queuing system that takes into account faults.
[0007] The technical solution of this invention to solve the above problems is: a method for calculating the waiting time of an M / M / 1 queuing system considering faults, comprising the following steps:
[0008] Step S1: Based on the logical time sequence of service requests, the queuing system provides services according to the principle of first-come, first-served. When the server is busy, newly arriving service requests will enter the queue to wait.
[0009] Step S2: At any moment during the process of providing services to customers, the server randomly fails, and the failure time is simulated by an exponential distribution function;
[0010] Step S3: Considering the service time requested by customers under the influence of fault factors, we conclude that the generalized service time is the sum of the service time and the fault time. Based on this, we derive the probability distribution and probability density function of the generalized service time.
[0011] Step S4: Analyze the probability density function of the generalized service time and approximate it as the difference between two exponential functions;
[0012] Step S5: Given a queue length, use the convolution theorem and Laplace transform, combined with generalized service time, to derive the average waiting time for new service requests arriving at the queuing system at this moment;
[0013] Step S6: Using service time and failure time as supplementary variables, derive the probability function of the queue length distribution of the queuing system;
[0014] Step S7: Combining the probability of queue length and the average waiting time of service requests when the queue length is fixed, derive the probability density function of the waiting time of new service requests arriving at the system at any given time.
[0015] In the above method for calculating the waiting time of the M / M / 1 queuing system considering faults, in step S1, the queuing system has one server, so at most one service request can be executed at the same time; for this queuing system, the arrival time of the service request follows a Poisson process with an arrival rate of λ; the principle of service request execution is first-come, first-served; when the server is busy, newly arrived service requests will enter the waiting queue of the queuing system to wait; the task execution requirements of each service request are random, independent and identically distributed, following an exponential random distribution, so the service time of task execution follows an exponential distribution with an average service rate of μ.
[0016] In the above method for calculating the waiting time of the M / M / 1 queuing system considering faults, in step S2, due to the influence of various uncertainties in the external environment and the wear and tear of the system itself during operation, the server may fail during the execution of any service request. The probability of failure is described as the number of times a failure occurs per unit time, denoted as α. It is assumed that the failure is reversible, that is, the failure can automatically recover after a period of time. During this period, the server will remain in a fault state and stop providing services to service requests. The duration of the failure is random, so an exponential distribution function is used to simulate the failure time t1, and the failure rate is denoted as b. Then the distribution function f(t1) is:
[0017]
[0018] The above method for calculating the waiting time of the M / M / 1 queuing system considering faults, specifically step S3, is as follows:
[0019] According to equation (1), the server failure time t1 follows the distribution function f(t1); it is assumed that after the server is repaired, it can immediately start the remaining services, and the services that are forced to be interrupted due to the failure can continue to be executed at the interruption point. In this case, the service time continues to accumulate, which is called the generalized service time.
[0020] Furthermore, assuming that the arrival process, service time, server failure probability, and server failure time are independent random variables; defining T as the generalized service time of a service request, and n as the number of queuing system failures occurring within the generalized service time, and denoting the probability distribution function with respect to T as F(T), then we have:
[0021]
[0022] The intermediate quantity is: c = α + μ, t ∈ [0, +∞);
[0023] Further simplification of equation (2) yields:
[0024]
[0025] The intermediate quantity is: a = αμ1;
[0026] To guarantee points For convergence, c - nb > 0; further calculation of the probability density function of the generalized service time using the derivative of F(T) with respect to T yields:
[0027]
[0028] The above method for calculating the waiting time of the M / M / 1 queuing system considering faults, specifically step S4, is as follows:
[0029] According to equation (4), f(T) is the form of an exponential function subtracted from an infinite series. It can be verified that the infinite series can be approximated by an elementary function. Rewriting equation (4) with f1(T) and f2(T) yields:
[0030]
[0031] For f2(T), which is a positive term series, we first prove its monotonicity by taking the first derivative with respect to f2(T):
[0032]
[0033] For the function f′2(T), f′2(T) < 0 in the domain; therefore, f2(T) is monotonically decreasing in the domain.
[0034] Secondly, to prove its concavity and convexity, we take the second derivative of f2(T) and obtain:
[0035]
[0036] For the function f”2(T), f”2(T) > 0 in the domain; therefore, the graph of f2(T) is a convex function in the domain.
[0037] Finally, to determine the convergence or divergence of f2(T), we use the root value test for positive term series, i.e., the Cauchy test, and we have:
[0038]
[0039] Therefore, f2(T) is convergent;
[0040] In summary, based on the above properties of f2(T), it can be approximated by an exponential function, namely:
[0041] f2(T)=γe -γT (9)
[0042] Where γ is the coefficient of the fitted exponential function.
[0043] Therefore, formula (5) can be written in the following form:
[0044]
[0045] The intermediate quantity is: β = -(ac).
[0046] The above method for calculating the waiting time of the M / M / 1 queuing system considering faults, specifically step S5, is as follows:
[0047] Let the queue length of the queuing system be k. Since there is only one server in the queuing system, and only one service request can be executed at a time, when k > 0, newly arriving service requests need to enter the waiting queue and wait. At this time, the time interval between the start of service for each service request is the generalized service time T of the previous task. i If i = 1, 2, 3, ..., k, then the waiting time W for a newly arriving service request in the queuing system is:
[0048] W = T1 + T2 + ... + T k (11)
[0049] From equation (10), the probability density function f(T) of the generalized service time for any service request is given. For ease of subsequent calculation and differentiation, T is replaced by the variable t, and f(T) is used. T (t) can be expressed as:
[0050]
[0051] Taking the Laplace transform of equation (12) yields:
[0052]
[0053] Where s is a Lagrange variable;
[0054] According to the convolution theorem, for any two functions g(t) and h(t) with respect to variable t, the following transformation relationship holds:
[0055]
[0056] Where τ∈(0,t), G(s) and H(s) are the Laplace transforms of functions g(t) and h(t), respectively;
[0057] Equation (14) can be generalized to cases where the number of functions is greater than 2. Therefore, the probability distribution function of the waiting time for a new service request when there are k service requests in the queuing system is:
[0058]
[0059] Factoring using the residue method and further calculation yields:
[0060]
[0061] Among them, the intermediate quantity is:
[0062]
[0063]
[0064]
[0065] Taking the inverse Laplace transform of equation (16) yields:
[0066]
[0067] The above method for calculating the waiting time of the M / M / 1 queuing system considering faults, specifically step S6, is as follows:
[0068] When a service request arrives at the system, the probability P that there are exactly k service requests in the queuing system is... k for:
[0069]
[0070] The above method for calculating the waiting time of the M / M / 1 queuing system considering faults, specifically step S7, is as follows:
[0071] Let M be the maximum queue length that the queuing system can accommodate. When k∈(0,M], find the probability distribution function of the waiting time for newly arriving service requests for all k values. Then the probability density function of the waiting time for newly arriving service requests in the queuing system is:
[0072]
[0073] The beneficial effects of this invention are as follows: First, it uses an M / M / 1 queuing model to characterize the arrival and execution process of customer service requests, considering the supply and demand relationship in cloud service platforms. Second, based on the introduction of a conventional M / M / 1 queuing model, it considers the impact of fault factors on the queuing system, obtaining an analytical expression for the distribution function of generalized service time. Finally, by combining the distribution function of generalized service time with the probability distribution of queue length, it derives the probability density function of the average waiting time distribution of customers in the queuing system. This method extends the definition of generalized service time from the M / G / 1 system to the M / M / 1 system, providing a more sufficient basis for numerical research on the supply and demand relationship of services in cloud service platforms. Attached Figure Description
[0074] Figure 1 This is a flowchart of the present invention.
[0075] Figure 2 A structural diagram of the M / M / 1 queuing system considering failure factors. Detailed Implementation
[0076] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0077] like Figure 1As shown, a method for calculating the waiting time of an M / M / 1 queuing system considering faults includes the following steps:
[0078] Step S1: Based on the logical time sequence of service requests, the queuing system provides services according to the principle of first-come, first-served. When the server is busy, newly arriving service requests will enter the queue to wait.
[0079] The queuing system has one server, so it can only execute one service request at a time. For this queuing system, the arrival time of the service request follows a Poisson process with an arrival rate of λ. The principle of service request execution is first-come, first-served. When the server is busy, newly arriving service requests will enter a waiting queue with unlimited capacity to wait. The task execution requirements of each service request are random, independent and identically distributed, following an exponential random distribution. Therefore, the service time of the task execution follows an exponential distribution with an average service rate of μ.
[0080] Step S2: At any moment during the process of providing services to customers, the server randomly fails, and the failure time is simulated by an exponential distribution function.
[0081] Due to various uncertainties in the external environment and the inherent overhead of the queuing system, a server failure can occur during any process of executing any service request. Let the probability of failure be α. Physically, this means that there is an α probability of failure occurring within a certain period of server operation. The larger the value of α, the greater the likelihood of failure, and therefore the longer the delay time for the entire service cycle. Because of the randomness of the factors causing failure, we cannot determine the specific time of failure or its severity. Assuming the failure is reversible, meaning it can automatically recover after a certain period, during which time the server will remain in a faulty state and stop providing services to requests, and that the duration of the failure is random, we can use an exponential distribution function to simulate the duration t1 of the failure. Let the failure rate be denoted as b, then the distribution function f(t1) is:
[0082]
[0083] Step S3: Considering the service time requested by customers under the influence of fault factors, we conclude that the generalized service time is the sum of the service time and the fault time. Based on this, we derive the probability distribution and probability density function of the generalized service time.
[0084] A server can fail at any time during any type of service process. According to equation (1), the server's failure time t1 follows the distribution function f(t1). Assuming that the server can immediately start the remaining services after it is repaired, and that services that are interrupted due to failure can continue to be executed at the point of interruption, the service time accumulates continuously and is called the generalized service time.
[0085] Furthermore, assuming that the arrival process, service time, server lifespan, and server downtime are independent random variables; defining T as the generalized service time of a service request, and n as the number of queuing system failures occurring within the generalized service time, and denoting F(T) as the probability distribution function with respect to T, then we have:
[0086]
[0087] The intermediate quantity is: c = α + μ, t ∈ [0, +∞).
[0088] Further simplification of equation (2) yields:
[0089]
[0090] The intermediate quantity is: a = αμ1.
[0091] To guarantee points For convergence, c - nb > 0; Further calculation of the probability density function of the generalized service time using the derivative of F(T) with respect to T yields:
[0092]
[0093] Step S4: Analyze the probability density function of the generalized service time and approximate it as the difference between two exponential functions.
[0094] According to equation (4), f(T) is the form of the subtraction of an exponential function and an infinite series. It can be verified that the infinite series can be approximated by an elementary function.
[0095] Based on the above ideas, we first analyze the properties of f(T) and rewrite formula (4) using f1(T) and f2(T), that is:
[0096]
[0097] For f2(T), which is a positive term series, we first prove its monotonicity by taking the first derivative with respect to f2(T):
[0098]
[0099] Since f2(T) is a positive term series, for any n, we always have: Therefore, it is easy to see that for a function f′2(T), if f′2(T) < 0 in the domain, then f2(T) is monotonically decreasing in the domain.
[0100] Secondly, to prove its concavity and convexity, we take the second derivative of f2(T) and obtain:
[0101]
[0102] For the function f”2(T), f”2(T) > 0 in the domain; therefore, the graph of f2(T) is a convex function in the domain.
[0103] Finally, to determine the convergence or divergence of f2(T), we use the root value test for positive term series, i.e., the Cauchy test. As long as the following condition is met... (where u) n If f(t) is the nth term of the series, then the series converges. For f2(T), we have:
[0104]
[0105] Therefore, f2(T) is convergent.
[0106] In summary, based on the above properties of f2(T), it can be approximated by an exponential function, namely:
[0107] f2(T)=γe -γT (9)
[0108] Where γ is the coefficient of the fitted exponential function.
[0109] Therefore, formula (4) can be written in the following form:
[0110]
[0111] The intermediate quantity is: β = -(ac).
[0112] Step S5: Given a queue length, use the convolution theorem and Laplace transform, combined with the generalized service time, to derive the average waiting time for new service requests arriving at the queuing system at this moment.
[0113] The arrival time of service requests submitted by customers in the queuing system is random and cannot be predetermined. Therefore, it is foreseeable that too many service requests in a short period of time will lead to congestion in the service channel, requiring customers to wait in queues. Let the queue length, i.e., the number of service requests waiting in the queue, be k. Since there is only one server in the queuing system, and only one service request can be executed at a time, when k > 0, newly arriving service requests need to enter the waiting queue. At this time, the time interval between the start of service for each new service request is the generalized service time T of the previous service request. i If i = 1, 2, 3, ..., k, then the waiting time W for a newly arriving service request in the queuing system is:
[0114] W = T1 + T2 + ... + T k (11)
[0115] From equation (10), the probability density function f(T) of the generalized service time for any service request is given. To facilitate subsequent calculations and distinctions, T is replaced by the variable t, and f(T) is used as the basis for the calculation. T (t) can be expressed as:
[0116]
[0117] Taking the Laplace transform of equation (12) yields:
[0118]
[0119] Where s is a Lagrange variable.
[0120] According to the convolution theorem, for any two functions g(t) and h(t) with respect to variable t, the following transformation relationship holds:
[0121]
[0122] Where τ∈(0,t), G(s) and H(s) are the Laplace transforms of functions g(t) and h(t), respectively.
[0123] Equation (14) can be generalized to cases where the number of functions is greater than two. Therefore, the probability distribution function of the waiting time for a new service request when the queuing system has k service requests is:
[0124]
[0125] Factoring using the residue method and further calculation yields:
[0126]
[0127] Among them, the intermediate quantity is:
[0128]
[0129]
[0130]
[0131] Taking the inverse Laplace transform of equation (19) yields:
[0132]
[0133] Step S6: Using service time and failure time as supplementary variables, derive the probability function of the queue length distribution of the queuing system.
[0134] The process by which service requests arrive at the queuing system is random. The probability P that when a service request arrives at the queuing system, there are exactly k service requests in the queue is given. k for:
[0135]
[0136] Step S7: Combining the probability of queue length and the average waiting time of service requests when the queue length is fixed, derive the probability density function of the waiting time of new service requests arriving at the system at any given time.
[0137] Let M be the maximum queue length that the queuing system can accommodate. When k∈(0,M], find the probability distribution function of the waiting time for newly arriving service requests for all k values. Then the probability density function of the waiting time for newly arriving service requests in the queuing system is:
[0138]
Claims
1. A method for calculating the waiting time of an M / M / 1 queuing system considering faults, characterized in that, Includes the following steps: Step S1: Based on the logical time sequence of service requests, the queuing system provides services according to the principle of first-come, first-served. When the server is busy, newly arriving service requests will enter the queue to wait. Step S2: At any moment during the process of providing services to customers, the server randomly fails, and the failure time is simulated by an exponential distribution function; In step S2, due to various uncertainties in the external environment and server runtime wear and tear, the server may fail during the execution of any service request. The probability of a failure is expressed as the number of failures occurring per unit time, denoted as . Assuming the fault is reversible, meaning it can automatically recover after a certain period, during which time the server will remain in a faulty state and stop providing services to requests; and given that the duration of the fault is random, an exponential distribution function is used to simulate the fault duration. The failure rate is denoted as Then the distribution function : (1) Step S3: Considering the service time of service requests under the influence of fault factors, we conclude that the generalized service time is the sum of the service time and the fault time. Based on this, we derive the probability distribution and probability density function of the generalized service time. Step S4: Analyze the probability density function of the generalized service time and approximate it as the difference between two exponential functions; Step S5: Given a queue length, use the convolution theorem and Laplace transform, combined with generalized service time, to derive the average waiting time for new service requests arriving at the queuing system at this moment; Step S6: Using service time and failure time as supplementary variables, derive the probability function of the queue length distribution of the queuing system; Step S7: Combining the probability of queue length and the average waiting time of service requests when the queue length is fixed, derive the probability density function of the waiting time of new service requests arriving at the system at any given time.
2. The method for calculating the waiting time of an M / M / 1 queuing system considering faults according to claim 1, characterized in that, In step S1, the queuing system has one server, so at most one service request can be executed simultaneously. For this queuing system, the arrival time of service requests follows a Poisson process with an arrival rate of λ. The principle for service request execution is first-come, first-served; when the server is busy, newly arriving service requests will enter the waiting queue of the queuing system. The task execution requirements for each service request are random, independent, and identically distributed, following an exponential random distribution. The service time for task execution follows an average service rate of λ. The exponential distribution.
3. The method for calculating the waiting time of an M / M / 1 queuing system considering faults according to claim 2, characterized in that, The specific process of step S3 is as follows: From equation (1), the server downtime Follows the distribution function ; Assuming that the server can immediately resume the remaining services after it is repaired, and that services that were interrupted due to the failure can continue to execute at the point of interruption, the service time accumulates in this case, which is called generalized service time. Furthermore, assume that the arrival process, service time, and server downtime are independent random variables; define... For the generalized service time of service requests, The number of queuing system failures during the generalized service time is expressed as... Indicates about If the probability distribution function is given, then: (2) Among them, the intermediate quantity is: , ; Further simplification of equation (2) yields: (3) Among them, the intermediate quantity is: ; To guarantee points For convergence to hold, the following must be true: ;right about Further differentiation yields the probability density function of the generalized service time: (4)。
Citation Information
Patent Citations
Queueing time estimation method
CN101540016A
Customer waiting time and response time confidence interval prediction method for G / G / 1 queuing system
CN112163686A