• No results found

Queuing on a continuous circle, a mathematical analysis of a void-avoiding optical fiber-loop

N/A
N/A
Protected

Academic year: 2021

Share "Queuing on a continuous circle, a mathematical analysis of a void-avoiding optical fiber-loop"

Copied!
50
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

MSc Mathematics

Master Thesis

Queuing on a continuous circle

a mathematical analysis of a void-avoiding optical

fiber-loop

Author: Supervisors:

Pim Bongers

dr. J.L. Dorsman

prof. dr. R. N´

nez Queija

Examination date:

(2)

Abstract

In this thesis we analyze a queueing model on a continuous circle. The model is motivated by an application in optical data transport. A processor moves with constant speed on this circle. Jobs arrive at the current location of the processor, according to a Poisson process of fixed intensity. If the server is not occupied, it immediately takes the new job into service and releases it after completing exactly one turn on the circle. If the server is occupied with a another service at the moment a job arrives, this job waits at the position of its arrival, until the first time that the server passes by without being occupied with another job. It is possible to describe the model as a polling model. An earlier study used this approach to obtain the first two moments of the queue content distribution, although the full distribution remained unknown [12]. Because exact analysis of this model proves difficult, we propose an approximation that significantly decreases the complexity of the problem. Besides presenting a performance analysis of the original model with the use of simulations, it will also be shown that the distribution of the queue content of this approximation is very similar to that of the original model. Since the approximation is based on simple arguments, the fact that the behavior of the original model matches the original model so well, is very remarkable. Therefore, the approximation contributes to a better understanding of the model.

Title: Queueing on a continuous circle - a mathematical analysis of a void-avoiding optical fiber-loop

Author: Pim Bongers, p.bongers@student.vu.nl, 10452621 Supervisors: dr. J.L. Dorsman, prof. dr. R. N´u˜nez Queija Second Examiner: dr. A.V. den Boer

Examination date: October 06, 2017

Korteweg-de Vries Institute for Mathematics University of Amsterdam

Science Park 105-107, 1098 XG Amsterdam http://kdvi.uva.nl

(3)

Contents

1 Introduction 5

Introduction 5

1.1 Optical networks . . . 5

1.2 Towards a queueing model . . . 6

1.3 Contribution and setup of this thesis . . . 6

2 Queuing theory 8 2.1 Basic queuing models . . . 8

2.2 Polling models . . . 10

3 Model 12 3.1 Model description . . . 12

3.2 Alternative state description . . . 13

3.2.1 A change of reference frame . . . 13

3.2.2 The fiber model as a polling model . . . 16

3.2.3 A generalization of the fiber model . . . 17

3.3 The fiber model as a Markov chain . . . 18

4 Analytical results 20 4.1 The first phase of the cycle . . . 20

4.2 Queue content for small loads . . . 21

4.3 Queue content for large loads . . . 24

5 Approximation 26 6 Simulation method and approximation assumptions 29 6.1 Simulation method . . . 29

6.2 Total variation distance . . . 30

6.3 The assumptions of the approximation . . . 31

6.3.1 The job locations in the approximation . . . 31

6.3.2 The claim of identically distributed job locations . . . 32

6.3.3 The claim of independent job locations . . . 34

6.3.4 The distribution of the job locations . . . 35

7 Simulation results 38 7.1 Performance of the approximation . . . 38

(4)

7.1.2 The moments of the queue content . . . 41

7.1.3 The first job location . . . 42

7.1.4 Conclusions on the usefulness of the approximation . . . 43

7.2 Interesting by-products from the simulations . . . 43

7.2.1 The sojourn time . . . 44

7.2.2 Expected busy period . . . 44

8 Conclusions 47

9 Popular summary 48

(5)

1 Introduction

1.1 Optical networks

In the last decades, the amount of data that is transported through the internet has undergone major growth [3]. Traditionally, data is converted to an electronic signal and transported through metal wires to reach its destination, where the signal is translated back to its original format [10]. In recent years, optical fibers are replacing the metal wires. With an optical fiber, the data is converted into light that passes through the fiber [23]. The angle by which the light is transmitted into the fiber is smaller than the angle of total internal reflection. Therefore, the beam of light is trapped into the fiber [13]. Optical fibers have a better performance than fibers made of copper because they can transmit the data faster, cause less loss of data and are more durable [4]. An optical data network consists of a large number of nodes, connected by optical fibers. At these nodes, the data can switch from one optical fiber to another. The end-to-end communication suffers from inefficient switching and data loss at these nodes. To reduce data loss, packets have to be placed in a buffer when two or more packets arrive at the same node at the same time [12]. This buffer can be created using optical fiber-loops [24]. If an information packet (also referred to as a job) arrives to a node of which the outgoing transmission line is unavailable, the packet is sent into an optical fiber loop. Since the job needs some time to pass through the loop, a small time delay is created before the job re-enters the location of the node where it gets another transmission opportunity. We assume that the number of jobs that can be stored in the fiber-loop, and the time that these jobs can reside in it, are unbounded. In reality, this is not the case because the capacity of the fiber-loop is limited and the quality of the signal decays with time. The time delay that is created by the fiber-loop is equal to the length of the fiber loop divided by a constant that is close to the speed of light. Because of this linear relation, the time delay of the fiber-loop will often conveniently be identified with the length of the fiber. To simplify the analysis, we choose the length of the fiber such that the time delay created by it is equal to the time a job occupies the server, which is assumed to be deterministic. In a practical setting, this assumption is quite realistic since the length of the fiber loop can be freely chosen.

A job keeps circling the fiber-loop until it finds the server available at the moment that it exits the loop. This means that sometimes the server is available, but the jobs in the loop cannot start transmission because this job is not at the same location as the server. These time intervals are called voids. Note that these voids increase the packet delays. The performance of a buffer system is determined by its scheduling policy [14]. The most common scheduling policy is the FCFS (First Come First Served). With this schedule, jobs are processed in order of arrival. In this thesis we will use an other schedule, the

(6)

so-called void-avoiding schedule. This means that packets that arrive at the server, either from the outside or from the loop, are always transmitted whenever the server is available. Thus, the voids are minimized [12]. This schedule has an advantage over the FCFS schedule. Because the voids are smaller than with the FCFS schedule, the fraction of time that the server in a void is larger. As a consequence, the expected sojourn time (the time between the arrival of a job and its departure) of jobs is smaller for the void-avoiding schedule, if we compare it to the FCFS schedule. On the other hand, the sojourn time of individual jobs can be much larger than with an FCFS schedule. In the FCFS case, the sojourn time is smaller than or equal to n voids and n + 1 transmissions. Since a void ends when the job for which the server is waiting arrives to the location of the server, it is bounded by the time it takes to circle the fiber-loop completely. Therefore, the sojourn time for a FCFS schedule, conditioned on the queue content at the moment of arrival, is bounded. This is not the case for the void-avoiding schedule since an unbounded number of externally arriving jobs can precede the service of any job that is in the fiber-loop. We therefore decrease the expected sojourn time by paying the price that individual jobs may have to wait longer.

1.2 Towards a queueing model

In this thesis, the behavior of the void-avoiding optical fiber-loop is investigated. It is shown that the the fiber-loop can be described as a queueing model on a continuous circle. We will focus on the mathematical properties of the model and will henceforth abstract from its physical background. In an earlier study, the first two moments of the distribution of the number of jobs that are in the fiber-loop and the sojourn time in the steady state were obtained, although the full distributions remained unknown [12]. The goal of this thesis is to further analyze the model. We are especially interested in the distribution of the queue content, sojourn time and the locations of the jobs in the fiber at departure instances. For readability, we will denote the void-avoiding optical fiber loop by ‘fiber model’.

