Analysis of polling models with a self-ruling server

Polling systems are systems consisting of multiple queues served by a single server. In this paper, we analyze polling systems with a server that is self-ruling, i.e., the server can decide to leave a queue, independent of the queue length and the number of served customers, or stay longer at a queue even if there is no customer waiting in the queue. The server decides during a service whether this is the last service of the visit and to leave the queue afterward, or it is a regular service followed, possibly, by other services. The characteristics of the last service may be different from the other services. For these polling systems, we derive a relation between the joint probability generating functions of the number of customers at the start of a server visit and, respectively, at the end of a server visit. We use these key relations to derive the joint probability generating function of the number of customers and the Laplace transform of the workload in the queues at an arbitrary time. Our analysis in this paper is a generalization of several models including the exponential time-limited model with preemptive-repeat-random service, the exponential time-limited model with non-preemptive service, the gated time-limited model, the Bernoulli time-limited model, the 1-limited discipline, the binomial gated discipline, and the binomial exhaustive discipline. Finally, we apply our results on an example of a new polling discipline, called the 1 + 1 self-ruling server, with Poisson batch arrivals. For this example, we compute numerically the expected sojourn time of an arbitrary customer in the queues.


Introduction
Polling systems are systems consisting of multiple queues served by shared servers. In recent years, polling models were used to model many real-life systems. For instance, traffic light systems, product-assembly systems, and wireless communication systems were modeled as polling systems. Good surveys on a broad class of polling models and their analysis can be found in, for example, [2,[14][15][16].
In the analysis of polling systems, the standard method models the system at specific time points as a Markov chain and then relates the state space at these points; see [7]. The kernel relation within this method is the joint length of the queues in the system at the end of a server visit to queue i, denoted by Q (i) , as function of the joint length of the queues at the start of the visit to Q (i) . This relation can be written in the following general form: where β (i) (z) is the joint probability generating function (p.g.f.) of the queue lengths at the end of a server visit to Q (i) , α (i) (z) is the joint p.g.f. of the queue lengths at the start of a server visit to Q (i) , and F i is an operator representing the mapping between the queue lengths at these time points which depends on the assumed service discipline. The next step in the analysis is to relate the joint p.g.f. of the queue lengths at the start of a server visit to Q (i) to the joint p.g.f. of the queue lengths at the end of a server visit to Q ( j) , j = 1, . . . , M, where M denotes the number of queues in the system, for example, (1) , . . . , β (M) )(z), (2) where G i is an operator representing the mapping between the queue lengths at the end of a visit to a queue and at the beginning of a visit to Q (i) which incorporates the effect of the switchover times and the routing of the server. We refer to [1,6] for the incorporation of Eqs. (1) and (2) into a numerical iterative framework to compute the joint queue length probabilities. However, in this paper, we do not consider the complete polling system and focus only on the relation in Eq. (1). We assume throughout the paper that the polling system is stable, i.e., we assume that all the processes under consideration have a proper limiting distribution. Here, we remark that stating and proving sufficient and/or necessary conditions for stability of the polling systems considered in this paper is a study on its own. In this paper, we concentrate on F i (α (i) )(·), which relates the joint p.g.f. of the queue lengths at the end of a server visit to Q (i) , to the joint p.g.f. of the queue lengths at the start of the visit to this queue for queues with a self-ruling server. A self-ruling server can decide to leave a queue, independent of the queue length and the number of served customers, and can stay longer at a queue even if there is no customer waiting in the queue. During a service, the server decides with probability p (i) that this is the final service of the visit and to leave the queue after this service; otherwise, it is called a regular service which is possibly followed by other services during the same server visit. After service, customers can join another queue or leave the system; moreover, new customers are added to the queues, independent of other customers. These new customers are called replacements. Regular customers are replaced, stochastically, in the same way. The replacement of the final customer can have a different distribution, for example, due to being interrupted in time-limited systems. This is the reason we assume that the server decides during the service whether it will be the final one. When the queue empties before the server decided for the final service, extra customers might be added to the queues. The server decides either to leave with probability p (i) I or to stay and serve more customers during the same visit. We assume that p (i) + p (i) I > 0, which implies that a server visit to Q (i) always ends. The distribution of the extra customers in the queues depends on the choice of the server to leave or stay after being idle.
We find the relation F i (α (i) )(·) for service disciplines of the branching type when the server never decides that the ongoing service is the final one, i.e., p (i) = 0. The so-called branching property, see [11,12], plays an important role in the analysis of polling systems. Polling systems with server disciplines satisfying this property, such as exhaustive, gated or Bernoulli disciplines, can be analyzed exactly and have results in explicit form. The analysis of disciplines which do not satisfy the branching property, such as the time-limited and K -limited disciplines, is usually restricted to special cases, approximations, or numerical methods.
In the description of the self-ruling server, we did not focus on how the customers are generated. In the following, we describe the various models of generating customers in more detail. In the most general case, we assume that the server will serve the customers who are present at the beginning of the visit unless he decides to leave before serving them all. After the service of a customer, new customers are put in the queues, the so-called indirect replacements. We do not specify how these indirect replacements are generated, we only know the joint distribution of the number of indirect replacements at the queues. These indirect replacements have to wait for a new visit of the server before they are served. As a second model, we assume that if the queue becomes empty before the server decided to leave, a number of new customers are added to the queue, some of which might be served during the same visit, the so-called direct replacements; these potential customers to be served are treated as if they were there at the beginning of the visit. Again, we do not specify how these new customers are generated after the queue emptied; we only assume that we know the joint distribution of the number of new customers at every queue. In the next model, the so-called service-based discipline, we assume that, after the service of a customer, we do not only have indirect replacements but also direct replacements, which are customers who are directly served after the service ends during the same visit. Note that after the final service, there are no direct replacements. Also in this model, we do not specify how the new customers are generated, we only assume that the joint distribution of the number of direct and indirect replacements is known. As a final model for the replacements, we focus on the service-based discipline, where we now assume that customers arrive according to a batch Poisson process and that we know the service-time distributions. In this paper, we derive the relation between the joint p.g.f. of the number of customers in the queues at the start and the end of a visit to a queue. Based on these relations, we also find the joint Laplace transform of the workload at an arbitrary time in the queues and the expected sojourn time of an arbitrary customer in the queues.
Many polling models found in the literature can be reformulated as an SRS polling model, for example, the 1-limited discipline (take p (i) = 1), the binomial gated discipline (take the SRS discipline with p (i) = 0 and no direct replacements), and the binomial exhaustive discipline (take the SRS discipline with p (i) = 0 where the server leaves immediately without any replacements after becoming idle). The examples also extend to exponential time-limited models (where p (i) is the probability that the service of a customer is interrupted) such as the exponential time-limited model with preemptive-repeat-random service, the exponential time-limited model with non-preemptive service, the gated time-limited model, and the Bernoulli timelimited models.
The paper is structured as follows: In Sect. 2, we explain the general polling model with a self-ruling server. In Sect. 3, we analyze this general model and describe and analyze some more specified systems. Section 4 relates our work to the so-called exponentially time-limited polling models which were studied in [1,5,6,8] and their extensions in [9]. This latter is done in Sect. 5. In Sect. 6, we use the key relations derived in the previous sections to find expressions for the joint p.g.f. of the queue length and the joint Laplace transform of the workload at an arbitrary time in the queues. Finally, in Sect. 7, we apply our results in a numerical example of the 1+1 self-ruling discipline with Poisson batch arrivals. For this example, we compute numerically the expected queue length at various epochs and the expected sojourn time of an arbitrary customer.

