This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Numerical study on the deadline-concerning priority queuing model

Hang-Hyun Jo [email protected] Department of Physics, The Catholic University of Korea, Bucheon 14662, Republic of Korea
Abstract

The Barabási’s priority queuing model [A.-L. Barabási, Nature 435, 207 (2005)] and its variants have been extensively studied to understand heavy-tailed distributions of the inter-event times and the response times observed in various empirical analyses of human dynamics. In this paper, we focus on the effects of deadlines assigned to the tasks in a queue of fixed size on the response-time distributions. Here, the response time is defined as the time interval between the arrival and the execution of the task. We propose a deadline-concerning priority queuing model, in which as the deadline approaches, the priority is adjusted using the inverse of the remaining time to the deadline. By performing the numerical simulations, we find that the power-law exponent characterizing the response-time distributions is less than 11 under the deterministic selection protocol while it has the value of 11 under the nondeterministic selection protocol.

I Introduction

Recently, a huge amount of digital data on human activities and social interaction has enabled us to explore human behavior in an unprecedented way [1]. Among many other topics, non-Poissonian or heterogeneous temporal patterns of human individuals have been extensively studied for last few decades in terms of bursty human dynamics [2]. The bursty temporal patterns have been characterized by using heavy-tailed distributions of inter-event times and response times. Here, the inter-event time denotes the time interval between two consecutive events in the event sequence while the response time denotes the time interval between arrival and execution of, e.g., a task in the queue. Barabási reported in his seminal paper [3] that both the inter-event times and the response times for an individual email user follow a heavy-tailed distribution such as P(τ)ταP(\tau)\sim\tau^{-\alpha} with α1\alpha\approx 1, where τ\tau denotes either the inter-event time or the response time. Since then, a wide range of values of α\alpha have been reported based on analyses of a number of empirical datasets for human social phenomena; for example, the value of α\alpha ranges from 0.70.7 [4, 5] up to 33 [6] for mobile phone communications. For a summary of such empirical results, one can refer to Tables in Chapter 3 of Ref. [2] and references therein.

To understand the origin of heavy tails in the distributions of the inter-event times and the response times observed in the email communication dataset, Barabási proposed a priority queuing model with a queue of fixed size [3]: An individual is assumed to have a list of LL tasks, each of which is assigned a priority that is randomly drawn from a certain priority distribution. At each time step, with a probability pp, the task with the highest priority is selected; otherwise, with a probability 1p1-p, one of LL tasks is uniformly and randomly selected. The selected task is executed and removed from the list, and a new task with a random priority arrives at the list. The time interval between the arrival and the execution of the task defines the response time. Due to the task selection protocol based on the priority assigned to the tasks, some tasks with low priority have to wait longer for execution than those with high priority, leading to a power-law distribution of response times with the power-law exponent α=1\alpha=1. Note that α=1\alpha=1 is obtained only when p1p\to 1. Later, this model was exactly solved for the case with L=2L=2 [7, 8], as well as for the general LL case [9].

A number of variants of the Barabási’s priority queuing model have also been studied to understand the diverse scaling behaviors observed in various empirical analyses [10, 11, 12, 13, 14, 15, 16, 17, 2, 18, 19]. For example, a time-varying priority of the task was considered to understand the editorial review processes of papers published in Physical Review journals [20]. The priority of the task can vary depending on the context or situation. One common situation in real life is the deadline assigned to the task. The effects of a deadline for the conference on the registration behavior have been empirically studied [21, 22, 23] while how such deadlines affect the response-time distribution for the tasks has not yet been fully explored, to our knowledge. In this paper, to understand the effects of deadlines assigned to the tasks in a queue of fixed size on the response-time distribution, we introduce a deadline-concerning priority queuing model and numerically study the model to find the scaling behavior of the response-time distributions.

II Model