1.3 Contribution and setup of this thesis

The contribution of this thesis is twofold. In the first part, we place the model in its mathematical context, describe the model analytically and illustrate why this is difficult. We end the first part by proposing an approximation that simplifies the model such that the analysis becomes much simpler. In the second part, simulations are used to verify the claims made in the first part that we were not able to prove. We also test to what extent the assumptions of the approximations are valid and compare the performance of the original model to the performance of the approximation.

This thesis is structured as follows. In chapter 2, the basic concepts of queuing models are discussed. These will play a large role in the remainder of the thesis. We will pay particular attention to polling models. In chapter 3, the fiber model is introduced further and placed in a mathematical context. We will show that the fiber model can be

(7)

described as a polling model on a continuous circle with an infinite number of queues. Chapter 4 gives the analytical results that were obtained during the research project. Since exact analysis proves difficult for this model, chapter 5 introduces an approximation that makes analysis of the model considerably easier. In chapter 6, assumptions on which the approximation is based will be tested by simulations. In chapter 7, simulations are used to compare the performance of the approximation with the original model. It will be shown that the approximation matches the original model with good accuracy. Since the approximation is based on elementary assumptions, it is very remarkable that there is such a good fit between the approximation and the original model. Since the equilibrium distributions of the approximation are much easier to obtain than those of the original model, the approximation has a large advantage in a practical setting. Finally, chapter 8 will summarize the conclusions of the thesis.

(8)

2 Queuing theory

In this chapter, we give a short introduction to queueing theory and describe the relevant notation. Queueing models will play a central role in the remainder of this thesis. In section 2.1, general queueing systems will be discussed. In section 2.2 the polling model will receive particular attention, since we will use polling models in chapter 3.

2.1 Basic queuing models

Figure 2.1: A basic queuing model [1].

In a queuing model, jobs flow through one or more buffers to be processed at one or more servers. These buffers are often called queues. Examples of queueing systems are queues in a supermarket or manufacturing processes in factories. Figure 2.1 shows a basic queuing model with a single server. The behavior of basic queuing models are characterized by several entities. The most common queueing models are determined by [19]:

• The arrival process of the jobs

The inter-arrival time is defined as the time between two successive arrivals. With most basic queuing processes, the inter-arrival times of the jobs are assumed to be independent and identically distributed. Most common are exponential inter-arrival times with parameter λ. For general distributions, we write λ = 1/E(A), where A is the stochastic variable that denotes the length of the inter-arrival times. • The service times of the jobs

The service time is the time that a job occupies the server before it leaves the sys-tem. The service times of the jobs are also identical and independently distributed in most queuing models. An exponential service time with parameter µ is most

(9)

often used. In the general case, we write µ = 1/E(B), where B is the stochastic variable that denotes the length of the service time.

• The server discipline

The server discipline specifies in which order the jobs are served. Most common is the discipline where the jobs are served in the order of arrival (FCFS), but there are many variations.

• Number of servers

In the simplest models, there is a single server. However, it is for example also possible to have several parallel servers.

• The queue size

In some cases, the size of the queue has a maximum size. In this case, jobs must be rejected if the buffer is full. The procedure that selects this job can also be varied.

More complex queuing models can also include different customer types or a network of queues [9].

Queuing models are generally denoted by the triple a/b/c [11]. The first and second letters give the distribution of the inter-arrival time and the service time distribution respectively. We use M for exponential distributions, D for deterministic arrival or service times and G for general distributions. The last element of the triple denotes the number of servers. So the M/M/1 queue is a single server queue in which the inter-arrival times and the service times have an exponential distribution. In an M/D/1 queue, the service times are deterministic. We will refer to the M/M/1 and the M/D/1 queue later in this thesis.

The load of the system is denoted by ρ = λ/µ. This parameter gives the amount of work that enters the system per unit time. If ρ > 1, there is in the long term more work entering the system than can possibly be completed. Thus the number of jobs will grow to infinity if the buffer size is unbounded. When ρ < 1, the system is said to be stable. By a balance argument, ρ is also equal to the fraction of time that the server is busy [11].

By N we denote the number of jobs in the system, including the job that is being processed. This will be called the ‘queue content’. The sojourn time of a customer, the time that passes between the arrival of a job and its departure, is denoted by S. The expected queue content is related to the expected sojourn time by Little’s law [15]

E(N ) = λE(S).

An other important property is the PASTA property: Poisson Arrivals See Time Aver-ages. This means that for exponential inter-arrival times, the distribution of a random variable at random times is equal to the distribution at arrival times. A proof of this property can be found in [26].

(10)

2.2 Polling models

Figure 2.2: A basic polling model [8].

Polling models are a special type of queuing models. In a polling model, one or more servers serve customers at various queues. Each queue can have its own inter-arrival and service time distributions. A schematic representation of a basic polling model can be found in figure 2.2. The server thus has to switch between the queues according to some, most often prescribed, policy. We have to specify two types of policies: the service policy and the routing policy. The service policy prescribes at what time the server switches between queues. The routing policy gives the order in which the queues are visited. Three major service policies are [5]:

• Exhaustive service

Under exhaustive service, the server continues to serve a specific queue until it becomes empty. At that moment, the server switches to the next queue.

• Gated service

Under gated service, the server only serves the jobs that are present in the queue at the start of the visit and ignores the jobs that arrived during its visit to this queue.

• Limited service

Under k-limited service, there are at most k jobs served at each queue before the server switches to the next queue. When this number is reached or when the queue becomes empty, the server switches to the next queue. We can also have k-limited gated service, where at most k of the jobs that are present at the arrival of the server are served.

The service policies can also be queue dependent [6] or may be dependent on customer types [7]. When the server switches between queues, there is generally a switch-over

(11)

time. This is the time it takes to go from one queue to another. This time can also be queue dependent [5].

As was mentioned above, the routing policy gives the order in which the queues are visited. Examples are [5]

• Strictly cyclic routing

Under strictly cyclic routing, the server visits the queues in a cyclic order: Q1, Q2, .., Qn, Q1, ..., Qn, Q1, ... Figure 2.2 shows an example of cyclic routing.

• Periodic routing

Under periodic routing, the queues are visited in a prescribed order, but not nec-essarily cyclic. An example is the so-called elevator routing, where the server goes back and forth in some sequence of queues [17].

• Markovian routing

Under Markovian routing, a discrete time Markov process determines the order in which the server visits the queues.

It is also possible that the routing policy is not predetermined, but that routing decisions are made with knowledge of the number of jobs in the queues [27].

In the next chapter, we will show the relation between polling models and the fiber-model.

(12)

3 Model

In this section, the fiber-model as described in the introduction will be placed in a mathematical context. In section 3.1, we show how the model can be described as a queuing system, describe the arrival process, service time distribution and introduce the terminology that plays a role in the remainder of this thesis. In section 3.2, the relation between the model and polling models is explained. Finally, we will show how the fiber model can be described as a Markov chain in section 3.3.

3.1 Model description

The void-avoiding optical fiber-loop is a queuing system where the fiber-loop has the function of the queue and the processor is the server. Contrary to for example an M/M/1 queue, the jobs are not served in FCFS-order. Instead they are served such that the voids on the outgoing channel are minimized. This means that if the processor is idle and it is possible to start the transmission of a job, this job will be transmitted directly. Because direct analysis in continuous time is hard for this model, we will use an embedding to describe the model in discrete time. Instead of observing the system in continuous time, it is observed at departure instances. The time between two successive departure instances will be called a cycle. Note that the length of a cycle is not fixed, it is a stochastic variable because the lengths of the voids are not predetermined. Each cycle consists of two phases. The first phase is an idle period. This idle phase occurs with probability one because the event where another job enters the location of the server at exactly the same time as the departure of a job has probability zero. This idle phase can occur when the system is empty, or when there is a void. In the second phase, a job is processed. At the end of the second phase, this job leaves the system.