Model and notation
Let us consider a polling system with a single server and M ≥ 1 queues. The server visits the queues according to a routing schedule which we do not further specify, since our focus is on the relation in Eq. (1). During a visit to a queue, the server may decide to interrupt or prolong this visit independent of the queue length. More specifically, the server may decide, with probability p (i) , during the service of a customer whether this is the last customer to be served during this visit. When the queue becomes empty before the server decides to leave, the server may serve some extra customers using the same discipline. Furthermore, we assume that the underlying service discipline, that is the service discipline when we assume that p (i) = 0, is of branching type (see Sect. 2.1). We call this the self-ruling server (SRS) discipline.
We start this section with a short introduction to the branching-type service discipline. In the last part of this section, we discuss the SRS discipline in more details.

Branching-type service discipline
In this subsection, we consider the branching-type discipline. The standard definition of a branching-type service discipline is as follows (cf. [11,12]): si customers present at Q (i) at the start of a visit, then during the course of the visit, each of these N (i) si customers will be replaced in an i.i.d. manner by a random population.
Denote the number of indirect replacements for a customer in the queues by s M ) the number of customers present in the queues at the start of a visit to Q (i) and define its p.g.f.
. The number of customers in the queues after a server visit to Q (i) is given by e is of the simple form In Sect. 3, we first concentrate on this general form of branching where H (i) (z) is not specified.

The self-ruling server
Our focus is on the behavior of queues with the self-ruling server discipline. According to this SRS discipline, the server decides during a service, with probability p (i) , whether this is the final customer to be served during this visit to. The customers that are served before the final customer are called regular customers. Let N (i) V denotes the number of regular customers that are served during the server visit. In a queue with the SRS discipline, at most a geometrically distributed number of customers, with mean 1/ p (i) , is served. After (or during) the service of a customer, the length of all the queues can increase by a random amount. The extra customers are called the indirect replacement of a customer. The indirect replacements for regular customers are stochastically equivalent; the indirect replacement of a final customer may have a different distribution. The indirect replacements of all the customers are independent. Furthermore, the indirect replacements at Q (i) are not served during the ongoing server visit and have to wait for a new server visit. Let 1 E denotes the indicator function of an event E and let F denote the event that the customer being served is the final customer. Define the p.g.f. of R on the event it is a final customer by the p.g.f. of R on the event it is a regular customer by Note that H When the server becomes idle before serving the final customer, the server will serve S (i) X extra customers during the same visit as if they were present at the start of the visit and R (i) X additional customers are added to all the queues. If no extra customers are served, i.e., S (i) X = 0, the server leaves Q (i) . The joint p.g.f. of the extra customers is denoted by the joint p.g.f. of R (i) X , S (i) X on the events, respectively, that the server leaves Q (i) and the server starts another service.
For convenience, we introduce the exhaustive self-ruling server (E-SRS) discipline. This E-SRS discipline is similar to the SRS discipline but the server will immediately end a visit as soon as the server becomes idle. So, in this E-SRS discipline, H (i) X (z, z) = 1, which states that there are neither extra customers to be served nor additional customers at the queues after the server becomes idle.
In the following section, we analyze polling systems with the self-ruling server discipline. Note that we will not specify how exactly the indirect replacement of a customer is implemented except they are independent. A specific form of indirect replacements is considered in Sect. 3.3.