Refer to caption
Figure 1: Definition of the terms for task ii used in the model: Task ii with a random priority xix_{i} and a random relative deadline did_{i} arrives in time tit_{i} and is executed in time tit^{\prime}_{i}. Note that the absolute deadline is given as ai=ti+dia_{i}=t_{i}+d_{i} and that the response time is defined as τi=titi\tau_{i}=t^{\prime}_{i}-t_{i}.

We study the effects of the deadlines assigned to the tasks on their response times. We consider a model for a queue with a fixed size LL. Each task ii (i=1,,Li=1,\ldots,L) in the queue arrives in discrete time tit_{i} with a random priority xix_{i} and a random relative deadline did_{i}, leading to the absolute deadline being given as ai=ti+dia_{i}=t_{i}+d_{i} (see Fig. 1). Note that did_{i} is a positive integer and that ti=0t_{i}=0 for tasks that are initially given. The priority and the relative deadline are randomly drawn from the priority distribution P(x)P(x) and the relative deadline distribution P(d)P(d), respectively. In the beginning of each time step tt, all tasks that meet the absolute deadlines, i.e., {i|ai=t}\{i|a_{i}=t\}, are removed from the queue without execution; then, they are replaced by the same number of newly arrived tasks with random priorities and random relative deadlines. The priority of each task ii is adjusted using the information on how much time is left until the absolute deadline for tit<ait_{i}\leq t<a_{i}:

x^i(t)xiait.\displaystyle\hat{x}_{i}(t)\equiv\frac{x_{i}}{a_{i}-t}. (1)

The inverse proportion of the remaining time to the absolute deadline in Eq. (1) implies that as the absolute deadline approaches, the effective priority of the task increases. Then, with probability pp, the task with the highest adjusted priority is selected among LL tasks; otherwise, one of LL tasks is uniformly and randomly selected with probability 1p1-p. The selected task is executed at the end of the time step tt, and a new task arrives in the beginning of the time step t+1t+1 with a random priority and a random relative deadline. For the executed task ii, the response time is calculated as τi=tti\tau_{i}=t-t_{i}. This procedure is repeated until the time step reaches TT.

The case with p=1p=1 implies a deterministic selection of the task for execution while p=0p=0 means a fully random selection of the task. In our work, we will call the case with 0<p<10<p<1 the nondeterministic selection protocol. We remark that the inverse proportion of the remaining time to the absolute deadline in Eq. (1) has been introduced to explain the temporal behavior of conference registrations and fee payments [21, 22, 23]. We also note that some tasks can be executed as soon as they arrive, implying τi=0\tau_{i}=0. Finally, for the executed task ii, τi<di\tau_{i}<d_{i} by definition.

In our work, we focus on the case with uniform distributions for both xix_{i} and did_{i} as follows:

P(x)=1forx[0,1],\displaystyle P(x)=1\quad\textrm{for}\ x\in[0,1], (2)
P(d)=1Dford=1,,D.\displaystyle P(d)=\frac{1}{D}\quad\textrm{for}\ d=1,\ldots,D. (3)

Therefore, the maximum response time is set to D1D-1.

III Numerical results

III.1 Deterministic case with p=1p=1

Refer to caption
Figure 2: Response-time distributions Pp=1(τ)P_{p=1}(\tau) of the model for various combinations of LL and DD in the deterministic case with p=1p=1. In panel (a) we show the fractions of tasks with τ=0\tau=0 as a function of DD for various values of LL. In panels (b–d) we show that the distributions Pp=1(τ)P_{p=1}(\tau) collapse onto a single curve when Pp=1(τ)D2P_{p=1}(\tau)D^{2}s are plotted against τ/D\tau/D for all values of LL considered.

We first study the case with p=1p=1, i.e., the deterministic case in which the task with the highest adjusted priority is always selected for execution at each time step. We numerically simulate the model up to time T=109T=10^{9} for various combinations of LL and DD to obtain the response-time distribution Pp=1(τ)P_{p=1}(\tau), and the result is shown in Fig. 2. We find that τ=0\tau=0 is dominant in all combinations of LL and DD. For each LL, the fraction of τ=0\tau=0, i.e., Pp=1(0)P_{p=1}(0), increases with the increasing DD, which can be approximated as