The first phase begins just after a departure. At this time, the server is idle. The first phase ends when a job arrives to the processor, either externally or from the fiber-loop. The stochastic variable that denotes the length of this phase of the cycle will be denoted by Z or by Zi if we want to specify the duration of the first phase in the i-th cycle. At

the end of the first phase, there are two possibilities: a job arrives from the outside or a job that is already in the system emerges from the fiber-loop. Because the model is void-avoiding, a job will always be instantaneously taken into service once one of these events occur. The distribution of Z is thus determined by two distributions: the distribution of the time it takes for the first job to emerge from the fiber-loop if the system is nonempty (this will be denoted by F1) and the distribution of the time until the next externally

arriving job enters the system (A). In the remainder of this thesis, the job that will emerge first from the fiber-loop will be called ‘the first job’. The time delay between the departure instance and the emerging of this job will be denoted by ‘the location of

(13)

the first job’, because there is a linear correlation between the distance and the time delay. When the system is empty, F1 is deterministically infinite. By assumption, the

arriving jobs have an exponential-λ inter-arrival distribution. Because this distribution is memoryless, we also know that the remaining inter-arrival time at departure times has this distribution. Since the idle period ends when an arrival occurs, either from outside or from the loop and F1 and A are independent, we have Z

d

= min(F1, A). Note that

there are no other arrivals during the first phase.

The second part of the cycle begins when a job arrives at the processor and it starts processing. Since the service time of a job has a deterministic duration of 1/µ, this phase will also have a length of 1/µ. During this time, other jobs arrive according to a Poisson Process with rate λ. Because the server is busy, these jobs are transmitted into the fiber-loop. Since the duration of the second phase is equal to the time delay of the fiber-loop and jobs arrive according to a Poisson process, the locations of all the jobs that arrived during the second phase of the cycle have a uniform distribution on [0, 1/µ) when observed at the next departure. At the end of the second phase, the job that is being processed in the second phase leaves the system.

This cycle description will play a large role in the analysis of the model, because we will observe the fiber model at departure instances in the remainder of this paper. By PASTA, we know that the arriving jobs observe the queue content with the same dis-tribution as at random moments. By a balancing argument, this can be extended to departure times [19]. This implies that if the distribution for the queue content at departure instances is known, we also know the distribution at arbitrary times.

3.2 Alternative state description

In this section, we describe the model from a different viewpoint. We will use this in subsection 3.2.2 to show the relation between the fiber-model and polling models. This approach can be used to perform, to a certain extent, exact analysis on the model [12].

3.2.1 A change of reference frame

The fiber model is a queuing model where the processing of a job can only start at specific time points. If a job cannot be transmitted instantly on arrival, it is transmitted into the fiber-loop and will circle it an integer number of times because a job cannot be transmitted while it is positioned in the fiber-loop. Because the jobs are all passing through the fiber-loop with the same speed, their positions with respect to each other do not change. This means that, if the system is observed from the viewpoint of a job, the job locations remain stationary and the processor moves around. This fact leads to a new description of the model, where the jobs have a fixed location and the processor moves. If the jobs move in a counterclockwise direction in the original viewpoint, the processor moves in the opposite direction when the frame of reference is changed. Because the jobs arrive at the location of the processor, their (now fixed) position on the circle is determined by the location of the processor at the time point of their arrival. Because

(14)

Figure 3.1: A simple visualization of the two reference frames. The figure on the left shows the original model, where the jobs move along the circle. On the right, the new frame of reference is depicted, where the job locations are fixed and the server moves. In this figure, the incoming and outgoing fibers are omitted.

a processor is usually referred to as a stationary object, we will henceforth refer to it as a server. The two reference frames are visualized in figure 3.1.

Because the jobs have to pass the circle an integer number of times, the processing of a job can only begin at multiples of 1/µ after its arrival time. Because the processing time is deterministically equal to 1/µ, the sojourn time will also be a multiple of 1/µ. Consequently, the presence of a job in the system is only relevant at very specific times: only when a job is at the same location as the processor. This means that, in the new reference frame, the location of the server at a departure time is the same as the location where the transmission started. We show the importance of this fact later on.

Next, the phases of the cycle in the new frame of reference are described. At a departure instance, the server is idle and moves in a clockwise direction. The job that is closest to the server in a clockwise direction is therefore a candidate to be processed next. This is the ‘first job’ described in the previous section. If an externally arriving job enters the system before the server reaches the first job, this incoming job will start processing. In both cases, the server moved a distance Z in a clockwise direction in the first phase. In the second phase, a job is being processed while the server is turning a full circle. During this phase, external jobs arrive with a Poisson-λ process at the location of the server. Since the duration of the second phase is 1/µ, there are a Poisson-ρ number of arrivals in the second phase. Because these jobs are positioned according to the location of the server at the moment of arrival, the jobs that arrive during the second phase are positioned according to a uniform distribution when observed at the end of the second phase. At the end of the second phase, there is a departure. To illustrate the behavior of the model in the new frame of reference, one possible realization of the process is shown

(15)

Figure 3.2: A possible realization of the process in the frame of reference where the jobs are fixed at their arrival locations and the server rotates in a clockwise direction. The thick line depicts the location of the server and the thin lines mark the job locations.

in figure 3.2. In figure (a), three jobs are present at some departure instance. The server is thus idle and waits for the next job. Because the server reaches job 1 before there is an external arrival, this job is processed (b). During the processing of job 1, there is one arrival, job 4 (c). After the processing of job 1, the server is idle again. Before the server can reach job 2, job 5 arrives and is processed (d). During the processing of job 5, there are no further arrivals (e). The idle server reaches job 2 and starts processing it (f).

The new frame of reference allows us to give an intuitive sketch of the behavior of the model. Later on, the described properties will be confirmed by simulations. The length of a cycle is equal to

(16)

This implies that, when the server is observed at two successive departure times, one sees a displacement of

(Z + 1/µ) mod 1/µ = Z mod 1/µ.

If this value is small, the server will process jobs in a small part of the circle for a relatively long time. We therefore define ‘the mobility’ as

E Z mod 1/µ.

Let the job density be defined as the expected number of jobs in a particular section of the fiber, divided by the length of this section. In the new frame of reference, we see that the processor always picks up jobs in front of itself and leaves a relative empty space behind. Therefore, the job density in front of the job that is currently being processed should be larger than the density just behind it and this difference should be larger when the mobility is smaller. As we will see later on, the expected queue content will increase when the load increases. If there are more jobs in the system, Z is likely to be smaller. This implies that the mobility becomes smaller when the load decreases. This thus leads to a larger accumulation of jobs in front of the server location. When the load is small, the server has a larger mobility. This means that the sections where jobs are taken into service are changing relatively quick. Thus, the job density as a function of distance to the server will approach uniformity in the limit where ρ goes to zero. If the load is larger than or equal to one, the queue content will grow to infinity. Therefore, E(Z) is arbitrarily close to zero when time goes to infinity and the server will be completely stationary. Since the location of the arriving jobs is uniform, the density of jobs is also uniform when observed at departure times. However, we do not allow the load to be larger or equal than one in this thesis because we want the system to be stable.