Analysis of polling systems under the SRS discipline
In this section, we focus on Eq. (1), which relates the joint p.g.f. of the queue lengths at the end of a visit to the joint p.g.f. of the queue lengths at the start of a visit. We present results for the self-ruling server discipline with the general branching-type discipline in Sect. 3.1. In Sect. 3.2, we specify the replacement process of a customer by considering the so-called service-based branching-type service discipline. In this discipline, a customer does not only have an indirect replacement population R (i) X but also a direct replacement by customers that may be served during the ongoing server visit. As an example of such a system, consider a task at a certain queue. During the service of a task, a new task may be generated, either at the same queue or at other queues. Some of the tasks, generated at the queue where the server is, have to be done during the same visit; others can wait for a next visit. In the previous models, we did not focus on how replacements are generated. In Sect. 3.3, a further specification of this generating process is given where replacements arrive during the service of a customer according to a batch Poisson process.

General branching-type discipline
In this part, we focus on the general form of branching where we assume that the replacement p.g.f.'s H Lemma 1 For a polling system operating under an exhaustive self-ruling single server discipline, the relation between the joint p.g.f. of the queue length at the start and the end of a server visit to Q (i) reads where Proof Consider a server visit to Q (i) . Denote the total indirect replacement at the end of the server visit by R (i) T ; the T is added here to indicate that it is the total indirect replacement for all customers that are present at the start of the visit, as opposed to the indirect replacement of a single customer in Eq. (3). It is easily seen that − denotes the indirect replacement of the final customer. Therefore si is the queue length of Q (i) at the start of a server visit to this queue. By unconditioning on N (i) s , we find Eq. (5).
In contrast with the E-SRS discipline, under the general SRS discipline the server may still serve extra customers at Q (i) even after the server becomes idle.
Theorem 1 For a polling system operating under a self-ruling server discipline, the relation between the joint p.g.f. of the queue lengths at the start and the end of a server visit to Q (i) reads , and γ (i) Proof Consider a visit of the server to Q (i) with initially N (i) si customers. During this visit, it may occur that (i) the server decides that one of the N (i) si customers is the final customer or (ii) the server serves all N (i) si customers as regular customers. In case (i), it is readily seen that the indirect replacement process, that is R (i) T , the number of additional customers in the queues, is identical for both the E-SRS and the SRS discipline. However, in case (ii), the indirect replacement process is different for each discipline. Under the E-SRS discipline, the server immediately leaves when the queue becomes empty, say this occurs at time t 0 . Under the general SRS discipline, at time t 0 the server may remain at the queue and a sequence of idle and busy periods will follow until eventually the server decides on a final customer or decides to serve no extra customers after an idle time (S (i) X = 0). This latter contribution (after t 0 ) to the indirect replacement process is represented in the term γ (i) Observe that an idle server, will leave a) without serving extra customers, b) during the busy period serving the extra customers, or c) after this subsequent busy period. This process is regenerative in the sense that if the server does not leave before the end of the first busy period following the idle period, then the process starts anew at that specific time instant. Then, we have the following relation for γ (i) of the indirect replacements on the event that the server leaves; see Eq. (4). The other terms on the RHS are similar to Eq. (5), with the joint p.g.f. at the start of the busy period given by H . This leads to Eq. (7).