Pp=1(0)1cLD\displaystyle P_{p=1}(0)\approx 1-\frac{c_{L}}{D} (4)

with an LL-dependent coefficient cLc_{L}, as shown in Fig. 2(a). Precisely, we get cLL1.22(8)c_{L}\propto L^{1.22(8)}. For a fixed LL, in the limit of DD\to\infty, one obtains Pp=1(0)1P_{p=1}(0)\to 1. The distributions for the range τ>0\tau>0 can be characterized in the following scaling form with a normalization constant CC:

Pp=1(τ)=Cταf(τD).\displaystyle P_{p=1}(\tau)=C\tau^{-\alpha}f\left(\frac{\tau}{D}\right). (5)

Here, ff denotes a cutoff function, which can be approximated as f(u)=θ(1u)f(u)=\theta(1-u) with θ\theta denoting a Heaviside step function. Naturally, the cutoff is found to be linear in DD because by the definition of the model τ\tau is limited only by DD. The power-law exponent α\alpha characterizing the scaling behavior of the response-time distributions for D=104D=10^{4} is estimated as 0.72(1)\approx 0.72(1) for L=2L=2, 0.64(1)\approx 0.64(1) for L=5L=5, and 0.60(1)\approx 0.60(1) for L=10L=10, see Fig. 2(b–d). In all cases, we find α\alpha to be less than one, which has been rarely reported in the literature [2]: α0.7\alpha\approx 0.7 was observed for the inter-event time distributions in mobile phone-call communications [4, 5]. In addition, α<1\alpha<1 for the response-time distributions was suggested in a model study considering the cost and the benefit of communication [24].

The normalization condition of Pp=1(τ)P_{p=1}(\tau) reads

τ=0D1Pp=1(τ)=1.\displaystyle\sum_{\tau=0}^{D-1}P_{p=1}(\tau)=1. (6)

Plugging Eqs. (4) and (5) into Eq. (6), one gets for D1D\gg 1

CcL(1α)Dα2,\displaystyle C\approx c_{L}(1-\alpha)D^{\alpha-2}, (7)

leading to

Pp=1(τ)D2(τD)αf(τD)\displaystyle P_{p=1}(\tau)\propto D^{-2}\left(\frac{\tau}{D}\right)^{-\alpha}f\left(\frac{\tau}{D}\right) (8)

for τ1\tau\geq 1. Therefore, the distributions for different values of DD are expected to collapse onto a single curve when Pp=1(τ)D2P_{p=1}(\tau)D^{2} is plotted against τ/D\tau/D, which turns out to be the case, as shown in Fig. 2(b–d).

Refer to caption
Figure 3: (a–c) Statistics for the executed tasks with τ1\tau\geq 1 in the deterministic case with p=1p=1, where we used L=2L=2, D=104D=10^{4}, and T=109T=10^{9}; scatter plot of (d/xd/x, τ\tau) for the first five thousands executed tasks (a), the distribution of xx for all executed tasks (b), and the distribution of dd for all executed tasks (c). (d) The estimated value of α+βx\alpha+\beta_{x} as a function of LL for the case with D=104D=10^{4} and T=109T=10^{9}. The error bars denote the standard deviations.

For understanding the results, we obtain the statistics for the executed tasks. We expect a task with longer relative deadline and smaller priority to wait longer for execution, implying a larger response time. In Fig. 3(a), we find a positive (or roughly linear) correlation between d/xd/x and τ\tau, as expected. We also measure the distributions of xx and dd for executed tasks (Fig. 3(b, c)) and find that Pex(x)xβxP_{\rm ex}(x)\sim x^{-\beta_{x}} with βx1.27(4)\beta_{x}\approx 1.27(4) and that Pex(d)dβdP_{\rm ex}(d)\sim d^{\beta_{d}} with βd1.05(2)\beta_{d}\approx 1.05(2). As the relative deadline dd affects the response time τ\tau linearly, we focus on the effect of the priority xx on τ\tau. Using the identity relation P(τ)dτ=Pex(x)dxP(\tau)d\tau=P_{\rm ex}(x)dx together with Pex(x)xβxP_{\rm ex}(x)\sim x^{-\beta_{x}} and τ1/x\tau\propto 1/x, one gets