The new state description allows an ordering in the service of the jobs. Although the jobs are not processed in FCFS-order, we know that the jobs that are on the circle will be processed in a fixed order because jobs are always picked up in front of the position of the job that was previously processed. This ordering will be in clockwise direction, starting from the location of the job that is currently being processed. If we look at figure 3.2, we see that job 1 will be processed before job 2 and job 3 before job 4. This FCFS order is only interrupted by jobs that arrives from the outside. In our example in figure 3.2, job 5 interrupts the FCFS order, but this does not change the ordering of jobs 1 up to 4 with respect to each other.

3.2.2 The fiber model as a polling model

Another advantage of the fixed job locations is that it allows the model to be described as a polling model [12]. To this end, the fiber-loop is divided into k disjoint subsections of the form In= n − 1 kµ , n kµ  n ∈ {1, 2, 3, ...k}.

Each of these subsections behaves as a single queue, we do not distinguish the locations of jobs within a certain subsection of the fiber-loop. The arrival of jobs are discretized

(17)

accordingly. Arrivals can only occur when the server enters a section. If there would have been more than one arrival in the continuous model, this is translated to a batch arrival in the discretized model. Of course, the probability that this occurs goes to zero, in the limit where k goes to infinity.

Because the service time is equal to the time it takes to go through the fiber loop, the location of the processor at a departure will be identical to the location where the processing of this job started. This implies that the next job that is processed will be in the same queue as the one that is previously processed, if there is a job available there. The server processes jobs that are in the same queue, until the queue is completely empty. We thus have a polling model with an exhaustive service. Jobs can only arrive at the server location. This implies that, when a job is being processed, jobs arrive according to a Poisson−λ process in a cyclic manner in the second phase. The switch over time is equal to 1/(µk), such that the time to pass the entire circle is 1/µ. The original model is retrieved by taking the limit k → ∞. In a previous study, this approach was used to find the mean and variance of the queue content and the sojourn time [12]. For the queue content, the following results were obtained:

E(N ) = ρ 1 − ρ, (3.1) Var(N ) = ρ 6 4 − ρ (1 − ρ)2 + ρ(2 − ρ) 6 . (3.2)

We observe that the expected queue content is the same as that of an M/M/1 queue, although the variance has a different expression. For the sojourn time, we have:

E(S) = 1

µ(1 − ρ), (3.3) Var(S) = ρ

µ2(1 − ρ)2. (3.4)

The expectation and variance of the sojourn time corresponds with the distribution of 1

µ(1 + X) (3.5) where X has a geometric distribution with success parameter 1 − ρ on Z+. Later, we will see that numeric data the hypothesis that the sojourn time is related to a geometric distribution via equation (3.5)

3.2.3 A generalization of the fiber model

We have seen that the assumption that the time delay of the optical fiber buffer is equal to the deterministic processing time of the jobs is essential for the analysis. Otherwise, the location where a job leaves the system is not the same as the location where the transmission started. This means that the server switched to a different queue. However, the approach of using polling models can be extended to the case where the service time

(18)

is a multiple of the optical fiber length. Here the server location at the beginning of the service is still equal to that at the end of the service. Thus, the model can still be described as a polling model with exhaustive service. If the service time is not a multiple of the time delay of the fiber-loop, the polling model does not have exhaustive service. Instead, the server moves to another queue after every service completion. The order in which the queues are served is periodic, but not strictly cyclic. We thus have 1-limited service with periodic routing. In this situation, the switch over times are unequal to 1/(kµ). If the service time is not deterministic, we have a 1-limited polling model with Markovian routing. In all these cases, the analysis becomes significantly harder. This is the reason why we assume that the time delay of the optical fiber is equal to the deterministic service time.

Although the description of the fiber model as a polling model proves useful to determine the first two moments of the queue content and the sojourn time, we did not manage to find new results by it. Therefore, the original frame of reference (where the jobs move), is used in the remainder of this thesis. One concept that can be translated back to the original model is the fact that the order in which the jobs that are currently in the system are served is known. There may be other jobs that arrive in between these jobs, but their relative order does not change. This will prove to be a useful concept later on.

3.3 The fiber model as a Markov chain

In this section, we indicate how the model can, or cannot, be described as a Markov process. We indicate that the queue content alone is no Markov chain. This important observation makes the analysis of the model considerably more difficult and will play a large role in the remainder of this thesis. In section 4.2, we will show that the queue content is a Markov chain, in the limit where the load approaches zero. We will use this to find the distribution of the queue content in this limit. In chapter 5, we will also come back to the question whether the queue content can be described as a Markov chain, if we make some additional assumptions.

To describe the fiber model at departure instances as a discrete time Markov chain, it is necessary to have information on the queue content and the location of the jobs within the fiber. If the system is observed at random times, it is also necessary to include the remaining processing time of the job that is currently being processed in the state description. Because the state description is uncountable, it is difficult to write down the transition kernels or find the equilibrium distribution. Therefore, we will not use this approach.

The queue content at departure times (Nt), without the knowledge of the locations of

these jobs within the fiber, is not a Markov process. To show this, we consider three time points, with two cycles in between. To show that Nt is not a Markov chain, it

suffices to show that

(19)

We will now give some insights into why equation (3.6) holds. Suppose that Nt is a

Markov chain. The probability that the first phase of the cycle ends with an arrival from the outside is determined by the first job location F1 and the parameter λ because

Z = min(Fd 1, A). Since the number of arrivals in the second phase of the cycle is

Poisson-ρ distributed, these arrivals are independent of N . This implies that the transition probabilities of the Markov chain are fully determined by the distribution of F1. Thus,

the distribution of F1 at t = 2 given that there are n2 jobs in the system should only be

dependent on n2 and not on n1. However, if n1 = 0 we know that the location of the

jobs in the fiber at time t = 2 will be uniformly distributed. If N1is larger than zero, one

will observe a larger density in front of the server. The difference of these distributions affect the distribution of F1 in the second cycle. In the first case E(F1) is larger than in

the second case. Therefore, we conclude that (3.6) is true and Ntis therefore no Markov

(20)

4 Analytical results

The fiber model is difficult to analyze. As was described in the previous chapter, the model is a polling model with an infinite number of queues in which arrivals only occur at the location of the server. To allow direct analysis of a polling model, it is essential that the model satisfies the so-called branching property. The branching property states that, between two successive visits to the same queue, all the jobs in the system are replaced in an i.d.d manner by some distribution h. In [20] it is shown that if a polling model satisfies the branching property, exact analysis is possible. If a model does not satisfy this property, exact analysis is generally not possible, except for some special cases. Since the branching property is satisfied for our model, analysis could be performed if the distribution of h would be known. However, since our model has a more complex arrival process than the standard processes described in [20], analysis of our model is very difficult.

The complexity of the model defies a complete analysis of its performance. In this thesis, a better understanding of the model was obtained through other means than exact analysis. However, some analytical results were obtained during this project, they are presented in this chapter.

4.1 The first phase of the cycle

The expectation of the duration of the idle phase Z and the probability that this phase ends with an arrival can be obtained by simple balance arguments.

Theorem 1.

E(Z) = 1 − ρ µρ

Proof. The expected number of arrivals in a cycle is equal to λ(1/µ + E(Z)), the arrival rate multiplied by the expected cycle duration. There is precisely one departure in each cycle. Because stability is assumed, the average number of arrivals equals the average number of departures. Consequently, we have

λ 1 µ + E(Z)  = 1. This gives E(Z) = 1 λ− 1 µ. (4.1)

(21)

If we compare this result to equation (3.1), can make a remarkable observation. Corollary 1. E(Z) = 1 µ E(N )