Service-based branching-type discipline
A special subclass of the general branching-type service discipline is the servicebased branching-type discipline, which can be described as follows: At the start of a service period at Q (i) , there are N (i) si customers at this queue; these customers are called zeroth-generation customers. With probability q (i) 1 , such a customer goes to the server, independent of the other customers, to receive service and becomes a firstgeneration customer; otherwise, this customer waits for the next visit of the server. We assume that every customer of the first generation, immediately after being served, is replaced in a stochastically identical way and independently of the other customers. The replacing customers are split into two parts, namely direct replacements, which are customers that are served at Q (i) in the same visit of the server, and indirect replacements, additional customers at all queues, including at Q (i) , which are served in the subsequent visits. The direct replacements of the first-generation customers are called second-generation customers. After being served, a second-generation customer is replaced, in an i.i.d. fashion, by third-generation customers that are served at Q (i) during the same visit of the server and additional customers to all the queues, including Q (i) to be served in subsequent visits. We can continue this construction for further generations. All customers linked to the same first-generation customer are called a family. Denote the number of additional customers that arrived during the service of an nth generation customer at Q (i) and are served during the ongoing server visit by S (i) n and denote the additional customers that are not served during this visit by Note that the order of service of customers does not influence the distribution of , the total indirect replacement during the visit to Q (i) . Furthermore, remark the difference between the total indirect replacement R (i) of a family and the indirect replacement of an nth generation customer R In the case of this service-based branching-type discipline together with a selfruling server, we assume that regular customers and the final customers may have different joint distributions of the number of direct replacements and the indirect replacement population. We also make the assumption that, whether we consider a final or regular customer, the total of new customers at the queues per service, that is the sum of the indirect replacement and direct replacements, has the same distribution for every generation. By this assumption, the order in which customers are handled does not matter for the indirect replacement population when the server leaves, which can be seen as follows: Suppose that customers are served in one specific order. Now assume that the server leaves without serving a final customer. Then, in any generation, for all orders, the same number of customers have been fully served, so the indirect replacement population is the same. Next assume that the server leaves after a final customer; in this case, in all orders, the same number of customers will be served. The indirect replacement population added to the population in the queues at the start of the visit consists of all customers that were present at the start, plus new customers after the regular services and the final service, minus the number of served customers. By assumption, the total number of new customers does not depend on the generation number of the served customers, so also in this case, the indirect replacement population does not depend on the order of the customers.
In the case where we have a service-based branching-type discipline, we can further specify H We can then use these specified p.g.f.'s to modify Th. 1. As remarked before, a customer present at the start of a visit is replaced by a set of customers at every queue in the system. Let us introduce the following joint p.g.f.'s: where we used that after a final customer, no other customers are served at Q (i) during the same visit. Note that by the assumption that, per service, the total number of new customers per queue does not depend on the generation n, both H do not depend on the generation n. Also by this assumption, the order in which we serve the customers is not important for the indirect replacement population and we can assume that we serve a first-generation customer and its complete family consecutively. Within a family, we handle the customers generation by generation.
Let G (i) n+ (z, z) denote the joint p.g.f. of the direct and indirect replacements after serving the nth generation on the event that the visit still continues in the next generation. By the assumption that a zeroth-generation customer visits the server with probability q where we use that the direct replacements of the nth generation are served as the (n + 1)th generation of a family.
Let G (i) n− (z, z) denote the p.g.f. of the total population at the queues that will be served in later visits on the event that the visit to Q (i) was interrupted during the service of an nth generation customer. We then find Since the system is stable, lim n→∞ P(S (i) n = 0) = 1 and we get the joint p.g.f. of R (i) for a customer with an offspring that is fully served (cf. Eq. (3)): Note that the limit on the RHS of Eq. (9) does not depend on z.
Because an interrupted family is interrupted in exactly one generation, and G (i) where we used Eq. (9) and the assumption that both H (i) * − (z) and H (i) * + (z) do not depend on the generation. Theorem 2 For a polling system operating under a service-based self-ruling server discipline where H do not depend on the generation, the relation between the joint p.g.f. of the queue lengths at the start and the end of a server visit to Q (i) reads and γ (i) .
. Example 1 In this example, we introduce a special branching-type discipline, the 1+1 service discipline. In this discipline, all first-generation customers are served during a visit of the server. From all the customers which arrive during the service time of the same first-generation customer, at most one is served during the same visit. All other second-or third-generation customers, if any, have to wait until the next server visit. By considering different scenarios, namely whether the first-generation customer was a final customer or not and, in the latter case, whether there was no arrival or at least one during its service time, we find and It is easily verified that this expression for H (i) − (z) also can be derived from Eqs. (10) and (12) by observing that does not depend on the generation number n. Then, by taking a different order of serving the customers, namely by serving its direct replacements directly after a customer, we find that a customer of the second generation has, stochastically, the same indirect replacement as a customer of the first generation. We then see that H 1+ (z, z)| z=1 < 1, and we can prove, by using Rouché's theorem, that this equation for H (i) + (z) has exactly one solution for all z with z j ≤ 1 for j = 1, . . . , M.

Poisson arrivals
We will go one step further in specifying the replacement p.g.f. H (i) + (z, z), by assuming that customers arrive to the system according to a batch Poisson processes with rate λ, where the batch may split over several queues, and that the service times of individual customers follow a general distribution. In this system, a customer is replaced by customers that arrive during its service. For a final customer, the service-time distribution may be different for the other customers. For the final customer, the Laplace-Stieltjes transform (LST) of the service time at Q (i) is denoted by T (i) S− (s) and for the other customers by T (i) S+ (s). We assume a Bernoulli discipline where a customer of the nth generation, if any, visits the server to be served with probability q (i) n independent of other customers. A customer that does not visit the server can not be the final customer in the ongoing server visit. These customers are their own indirect replacement at Q (i) and will be served in a future server visit. Note that if q (i) n = 0 then, effectively, there is no nth generation. The customer that is served at Q (i) leaves the system or joins Q ( j) ; see, for example, [13]. For a final customer, the routing probabilities may differ from the other customers and are denoted by r As before, we assume that the service processes, the arrival process, the batch sizes, and the routing of customers are independent. Denote the numbers of simultaneously arriving customers at Q ( j) by A ( j) for j = 1, . . . , M, and their joint p.g.f. by A (z) := E z A , where A = (A (1) , . . . , A (M) ). Denote the number of customers that arrived to Q ( j) during the service of a customer at Q (i) by A n+1 by the assumption of the Bernoulli discipline. By conditioning on the service times, we can calculate that (cf. Eqs. (9) and (10)) and In the following, we use several times that Under the SRS discipline, the server will always move to a next queue when the final customer is served. However, when the queue becomes empty and the last customer was not the final one, the server remains idle at the queue for some random time. If, during this idle time, no new customers arrive at Q (i) , the server will move to another queue. Otherwise, the server will immediately start serving again under the same SRS discipline; if the server started working at the same queue and becomes idle for a second time, the server will behave, stochastically, the same as the first time the server became idle. Note that by these assumptions, Eq. (4) does not hold; if a batch arrives at Q (i) and all its customers are not served, which occurs with probability A (i) 1 (0, 1), then the server does not leave but will stay idle at Q (i) for another period. Now, we can also specify H (i) X + (z, z) and H (i) X − (z) (see Eq. (4)), and the joint generating functions for the direct and indirect replacements after a period in which the server is idle, where the LST of the idle time is denoted by W (i) I (s). We get and Combining the above observations with Th. 2 leads to the following theorem.
Theorem 3 For a polling system with batch Poisson arrivals operating under a servicebased self-ruling server discipline, the relation between the joint p.g.f. of the queue lengths at the start and the end of a server visit to Q (i) reads and γ (i) Remark 1 If the idle time has an exponential distribution with rate ξ (i) , that is W (i) .