P(τ)τ(2βx),\displaystyle P(\tau)\sim\tau^{-(2-\beta_{x})}, (9)

implying that

α=2βx.\displaystyle\alpha=2-\beta_{x}. (10)

This relation is confirmed by the estimated values of α\alpha and βx\beta_{x} from the numerical simulations for the various values of LL when D=104D=10^{4} is used, as shown in Fig. 3(d).

III.2 Nondeterministic case with 0<p<10<p<1

Refer to caption
Figure 4: Response-time distributions Pp<1(τ)P_{p<1}(\tau) of the model for various values of pp close to 11 when L=2L=2, D=104D=10^{4}, and T=109T=10^{9} are used. (a) The distributions for p0.9995p\leq 0.9995 collapse onto a single curve when the values of Pp<1(τ)/(1p)2P_{p<1}(\tau)/(1-p)^{2} are plotted against τ(1p)\tau(1-p). (b) On the other hand, the distribution for p0.9999p\geq 0.9999 develops a hump for the range of 102<τ<10310^{2}<\tau<10^{3}, which is comparable to Pp=1(τ)P_{p=1}(\tau).

Next, we study the effect of stochastic selection of the task for the case with p<1p<1. We numerically obtain the response-time distributions for various values of pp close to 11 for the case with L=2L=2 and D=104D=10^{4}, and we show the result in Fig. 4. In contrast to the deterministic case, a cutoff appears in the distribution due to the finite value of pp as long as the order of (1p)1(1-p)^{-1} is smaller than that of DD. As shown in Fig. 4(a), the response-time distributions for various values of p0.9995p\leq 0.9995 can be characterized in the following form:

Pp<1(τ)(1p)2[τ(1p)]αg[τ(1p)],\displaystyle P_{p<1}(\tau)\propto(1-p)^{2}[\tau(1-p)]^{-\alpha}g[\tau(1-p)], (11)

where gg denotes an exponential cutoff function. Here, the power-law exponent α\alpha is found to have a value of 0.99(1)\approx 0.99(1). On the other hand, in Fig. 4(b), we observe that the distribution for p0.9999p\geq 0.9999 develops a hump in the range of 102<τ<10310^{2}<\tau<10^{3}, leading to a heavier tail characterized by a smaller value of α\alpha. The distribution for the range of τ\tau for the hump is found to overlap with that for the case with p=1p=1. Therefore, we conclude that the nature of exponential cutoff in the distribution is associated with a different scaling behavior: α1\alpha\approx 1 when the cutoff is determined by (1p)1(1-p)^{-1}, while α<1\alpha<1 when the cutoff is determined by DD. Similar behavior is found for other values of LL (not shown). Finally, we remark that in the Barabási’s priority queuing model, the power-law tail of the response-time distribution appears only for the range of p<1p<1 [3, 7], whereas in our model, the scaling behavior is found even at p=1p=1.

IV Conclusion

In this paper, we have studied the effects of the deadlines assigned to tasks on the response times by focusing on the scaling behavior of the response-time distributions. We numerically find a power-law exponent less than 11 under the deterministic selection protocol (p=1p=1). Such a scaling behavior can be, to some extent, understood by means of the power-law distribution of the priorities of executed tasks with response times larger than 0. When the nondeterministic selection protocol is applied (0<p<10<p<1), an exponential cutoff in the distributions develops as it is stronger than the cutoff due to the maximum relative deadline. The power-law exponent characterizing the scaling behavior of the response-time distribution is found to be around 11. Hence, we conclude that the value of power-law exponent is associated with the nature of a cutoff. The analytical approach to understanding these numerical results is left for a future work.

Acknowledgements.
H.-H.J. was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (NRF-2018R1D1A1A09081919).

References