The expected value of Z is thus equal to the time delay of the fiber loop, divided by the expected queue content. Since this result is so simple, there should be an intuitive reason behind this result. The intuitive arguments do not seem straightforward, and thus form an interesting topic for future research.

Similar to the derivation of E(Z), we can also find an expression for P(Z = A): the probability that the first phase of the cycle ends with an external arrival.

Theorem 2.

P(Z = A) = 1 − ρ

Proof. Since the number of jobs that arrive to the system during the second phase of a cycle is Poisson-ρ distributed, the expected number of arrivals in a cycle is given by

ρ + P(Z = A).

Because there is one departure in a cycle, we have by stability ρ + P(Z = A) = 1

and therefore obtain

P(Z = A) = 1 − ρ.

4.2 Queue content for small loads

Exact analysis can be performed in the limit where the load is infinitesimally small. In this limit, the probability that there are more than two customers in the system can be neglected. Moreover, the probability that the system is empty will approach one when the load approaches zero. We will show that the mean and variance of the queue content in this limit agree with the results from [12] up to first order terms. Although this does not give new results, the proof will be considerably shorter than the one given in [12].

Theorem 3. The expectation and variance of the queue content agree with (3.2) and (3.1) up to first order terms.

Proof. When the load approaches zero, the queue content at departure times can be very closely approximated by a discrete time Markov process. As described in chapter 3.3, Nt is not a Markov process because the distribution of F1 depends on the full history

(22)

implies that, when there is a job present in the fiber-loop at a departure instance, this job has arrived during the second phase of the previous cycle with a probability that converges to one when the load becomes arbitrarily small. Therefore, we know that this job location has a uniform distribution. As a result, F1 has a fixed distribution that is

almost independent on the history of the queue content and the queue content becomes a Markov process. Because we can neglect all states with more than one job in the system at departure instances, we only need to compute the transition probabilities for the states N = 0 and N = 1. We define the transition probabilities of the Markov chain as

p(i, j) = P(Nk= j|Nk−1 = i)

for k ∈ N. By the Markov property, p(i, j) is independent of k. Suppose there is a job in the system at a departure instance. The system will only be empty at the next departure instance when there is no outside arrival during the full cycle. Suppose that the job is located at position x. Since there is no external arrival, the idle phase will end when the job reached the server. Thus, cycle length will in this case be equal to

1 µ+ x,

Therefore, the number of jobs that have arrived during this cycle has a Poisson-λ(1µ+ x) distribution. This means that the probability that there are no arrivals in this cycle, given that the first job is located at x, is given by