Remark 2
If we use the definition in Eq. (4), that is, the server will either leave after the extra time or (really) start a new service, we would have to ignore the arrivals of the not served batches at Q (i) since they do not end the extra time. This gives and . Remark 3 In many papers on polling systems, it is assumed that customers arrive to the system according to M independent Poisson processes, to Q ( j) with rate λ j , j = 1, . . . , M. The generating function of the batch size at Q ( j) is denoted by B ( j) (z) := E z B ( j) . In our framework, we get λ = M j=1 λ j and

Exponential time-limited polling systems
In this section, we study exponential time-limited polling systems with Poisson arrivals where the total visit time of a server to a queue is at most an exponentially distributed time. If the timer expires during a service, the ongoing service is interrupted. We consider two types of time-limited disciplines: (a) the pure time-limited case (P-TL) in which the server visits a queue for an exponentially distributed time and (b) the exhaustive time-limited discipline (E-TL) in which the server visits a queue for at most an exponentially distributed time, but also leaves when the queue becomes empty. In the case of the P-TL, customers that arrive at Q (i) at the end of an idle period are served as if they were present at the start of the visit. We model these time-limited systems in the framework of the customer-limited system. To do so, we first specify p (i) and T (i) S+ (.) since these quantities do not depend on the effect of the interruption or on the underlying branching-type discipline. Then, we also focus on T  It is readily seen that the probability that the next customer is the final one is given by and that the LST of the service time of a regular customer is given by By combining the formulas above with Th. 3 and Remark 1, we obtain the following result.

Theorem 4 For a polling system with batch Poisson arrivals operating under a branching-type service discipline combined with the exhaustive time-limited regime
with the preemptive-repeat-random strategy, the relation between the joint p.g.f. of the queue lengths at the start and the end of a server visit to Q (i) reads where, for the E-TL case, and for the P-TL case, γ (i) .

Remark 4 To apply Th. 4 to specific models, we need to find the functions T (i)
S− (s) and H (i) . As examples, we will specify these functions for two interruption rules and three branching-type strategies. For any of the six combinations of strategy and interruption rule, we can then easily find γ (i) − (z) and γ (i) + (z), with which we specify the relation between α (i) (z) and β (i) (z).
Interruption rules We consider two interruption rules, namely the preemptive-repeatrandom strategy, i.e., the server immediately leaves after the timer expires, and at the next server visit a new service time will be drawn from the original service-time distribution for the interrupted service; and the non-preemptive strategy where the server finishes the ongoing service.
For the preemptive rule, the LST of the service time of the final customer is given by and the p.g.f. of the routing probabilities by r For the non-preemptive rule, the LST of the service time of the final customer is given by and the p.g.f. of the routing probabilities by r (i) Remark 5 Conjecture 5.13 in [4], page 112, is a special case of Th. 4 combined with the preemptive-repeat-random strategy and independent Poisson arrival streams at all queues (see Remark 3). This is readily seen, since for the preemptive-repeat-random strategy the LST of a non-preempted service time is given by Eq. (16) and we can write and, for the P-TL case, γ (i) Branching-type strategy We can also vary the underlying branching-type service discipline. We focus on four disciplines, two well-known ones, the Bernoulli gated discipline and the Bernoulli exhaustive discipline, and two new ones, the 1+1 discipline introduced in Ex. 1 and the so-called 2G-gated discipline, where only first-and second-generation customers are served. Similar observations can be made for other branching-type service disciplines. First, consider the Bernoulli gated discipline, in which only first-generation customers are served. Second-generation customers have to wait until the next server visit. In this case, finding the total indirect replacement of a customer is relatively simple; all the customers who arrive during its service are indirect replacements, so H (i) Secondly, consider the Bernoulli exhaustive discipline, where every customer that arrives during a visit to Q (i) is also served during the same visit with some fixed probability q (i) for all generations. For the exhaustive case, the assumption that q (i) does not depend on the generation, means that A (i) n (z, z) defined in Eq. (13) is independent of the generation too. We, therefore, omit the index for the generation. Following the same steps as in Example 2, we find that H (i) The third example we focus on is the 1 + 1 discipline (see Ex. 1). We find, by distinguishing the cases where a first-generation customer has direct replacements or not, that As a last example for a branching-type discipline, we focus on the so-called Bernoulli 2G-gated discipline in which only first-and second-generation customers are served; in the terminology of this paper, a second-generation customer only has indirect replacements. In this discipline, the joint p.g.f. of the total indirect replacement of a family is given by

Extension
The SRS discipline discussed in this paper can be extended to cover a variant of the exponential time-limited queues introduced in Eliazar and Yechiali [9]. In this paper, the authors study exponential time-limited queues with the exhaustive service discipline with preemptive-repeat interruptions and with non-preemptive interruptions. In addition, they consider the case where customers who are present in Q (i) at the time of the interruption are served during the ongoing server visit but all customers who arrive after that time have to wait for a new visit. The interrupted service is normally finished.
In the setting of the SRS, we would not only have regular customers and a final customer but also the so-called tail customers who have indirect replacements which may be, stochastically different from the regular and the final customers. To indicate that a function is related to a tail customer, we use the subscript "=". We again give first the results for the general SRS model, then for the case of service-based indirect replacements and, finally, the results for the exponentially time-limited systems.
For the general case, it is easily verified that Eqs. (5) and (6) transform into Note that for the original variant we studied, the indirect replacement of a tail customer is just itself, so H (i) = (z) = z i . For the service-based indirect replacement discipline, it is a bit more complicated, since a final customer might have direct replacements that are served during the same visit, so we need to redefine H n z R (i) n 1 F . With this notation, we can rewrite Eq. (8) as follows: Furthermore, we have to assume that the p.g.f.'s H (i) n= (z) do not depend on the generation n; under this assumption, the results and proofs are similar to those of the theorems in Sect. 3.2.
Finally, we consider the exponential time-limited system with the Bernoulli exhaustive discipline where the probability q (i) n that a customer will visit the server does not depend on the generation of the customer. In this system, a timer interrupts the normal service. After the timer expires, all customers already present at Q (i) will be served (with probability q (i) n ) whereas customers that arrive during the visit after the interruption have to wait for the next visit of the server. In this case, the probability that the next, non-tail, customer is interrupted is given by Eq. (14) and the LST of the service time of a regular customer by Eq. (15). The service-time LST of a tail customer is given by T (i) S (s) and therefore H (i) The LST of the final customer is given by Eq. (17); however, we have to distinguish between the time of service before (denoted by T By setting , z and s 2 = Λ(z), we find that the joint p.g.f. of the numbers of indirect replacements of an interrupted customer is given by With these observations, we can find similar results as in Sect. 4.

Queue length at the start of a service and customer sojourn time
In this section, we focus on a practical application of the results developed in this paper. We first focus on the p.g.f. of the joint queue length distribution at the start of an arbitrary service for the system with general branching-type discipline (see Sect. 3.1). We also derive this joint p.g.f. for continuous-time system with servicebased branching-type discipline (see Sect. 3.3). Once we have obtained this p.g.f., we can use the techniques in [3] to find, for example, the expected sojourn time of a customer at Q (i) .

The queue length at the start of a service
In this section, we consider the system of Sect. 3.1. To find the p.g.f. of the joint queue length distribution at the start of an arbitrary visit, we need to specify the routing of the server and the switchover times of the server between queues. For convenience, we assume a cyclic routing of the server, i.e., the server goes from Q (i) to Q (i+1) , where Q (M+1) denotes Q (1) . The number of new customers during switchovers form an independent process. The joint p.g.f. of the number of new customers during the switchover from Q (i) to Q (i+1) is denoted by U (i,i+1) (z). We can now specify key equation (2) to Together with the relation between α (i) (z) and β (i) (z), found in Sect. 3 for several variants of the SRS polling systems, we can compute in a numerical experiment using an iterative algorithm α (i) (z); see, for example, [1]. Before we focus on the derivation details of the p.g.f. of the joint queue length distribution, we first determine the expectation of both N ( j) V , the number of served customers during a visit to Q ( j) , and N ( j) X , the number of times the server becomes idle during that visit. To compute E N ( j) X , observe that once the server becomes idle during a visit to Q ( j) , the probability that it becomes idle again in the same visit equals H (1), 1), where 1 is a vector of size M with all entries equal to one. Moreover, the probability that the server becomes free at least once during this visit equals α ( j) (1 ( j) ), where 1 ( j) is a vector of size M with entries equal to one except for the jth entry which equals H (i) j+ (1). Therefore, it is easy to find .
Next, since we have a stable system, E N ( j) V equals the expected number of customers that arrive to Q ( j) between the start of two consecutive server visits to Q ( j) . Customers enter the system either during a service, an extra time, or during a switchover time. This gives us the following set of equations: Note that this system has a unique solution due to the stability assumption. To find the p.g.f. of the joint queue length distribution at the start of an arbitrary service in Th. 5 below, we closely follow the arguments of Eisenberg in [7] and of de Haan in [4]. Define the following events for i = 1, . . It is readily seen that e . Next consider the average of the generating functions of the joint queue length over the first k events that occur; by the assumption that the joint queue length is ergodic, we can take the limit k → ∞ to find that where, for example, S (i) s (z) denotes the p.g.f. of the joint queue length at an arbitrary service start at Q (i) and a service starts at Q (i) . This can be rewritten as Note that S (i) s (1) equals the fraction of events that are a service start at (1) represents the joint conditional p.g.f. of the queue length at an arbitrary service start at Q (i) given a service starts at Q (i) . Analogously, define the conditional p.g.f.'s and (1), (1). Furthermore, it is readily seen that E N Since the number of starts and ends of a service, resp., extra time at Q (i) during the first k events differ at most by 1, S (i) Theorem 5 For a polling system operating under a self-ruling server discipline, the p.g.f. of the joint queue length distribution at a service start, given that the server starts a service at Q (i) , is given by . Proof Consider either a service or an extra time. The number of customers at the end of such a period is the sum of the customers that are present at the beginning of that same period plus the indirect replacement or the new customers that joined the system during that period, so we can write and as the sum of all the p.g.f.'s at the start of the extra times during a visit to Q (i) , so we can write .