px(1, 0) = (λ(µ1 + x))0exp(−(λ(1µ+ x))) 0! = exp(−(λ(1 µ+ x))) = 1 − (λ( 1 µ+ x)) + O (λ( 1 µ + x) 2.

When the load is very small, we can ignore the higher order terms, because in that case λ(1µ+ x) will approach zero:

λ(1 µ+ x) ≤ λ( 1 µ+ 1 µ) = 2ρ.

(23)

Since x has a uniform distribution on the interval 1/µ we have p(1, 0) = 1/µ Z 0 px(1, 0) · 1 1/µ − 0 dx ≈ 1/µ Z 0  1 − λ(1 µ + x)  · 1 1/µ − 0 dx = 1/µ Z 0  1 − λ(1 µ + x)  · µ dx = 1/µ Z 0 µ − λµ(1 µ+ x) dx = 1 −   λµ · 1/µ Z 0 1 µ+ x dx    = 1 − λµ x µ+ x2 2 1/µ 0 = 1 − λµ 3 2µ2  = 1 −3 2ρ.

Using that when considering only two states, we have p(1, 1) ≈ 1 − p(1, 0) ≈ 3

2ρ.

When the system is empty at a departure instance we know that there will be a Poisson-ρ number of jobs at the next departure time. Thus, we have

p(0, 1) ≈ρ

1e−ρ

1! = ρe

−ρ = ρ · (1 − O(ρ)) = ρ + O(ρ2)

We thus obtain the following first order terms p(0, 1) ≈ρ, p(0, 0) ≈1 − p(0, 1) ≈ 1 − ρ, p(1, 0) = 1 −3 2ρ, p(1, 1) = 3 2ρ.

(24)

Using the detailed balance equation, we can obtain the equilibrium distribution. ρP(N = 0) ≈  1 −3 2ρ  P(N = 1) P(N = 0) + P(N = 1) ≈ 1. This gives E(N ) ≈ P(N = 1) ≈ 2ρ 2 − ρ Var(N ) ≈ P(N = 1)(1 − P(N = 1)) ≈ 2ρ 2 − ρ  1 − 2ρ 2 − ρ  = 2ρ1 −2−ρ2ρ  2 − ρ = 2(2 − 3ρ)ρ (2 − ρ)2 .

Simple calculus yields lim ρ→0E(N ) = 0 lim ρ→0Var(N ) = 0 lim ρ→0 d dρE(N ) = limρ→0  d dρ  2ρ 2 − ρ  = lim ρ→0 4 (2 − ρ)2 = 1 lim ρ→0 d dρVar(N ) = limρ→0  d dρ  2(2 − 3ρ)ρ (2 − ρ)2  = lim ρ→0 4(5ρ − 2) (2 − ρ)3 = 1.

These values agree with (3.2) and (3.1).

4.3 Queue content for large loads

Now that we have described the system for very small loads, we want to analyze the limit where the load approaches one. However, the distribution of the queue content is much more difficult to obtain for large loads. In this section, we will give some insights into why this is more complicated.

As was described in section 3.2, the expected queue content is arbitrarily large when the load approaches one. This implies that the expected value of Z will become arbitrarily small, the processor becomes immobile and there will be a large density of jobs just in front of the location of the job that is being processed.

Since the idle periods become very small, one could reason that the model will behave like an M/D/1 queue. However, this is not the case. The expected number of jobs in an M/D/1 queue is equal to [18]

E(NM/D/1) = ρ +

ρ2 2(1 − ρ), where the fiber model has an expected queue length of

E(N ) = ρ (1 − ρ).

(25)

This means that we cannot describe the fiber-model as a M/D/1 queue for large loads. We observe lim ρ→1 E(N ) E(NM/D/1) → 2.

This difference can be explained by the fact that the locations of the jobs in the system are not independent. This independence plays a more dominant role for large ρ, as will be shown in chapter 6. This dependence suggests that our system cannot be approximated as a Markov Chain for large ρ. This makes it harder to study the limit ρ → 1 compared to the limit ρ → 0.

(26)

5 Approximation

Because direct analysis for our model is difficult, we will use other approaches to charac-terize the model. In this thesis, two alternative methods are presented. The first method is to perform direct simulations of the model, which yields numerical data that gives in-sight into the behavior of the model. The other method is to add assumptions that make the analysis of the model less complicated. If the behavior of the approximated model is similar to that of the original model, the original model can be better understood. Moreover, the approximation can be advantageous in practice. If the performance of the approximation can be assessed much faster than direct simulations of the original model, it is more efficient to use the approximation.

In this chapter, a simple approximation is presented. Originally, this approximation was meant to be a first, very rough, estimation of the model. The idea behind the approx-imation originates from our earliest attempts to perform exact analysis on the model. The most important reason why direct exact analysis is difficult is that the queue content alone cannot be described as a Markov process. An important reason why the queue content process is not a Markov process is that the job locations in the fiber are not in-dependent. To get a better understanding of the behavior of the model, we assume that the job locations are independent and identically distributed and compare this model to the original one. As we we will make precise in chapter 7, there is a good fit between the approximation and the original model. This makes it unnecessary to improve or expand the approximation.

From this point onwards, we will assume that µ = 1, which means that ρ = λ. The reason behind this assumption is that the simulations are simpler if we have one degree of freedom less. Since µ is just a time scale, we can fix it without changing the essential behavior of the model.

As was mentioned above, we assume that the job locations at departure instances are independent and identically distributed. We present the distribution without motivation in this chapter, because it is motivated by numerical simulations. In the next chapters, we will present the motivation for the chosen distribution, alongside other numerical results that were obtained during the project.

Let X be the random variable that denotes the position of an arbitrary job at an arbi-trary departure instance, where the server is located at x = 0. Note that we are using the original frame of reference. We assume X to have the following distribution:

f (x) := P(X ≤ x) = −ρx2+ (1 + ρ)x. (5.1) We use the lowercase notation instead of a capital letter, because we want to avoid potential conflicts with the F1 we previously defined. We have argued in chapter 3 that

(27)

because the positions of the jobs in the system are not mutually independent. However, this issue is circumvented if we use the approximation. Since the distribution of F1 only

depends on the number of jobs that are currently in the system and not on the full history of the process, Nt becomes a Markov process. Since we will be able to derive

the transition probabilities analytically, the equilibrium distribution can be obtained by solving a system of linear equations.

As described in chapter 3, each cycle consists of two phases: an idle period and the processing of one job. In the first phase, there is one arrival if the first phase of the cycle ends with an external arrival. Because Z = min(Fd 1, A), this probability is equal

to P(F1 > A|N = n), where we should recall that F1 is infinite when the fiber-loop is

empty. In the second phase, there are a Poisson-ρ number of arrivals. At the end of the second phase, there is a departure. This implies that the difference in the queue content between two successive departure instances is given by

∆N = B + C − 1, (5.2) where B has a Bernoulli distribution with success parameter P(F1 > A|N = n) and C

has a Poisson distribution with parameter ρ. The transition probabilities of Ntare thus

given by

p(ni, nj) := P(Ni= ni|Ni−1= ni−1)

= P(∆N = ni− ni−1)

= fP(ni− ni−1+ 1) · (1 − P(F1 > A|N = ni−1))

+ fP(ni− ni−1) · P(F1> A|N = ni−1)

(5.3)

Here, fP(k) is the probability mass function of a Poisson(ρ) process. That is

fP(k) :=

(ρke−ρ

k! k ≥ 0

0 k < 0.

When N = 0, the first phase of the cycle will always end with an outside arrival because the fiber-loop is empty. Thus

P(F1 > A|N = 0) = 1

and therefore

p(0, n) = fP(n)

Because (F1|N = n), is the minimum of n independent drawings from the distribution

X, we have by equation (5.1) for n ≥ 1

Hn(x) := P(F1 ≤ x|N = n) = 1 − (1 − f (x))n= 1 − (1 + ρx2− (1 + ρ)x)n (5.4)

and the corresponding probability density function hn(x) :=

d

dxHn(x) = −n · (2ρx − 1 − ρ) · (1 + ρx

(28)

Because the arrival process is an Poisson process, we have A(a) := P(A < a) = 1 − e−λa= 1 − e−ρa, This allows us to compute for n ≥ 1

P(F1> A|N = n) = 1 Z 0 A(x)hn(x)dx = Z 1 0 1 − e−ρx · −n · (2ρx − 1 − ρ) · (1 + ρx2− x(1 + ρ))n−1 dx. (5.5) When the value of n is given, this integral can be solved with repeated integration by parts. It is more challenging, and perhaps impossible, to give an analytic expression for general n. A general analytic expression was thus not obtained. For n = 1 and n = 2, we find P(Z = A|N = 1) = e −ρ(eρ− ρ − 1) ρ P(Z = A|N = 2) = 14 + (ρ − 6)ρ − 2e −ρ(7 + ρ(4 + ρ)) ρ2 .

If we combine (5.5) with (5.3), we obtain the transition probabilities of the number of jobs in the system for the approximation. Because P(F1 > A|N = n) has a complicated

form, it is very difficult to find the stationary distribution of the Markov process, unless we truncate the state space. Therefore, it is numerically approximated in the next chapter.

We have seen in section 4.2 that the job locations are i.i.d. when the load is infinitesimally small. This implies that the approximation will be exact for these very small loads. This observation will be confirmed in chapter 7 by numerical results.

(29)

6 Simulation method and approximation

assumptions

In the previous chapter, a simple approximation was presented. In this chapter, simu-lations are used to test the validity of the assumptions on which the approximation is based. First, we will introduce the general simulation method and some notation. In the next chapter, we present the results from the simulations.

The chapter is structured as follows. In section 6.1, the simulation method for the origi-nal model is explained. Next, we introduce the total variation distance in section 6.2. We need this measure when we compare the approximation to the original model in chapter 7. In section 6.3, the assumptions on which the approximation is based are tested with simulations of the original model.

6.1 Simulation method

In this section, the essence of the simulation method will be described. All simulations were performed in Matlab. We assume that the location of the server is fixed at x = 0. Just like we did in the previous chapters, we will embed the process at departure instances.

The simulations start with an empty system. After every cycle, the locations of the jobs in the fiber-loop are stored in an array. The construction of the new array uses the two cycle phases that were described in chapter 3. We will briefly discuss the essence of the used code. Let Fi be the array that stores the locations of the jobs at the i-th departure

instance. So

Fi = (Fi,1, Fi,2, ..., Fi,n),

when the queue content at the i-th departure instance is equal to n. Moreover, let E be an exponential-λ random number, R a Poisson-ρ random number and A a vector length R whose entries are independent random numbers from a uniform distribution on [0, 1).

(30)

Then, Fi+1is constructed as follows.

if E < Fi,1

Zi+1= E

Fi+1= sort((Fi− Zi+1) ∪ A)

else

Zi+1= Fi,1

Fi+1= sort( Fi/Fi,1− Zi+1 ∪ A)

end Where we define,

B − c = (b − c ∀b ∈ B) B/C = (b ∈ B : B 6∈ C).

The sort function rearranges the indices of the array such that its elements have an increasing order. If E < F1, there is an outside arrival at the end of the first phase.

The remaining jobs are rotated with a distance Zi in a counterclockwise direction. It is

not necessary to add the job that arrived in the first phase to the array, since it will be removed at the end of the second phase.

If E ≥ F1, a job emerges from the fiber-loop before the first arrival from the outside.

Again, the locations of all the jobs are shifted with this time delay in a counterclockwise direction. Next, we add the Poisson arrivals and the job that has been processed (Fi,1)

is removed.

Fi and Ziwere stored for later analysis. The simulations were performed for ρ from 0.01

to 0.99, with steps of 0.01. Each simulation consists of 10,000,000 cycles for ρ ≤ 0.9 and 1,000,000 cycles for ρ > 0.9. These values are chosen such that there is sufficient data, while the computation time of the simulation is still reasonable. That is to say, between 25 minutes when ρ is close to zero and three hours when ρ is close to one.

6.2 Total variation distance

In the remainder of this chapter, we will use the total variation distance to measure the difference between two probability distributions. The formal definition needs a measure theoretic background. In [2], the formal definition of the total variation distance can be found, [21] introduces the relevant measure theoretic principles. Because we will use the total variation distance only in discrete state space, we do not need the measure theoretic version. If we want to measure the distance between two probability distributions, there are many options available [25]. We use the total variation distance in this thesis for it’s simplicity and intuitive background. The total variation distance gives the largest difference between two probability distributions. If Ω is a finite state space and F is the set that contains all subsets of Ω, the total variation distance between PU and PV is

defined as

δ(PU, PV) = max

(31)

This can be interpreted as the difference between the two probability distributions in the worst-case-scenario. With the use of basic properties of discrete probability distributions and the triangle inequality, this can be rewritten to

δ(PU, PV) = 1 2 X i∈Ω |PU(i) − PV(i)|. (6.1)

When the distributions are not discrete, we can divide the state space into finitely many parts to approximate the total variation distance with equation (6.1).

6.3 The assumptions of the approximation

In this section, we test the validity of the assumptions on which the approximation is based. For the approximation we assume that the locations of the jobs at departure instances are independent and identically distributed according to the distribution given in (5.1). This section will assess to what extent these claims are valid. First, we explain the origin of the distribution in equation (5.1). Thereafter, we will show that the distri-bution of the jobs are not independent and identically distributed. However, for small loads, the assumptions are reasonably valid.

6.3.1 The job locations in the approximation

From the simulations of the original model, the locations of the jobs in the fiber at departure times were obtained for a large number of cycles. From this data, it is possible to numerically extract the distribution of the location of an arbitrary job at an arbitrary departure instance. Here, the definition of ‘an arbitrary job’ must be well-defined. One option is selecting one arbitrary job at each departure instance, if the system is nonempty. This approach did not yield satisfactorily results. Although the distributions seemed to have a quadratic form, the coefficients as a function of ρ could not be determined with sufficient precision because every cycle contributes only one job location in that case. Therefore, a large number of simulation runs is needed to obtain precise results.

We choose another approach to find the distribution of the job locations. Instead of selecting one job location after each cycle, all job locations at all departure times were used to determine the distribution of the customers. These distributions seemed similar to

f (x) := P (X ≤ x) = −ρx2+ (1 + ρ)x. (6.2) To quantify how well the distribution of the selected jobs agrees with equation (6.2), the total variation distance was used. Because the total variation distance is simple to compute for a discrete state space, the fiber length [0,1) was divided into a hundred different intervals of equal length. In practice, this value was sufficiently large because the errors that originated from this discretization are much smaller than the obtained total variation distance. Let I = [a, b) be such an interval. We have to specify which equilibrium distributions we use for the computation of the total variation distance. Be-cause the job locations of the approximation are distributed according to the cumulative

(32)

Figure 6.1: The total variation distance between the simulated job locations and the proposed distribution, given in equation (6.2).

distribution function in (6.2), the probability that a job is positioned in the interval [a, b) is given by

PU(x ∈ [a, b)) = f (b) − f (a).

We want to compare this distribution with the results from the simulations. We define PV(x ∈ [a, b)) = the fraction of simulated job locations that has a position in [a, b).

The total variation distance, as a function of ρ, is given in figure 6.1. For ρ < 0.1, the total variation distance was smaller than 0.012, for ρ ≥ 0.1 the total variation distance was smaller than 0.005. The larger total variation distance for small loads can be explained. For these loads, the fraction of time that the system is empty is large. Since PV is a

stochastic variable (it is a result from simulations), PV will be more uncertain when ρ

is small. The obtained total variation distances were sufficiently small for our purposes. Therefore, (6.2) was chosen as the distribution of the job locations at departure instances in the approximation.

6.3.2 The claim of identically distributed job locations

We assumed that the job locations at departure instances (X) are i.d.d. If this is true, we have

P(X ≤ x|N = n) = P(X ≤ x) = f (x)

for all n ∈ N. Figure 6.2 shows that this assumption is not true for ρ = 0.8, but that the differences are still relatively small. Therefore, it may well be that the approximation

(33)

describes the data with sufficient accuracy. For other loads, we observed similar behavior. From the simulated distributions, we can deduce that P(X ≤ x|N = n) becomes larger when n assumes larger values. We also see that the cumulative distribution functions of (X|N = n1) and (X|N = n2) only intersect at (0,0) and (1,1) if n1 6= n2. The data also

suggests that

lim

n→∞P(X < x|N = n) (6.3)

exists because, when n assumes larger values, the cumulative distribution functions of (X|N = n) and (X|N = n + 1) get very close together. This can also be seen in figure 6.2. We did not find a proof on this point or obtained an intuitive reasoning behind this result or obtained an expression for (6.3). The approximation can be improved by

Figure 6.2: The distribution of the job locations at departure times, given that there are n jobs in the system for ρ=0.8.

using distributions for the job locations that are dependent of N . However, the simula-tion did not generate sufficient data to approximate P(X ≤ x|N = n) with satisfactory precision. Moreover, using P(X ≤ x|N = n) instead of P(X ≤ x) for the approxima-tion would make the transiapproxima-tion matrix of the Markov chain considerably more difficult. Since the assumption of independence will not be valid either, a better understanding of the distribution of the job locations may not lead to a significant improvement of the approximation of the model. Therefore, we did not try to improve the approximation by using P(X ≤ x|N = n) instead of P(X ≤ x).

(34)

6.3.3 The claim of independent job locations

Figure 6.3: The correlation coefficient of Q1 and Q2 as a function of ρ.

In this section, we test the claim of independent job locations. If the job locations at departure times are indeed independent, the random variables that denote the amount of jobs in two disjoint intervals are also independent. Therefore, we define Q1 and Q2 to

be the random variables that give the number of jobs at departure instances in [0, 0.5) and [0.5, 1) respectively. A way to characterize the dependence of these two stochastic variables is the correlation coefficient. The correlation coefficient of two random variables X and Y is given by

c(X, Y ) := Cov(X, Y ) σXσY

and takes values in the interval [−1, 1] , σX and σY denote the standard deviations of X

and Y respectively [22]. When two random variables are independent, the correlation co-efficient is zero. When two random variables are a.s. identical, the correlation coco-efficient is one. A positive correlation coefficient means that Q2 is more likely to assume a larger

value if Q1 is large and vice versa. A negative correlation implies the opposite. Because

the distributions of Q1 and Q2are unknown, c(Q1, Q1) was approximated numerically by

taking the sample covariance and sample standard deviation. The computed correlation coefficients were positive for all values of ρ. The sample correlation coefficient of Q1 and

Q2 as a function of ρ can be found in figure 6.3. It can be seen that the correlation

coefficient increases rapidly when ρ approaches one, although it will still be bounded by one. Therefore, we conclude that the assumption of independence is not valid, especially for larger ρ. Since a correlation coefficient of zero does not imply independence, figure

(35)

6.3 does not imply that the dependence of Q1 and Q2 is small for small ρ. However, Q1

and Q2 will be independent in the limit where the load approaches zero. The reasoning

behind this statement is similar to that made in section 4.2. The probability that the queue content is larger than one can be neglected if the load approaches zero. More-over, the jobs that are in the fiber loop at a departure time have, with high probability, arrived in the second phase of the previous cycle. Since these jobs arrived according to a Poisson-ρ process, the job locations at departure times are independent since the inter-arrival times are memoryless.

6.3.4 The distribution of the job locations

In this section, another method to test the validity of the approximation of the model is presented. Although it was already established in the previous sections that the job locations are not independent and identically distributed, this approach also gives insights into the behavior of the model and is therefore of interest in its own rights. This is the reason why is it included in this thesis.

First we introduce some notation. Let Xt,i be the stochastic variable that denotes the

job location of the i’th job, counted in a clockwise direction starting from the location of the processor, at time t. If this customer does not exist, Xt,i is infinite. Then the

stochastic variable defined as

Ct(I) := ∞

X

i=1

11I(Xt,i)

counts the jobs in the interval I ⊂ [0, 1) at time t. Next, we define gt(x) := E lim

→0

Ct([x, x + ))





for x ∈ [0, 1). Because the probability that there are two jobs in a certain interval can be neglected if the size of this interval goes to zero when x 6= 0 and ρ < 1, gt(x) is the

expected fraction of time that at least one job is present in a very small neighborhood of x, rescaled to the size of this neighborhood. Note that gt(x) is not a probability density

function because the distribution does not integrate to one.

If the assumptions of the approximation are true, the normalization of gt(x) should be

equal to f (x) at departure instances because we assumed that the jobs were located according to the distribution function f (x) at these time points. We thus should have

gt(x) 1 R 0 gt(x)dx = −2ρx + (1 + ρ) (6.4)

at a departure instance. We will now test whether this relation holds. We look at four time points: t0 is just after some departure, t1 denotes the end of the next idle period,

t2 the time just before the next departure and t3 is just after this departure. Because

we assume the process to be stable, we should have

(36)

We will now express gt3(x) in terms of gt0(x). In the first phase, the jobs move a distance

Z. This means that gt1(x) can be obtained by rotating gt0 with this distance. Behind

the processor, in the interval (1 − Z, 1), there are no jobs because the first phase was an idle phase without any arrival. At the location of the processor, there is always a job present at the end of the first phase because this marks the end of the first phases. Since Z is a stochastic variable, we should take the expectation with respect to Z. This gives the relation

gt1(x) = EZ         0 0 6= x > (1 − Z) gt0(x + Z) 0 < x ≤ (1 − Z) 1/ x = 0,   . (6.6)

In the second phase, the jobs arrive according to an a Poisson-λ process. Thus, the probability of an arrival in an interval of length  is λ · . This means that we have

gt2(x) = gt1(x) + λ = EZ         λ 0 6= x > (1 − Z) gt0(x + Z) 0 < x ≤ (1 − Z) 1/ + λ x = 0,   . (6.7)

Between t2 and t3, there is a departure. This means that the job is removed at x = 0.

The probability that there is another job in the interval [0,) after the departure is the probability that there were two jobs before this departure. This is λ if Z ≥ 1 and is equal to gt0(Z) if Z < 1. We therefore obtain

gt3(x) = EZ ( λ 0 6= x > (1 − Z) gt0(x + Z) x ≤ (1 − Z) ! . (6.8)

We can use an indicator function to write this as

gt3(x) = EZ(11{x≤(1−Z)}gt0(x + Z) + λ). (6.9)

Because gt0(x) = gt3(x), we obtain the following relation

gt0(x) = EZ(11{x≤(1−Z)}gt0(x + Z) + λ). (6.10)

With this, gt0(x) can be determined. Since we do not have an analytic expression for the

distribution of Z, we obtain gt0(x) by numerically iterating (6.10). We use the data from

the simulations of the original model to take the numerical expectation with respect to Z. To avoid conflicting indices, we define gt0,i, i ∈ N as the i-th iteration of (6.10). More

precisely, we have

gt0,0(x) = 1

(37)

The iteration is stopped when 1 Z 0 gt0,i(x) R1 0 gt0,i(u)du − gt0,i−1(x) R1 0 gt0,i−1(u)du dx < 10−11.

Sufficient convergence was established within a hundred iterations for all values of ρ. Let G(x) be the result from the iteration. By equation (6.4), we should have

G(x) 1 R 0 G(x)dx = −2ρx + (1 + ρ). (6.11)

To make a comparison between both sides of equation (6.11), the total variation distance was computed as a function of ρ. To obtain the total variation distance, the state space was discretized into 100 intervals of equal length. Similar to what we did before, we have to define what probability distributions to use with the computation of the total variation distance. In the approximation, the jobs are distributed according to f (x). Therefore, the probability that a job is positioned in the interval [a, b) is given by

PU(x ∈ [a, b)) = f (b) − f (a).

If we normalize G(x), we also have a probability distribution. We therefore choose

PV(x ∈ [a, b)) =

G(b) − G(a) R1

0 G(x)dx

.

Thereafter, equation (6.1) was used to find the total variation distance.

For ρ < 0.4, the total variation distance is smaller than 0.01. When ρ becomes larger, the total variation distance increases to 0.03 for ρ ≈ 0.8 to become smaller again for ρ close to one. These results confirm what we have seen earlier: for small loads, the assumptions on which the approximation is based are valid to a large extent.

(38)

7 Simulation results

In the previous chapter, we showed to what extent the assumptions on which the approx-imation is based are valid. In this chapter, we access the accuracy of the approxapprox-imation and present two results from simulations that are unrelated to the approximation.

7.1 Performance of the approximation

In this section, we compare the performance of the approximation with that of the original fiber model. We will do this for the queue content in sections 7.1.1 and 7.1.2. In section 7.1.3, we describe the distribution of the first job location, F1, for the model

and compare this to the original model. Because the distributions are not known for the original model, we will use simulated distributions. Finally, we will draw conclusions on the quality and usefulness of the approximation.

7.1.1 The equilibrium distribution of the queue content

In chapter 5, the transition matrix for the approximation was obtained, see equation (5.3). Since the Markov chain of the queue content is irreducible and aperiodic, a unique equilibrium distribution exists. This distribution is obtained by solving the set of linear equations

π = πP, (7.1) where P is the transition matrix of the approximation. Since the transition matrix is asymmetric and is defined through the complicated integral described in (5.5), (7.1) is difficult to solve analytically. Since the approximation does not describe the original model perfectly by construction, there would not be much gain from a complicated analytical expression even if it would exist. Therefore, the equilibrium distribution is computed numerically. Because we can only obtain numerical results on a finite state space, it is necessary to truncate the state space. From the simulation data for the original model, we obtained P(N > 300) < 10−7 for ρ = 0.99. This means that the tail of the equilibrium distribution can be neglected if the load is smaller or equal to 0.99 and the equilibrium distribution does not require to have a precision smaller than 10−7. That is to say, that P(N = n) need not have a precision smaller than this amount. Since the deviations between the original model and the approximations will be larger than this number, a truncation after N = 300 is justified.

The equilibrium distribution can be approximated by computing Pn for a sufficiently

large value of n. Pnis the transition matrix for n successive steps in the Markov chain. As n becomes larger, the rows of Pnconverge to the equilibrium distribution. To reduce

Referenties

GERELATEERDE DOCUMENTEN

In the ESS on a cycle of order n with pay-off parameters S and T , satisfying T &lt; 2S &lt; S + 1, an initial state containing the states CCC and/or CDD leads to either

Niet alleen modieuze tesettür wordt gepromoot, ook niet-islamitische mode komt veel voor in advertenties voor gesluierde vrouwen, zoals bijvoorbeeld in Âlâ.. In dit tijdschrift

Screening of PPAG (Z-2-(β- D -glucopyranosyloxy)-3-phenylpropenoic acid), ASP (aspalathin), GRT (unfermented rooibos extract), and FRE (fermented rooibos extract) based

kleine, nachtelijke diertjes, en zoogdieren konden pas groot worden, toen de dinosauriërs waren

Recordings of sermons in Dutch from a period of five years, starting from the moment PM was back in Holland, were analysed on complexity (lexical diversity and sophistication)

Based on the theory, it can be argued that paid work pro- vides both manifest benefits (associated with needs related to income) and latent benefits (associated with meeting

“The facts just don’t support the widely held view that women can’t stand the heat.” (laatste zin, alinea 2). 2p 36 Geef van elk van de volgende citaten aan of dit

Second, building on our conceptualization of job crafting as JC-strengths and JC-interests, we developed a job crafting intervention aimed at improving the fit between the job