Remark 6
To derive this theorem, we could also have looked at the start of a service for an arbitrary customer during a visit. For the nth served customer with n ≤ N (i) s , the number of customers at Q (i) to be served has decreased by n − 1, but there were also n − 1 replacement moments. For n > N (i) s , we should also include the replacement during (at least) one extra time followed by extra services. Elaborating along this line gives the same result. We chose to use the approach along the line of Eisenberg in [7] since this also applies in the more involved settings of the service-based strategy.

The queue length and workload at an arbitrary time
In continuous time, it is convenient to consider the cycle time, T C , of the server, that is, the time between two consecutive visit starts at, say, Q (1) . To find the expectation E[T C ], we remark that the expected number of customers served at Q (i) during a cycle of the server satisfies (cf. Eq. (18)) The expected cycle time of a server is now readily found since Lemma 2 For a polling system with batch Poisson arrivals operating under a servicebased SRS service discipline, the p.g.f. of the joint queue length distribution at a service start, given that the server is at Q (i) , is given by .

Proof
We proceed a similar way to the proof of Th. 5, where Eq. (22) replaced by S (i) e (z) = S (i) s H (i) * ± (z)/z i . This is because here we have the service-based discipline.

Remark 7
Th. 5 still holds when we assume that the members of a family are served represents the number of first-generation customers that is served during a visit and that the end of a service corresponds to the end of the service of the last customer in a family being served. In other words, the total time to serve a family is then seen as one service time.
Theorem 6 For a polling system with batch Poisson arrivals operating under a servicebased SRS service discipline, the p.g.f. of the joint queue length distribution at an arbitrary time in the above continuous-time system satisfies s (z) is given in Lemma 5. Proof Along the same lines as the proof of Theorem 1 in [3], we can write, by the stochastic mean value theorem, that Q O (z) denote the p.g.f.'s of the joint queue length distribution at an arbitrary time during a service at Q ( j) , during an extra time at Q ( j) , and during a switchover period between Q ( j) and Q ( j+1) . To find these p.g.f.'s, we have to multiply the p.g.f. of the queue length at the start of an interval by the p.g.f. of the number of arriving customers between the start and the arbitrary moment. We then find, by using Eq. (22), that and When we write the numerator of the RHS of Eq. (24) as S

Remark 8 Consider a system where customers visit only one queue. We can then write
e (z) as given in Eq. (22). Consider the marginal distribution of the queue length at Q (i) at an arbitrary epoch, that is, where 1 (i) z i is a vector of size M with entries equal to one with the ith entry replaced by z i . By multiplying this equation by the p.g.f. of the number of customers arriving to Q (i) in front of an arbitrary customer for Q (i) in the same batch, which is given by we get the p.g.f. of the queue length observed by an arbitrary customer arriving to Q (i) . This is a well-known result from batch arrival queues: the distribution at the departure of a customer equals the distribution at the arrival of a customer where we assume that the customers enter one by one, albeit at the same time.

Remark 9
Using Little's law, the expectation of W T , the sojourn time of an arbitrary customer in the system, is given by , and the expectation of W (i) T , the sojourn time of an arbitrary customer per visit to Q (i) , by Before we give the LST of the workload in the system, we introduce some notation. Let T S± (t − s) . Using these observations and following both the proof of Th. 6 and [3] leads to the following theorem.
Theorem 7 For a polling system with batch Poisson arrivals operating under a servicebased SRS service discipline, the LST of the joint workload distribution at an arbitrary time satisfies 7 Numerical results for a system with the 1 + 1 SRS discipline In this section, we apply the results from the previous section to obtain numerical results for an example system with two queues with Poisson batch arrivals; one of the queues is operating under the 1+1 SRS discipline (see Example 1) with additional idle time while the other queue is served according to the gated discipline. In the example system, there is a single server attending two types of tasks, for example, tasks A and B. All jobs need task B before leaving the system but some need also task A, where task A has to be finished before task B starts. It takes an exponentially distributed time with mean one for the server to switch from task A to B and vice versa, so that E T (AB) The server, therefore, decides to handle first a (random) number of A tasks before switching to B tasks. The served task A jobs join the task B queue. After switching, the server will handle all B tasks present at the start time of his handling according to the gated service discipline. After handling these tasks B, the server switches immediately to task A jobs. In line with the description above, we assume a 1+1 SRS discipline for task A with the probability that a task A job is the last to be processed before the server switches to task B equal to p (A) . Moreover, a job will always go to the server, both for task A and for task B, so q (A) = q (B) = 1. If the server does not decide to switch before the queue for task A is empty, he waits 2 time units for another task A job to arrive. The service times of task A have an Erlang distribution with LST T Customers arrive in batches of size N BS = 2 according to a Poisson process with rate λ = 1/3. A fraction of p TB = 1/3 of the arriving customers go directly to the queue of task B, independent of other customers. This makes the joint p.g.f. of the number of jobs in an arriving batch starting with task A and, respectively, task B, In the following, we shall determine for which p (A) the expected sojourn time of an arbitrary customer is minimal.
Before we find the best value of p (A) , we first determine its possible range. Let p (A) S be the supremum of all p (A) for which the system is stable and suppose p (A) < p This gives Obviously, for the system to be stable, ρ * < 1. Since the server switches after at most a geometrically distributed number of task A jobs, the average number of served task A jobs during a cycle is at most Combine this with Eq. (25) to find that is a necessary condition for stability. To investigate whether this condition is also sufficient, we can argue as follows: Intuitively, when p (A) is getting closer to p (A) S , the expected number of task A jobs at the beginning of a cycle will become large, which implies that P(N (A) X > 0) tends to zero and so which gives that The expected number of task A jobs that can be handled during a cycle equals 1/ p (A) > 1/ p , the expected number of task A jobs that arrive during a cycle for p (A) close to p (A) S . Hence, Eq. (26) also seems to be sufficient. For the parameters in the example system, this implies that p (A) S = 0.5. In Table 1, we present the expected queue length for task A (N A ) and task B (N B ) at the beginning and end of a visit. Table 2 contains the queue length both at the beginning of a service and at an arbitrary time. Furthermore, we present the sojourn time at an arbitrary time, where we consider the sojourn time of an arbitrary customer visiting task A (W A ), visiting task B (W B ), and in the whole system (W T ). Using a numerical search, we find that the optimal value of p (A) that minimizes the expected sojourn time is p (A) * = 0.15573.

Conclusion
We consider stable polling systems with a self-ruling server and find for these a relation between the joint p.g.f. of the queue lengths at the end of a server visit and Q (i) , and the joint p.g.f. of the queue lengths at the start of the visit to this queue for a class of polling systems with the branching-type discipline. In [1,Sec. 6], the method implementation and the test of its performance from a computational point of view is analyzed. Along the lines of [7], once we have found the p.g.f.'s at the start and end of a visit, we derive the joint p.g.f. of queue lengths at the start of a customer service. For the general pure time-limited systems with Poisson arrivals, the departures of a server can be seen as a Poisson process, which implies that the p.g.f. at the end of a visit also represents the p.g.f. of the queue lengths of an arbitrary arrival. In this case, we can derive the joint LST of the workload at arbitrary time in the queues and the expected sojourn of an arbitrary customer in the queues.
A key assumption in this paper is the customer limit, which is geometrically distributed ( p (i) is fixed per queue). As future work, it would be interesting to relax this assumption to cover customer limits with a discrete phase-type distribution. Another research direction is the determination of the stability condition of the SRS disciplines. To give an indication of why it is a study on its own, consider the following counter intuitive example, where extra arrivals make a system stable: Consider a system with two queues with the following characteristics: -independent single Poisson arrival streams at the queues with rates λ 1 (specified later) and λ 2 = 2; -at Q (1) the service time is 0, p (1) = 1, that is, the server always decides that the first customer is the final one and the time the server waits idle for a customer to arrive, if any, has an exponential time length with rate ξ = 1; -the service times at Q (2) have an exponential distribution with rate μ 2 = 4, p (2) = 1, and the server leaves immediately after becoming idle, so during a visit to Q (2) , the expected number of arrivals to Q (1) is λ 1 /4 and to Q (2) 1/2.
When λ 1 = 0, Q (1) will be empty and the expected number of extra customers to Q (2) after an idle period at Q (1) is λ 2 /ξ = 2, so Q (2) is not stable since the server serves only one customer per visit to Q (2) . On the other hand, when λ 1 = 3, both queues are stable. We can see this as follows: Q (2) will always become empty when Q (1) is full since the expected number of new arrivals to Q (2) between two visit starts at this queue is λ 2 /μ 2 = 1/2; once Q (2) is empty, Q (1) will become empty. Note that, in this case, the expected number of extra customers in Q (2) after an idle period at Q (1) will be λ 2 /(λ 1 + ξ) = 1/2. Since not every visit to Q (1) ends with an idle time, the expected number of new customers arriving at Q (2) in between to visit starts at Q (2) is less than one, which makes Q (2) stable. For some special cases of the exponentially time-limited systems, stability proofs can be found in [4,Sec. 3.3 and 3.4], which are strongly related to the stability proof of Fricker and Jaibi [10] for a class of polling systems with non-preemptive and work-conserving service disciplines. This approach is also promising for time-limited systems with general underlying branching-type service disciplines.