Which of these Queueing disciplines ensure that all packets depart in the order in which they arrived?

The Process View

Richard John Anthony, in Systems Programming, 2016

First Come, First Served (FCFS)

FCFS is the simplest scheduling algorithm. There is a single rule; schedule the first process to arrive, and let it run to completion. This is a non-preemptive scheduling algorithm, which means that only a single process can run at a time, regardless of whether it uses the resources of the system effectively, and also regardless of whether there is a queue of other processes waiting, and the relative importance of those processes. Due to these limitations, the algorithm is not widely used but is included here as a baseline on which to compare other simple algorithms (see Activity P5).

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780128007297000029

Congestion Control and Resource Allocation

Larry L. Peterson, Bruce S. Davie, in Computer Networks (Fifth Edition), 2012

6.2.1 FIFO

The idea of FIFO queuing, also called first-come, first-served (FCFS) queuing, is simple: The first packet that arrives at a router is the first packet to be transmitted. This is illustrated in Figure 6.5(a), which shows a FIFO with “slots” to hold up to eight packets. Given that the amount of buffer space at each router is finite, if a packet arrives and the queue (buffer space) is full, then the router discards that packet, as shown in Figure 6.5(b). This is done without regard to which flow the packet belongs to or how important the packet is. This is sometimes called tail drop, since packets that arrive at the tail end of the FIFO are dropped.

Which of these Queueing disciplines ensure that all packets depart in the order in which they arrived?

Figure 6.5. (a) FIFO queuing; (b) tail drop at a FIFO queue.

Note that tail drop and FIFO are two separable ideas. FIFO is a scheduling discipline —it determines the order in which packets are transmitted. Tail drop is a drop policy —it determines which packets get dropped. Because FIFO and tail drop are the simplest instances of scheduling discipline and drop policy, respectively, they are sometimes viewed as a bundle—the vanilla queuing implementation. Unfortunately, the bundle is often referred to simply as FIFO queuing, when it should more precisely be called FIFO with tail drop. Section 6.4 provides an example of another drop policy, which uses a more complex algorithm than “Is there a free buffer?” to decide when to drop packets. Such a drop policy may be used with FIFO, or with more complex scheduling disciplines.

FIFO with tail drop, as the simplest of all queuing algorithms, is the most widely used in Internet routers at the time of writing. This simple approach to queuing pushes all responsibility for congestion control and resource allocation out to the edges of the network. Thus, the prevalent form of congestion control in the Internet currently assumes no help from the routers: TCP takes responsibility for detecting and responding to congestion. We will see how this works in Section 6.3.

A simple variation on basic FIFO queuing is priority queuing. The idea is to mark each packet with a priority; the mark could be carried, for example, in the IP header, as we'll discuss in Section 6.5.3. The routers then implement multiple FIFO queues, one for each priority class. The router always transmits packets out of the highest-priority queue if that queue is nonempty before moving on to the next priority queue. Within each priority, packets are still managed in a FIFO manner. This idea is a small departure from the best-effort delivery model, but it does not go so far as to make guarantees to any particular priority class. It just allows high-priority packets to cut to the front of the line.

The problem with priority queuing, of course, is that the high-priority queue can starve out all the other queues; that is, as long as there is at least one high-priority packet in the high-priority queue, lower-priority queues do not get served. For this to be viable, there need to be hard limits on how much high-priority traffic is inserted in the queue. It should be immediately clear that we can't allow users to set their own packets to high priority in an uncontrolled way; we must either prevent them from doing this altogether or provide some form of “pushback” on users. One obvious way to do this is to use economics—the network could charge more to deliver high-priority packets than low-priority packets. However, there are significant challenges to implementing such a scheme in a decentralized environment such as the Internet.

One situation in which priority queuing is used in the Internet is to protect the most important packets—typically, the routing updates that are necessary to stabilize the routing tables after a topology change. Often there is a special queue for such packets, which can be identified by the Differentiated Services Code Point (formerly the TOS field) in the IP header. This is in fact a simple case of the idea of “Differentiated Services,” the subject of Section 6.5.3.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780123850591000065

Multimedia Storage Servers: A Tutorial

D. James Gemmell, ... Lawrence A. Rowe, in Readings in Multimedia Computing and Networking, 2002

Disk scheduling

Servers traditionally employ disk-scheduling algorithms—such as first come, first served; shortest seek time first; and Scan—to reduce seek time and rotational latency, to achieve high throughput, or to provide fair access to each stream. Real-time constraints, however, reduce the direct application of traditional disk-scheduling algorithms to multimedia servers.

The best-known algorithm for real-time scheduling of tasks with deadlines is the earliest deadline first algorithm. This algorithm schedules the media block with the earliest deadline for retrieval. Scheduling of the disk head based solely on EDF policy, however, is likely to yield excessive seek time and rotational latency, and poor server-resource utilization can be expected.

One variant of this basic algorithm combines Scan with EDF and is called the Scan-EDF scheduling algorithm.3 The Scan algorithm scans the disk head back and forth across the disk's surface and retrieves a requested block as the head passes over the surface. By limiting the amount of backtracking that the disk head does, Scan can significantly reduce seek latencies. Scan-EDF services the requests with earliest deadlines first, just like EDF; however, when several requests have the same deadline, their respective blocks are accessed with the Scan algorithm. Clearly, the Scan-EDF technique's effectiveness depends on the number of requests having the same deadline. When deadlines for media block retrieval are batched (for example, by initiating media strand playbacks only at certain intervals), Scan-EDF is reduced to Scan only.

Scan-EDF is a unique disk-scheduling algorithm for CM because it does not intrinsically batch requests. All other algorithms typically process requests in rounds. During each round, the multimedia server retrieves a media block sequence of arbitrary length (even zero) for each stream. Processing requests in rounds is more than a convenience; it also exploits the periodic nature of CM playback.

Each round still requires a disk-scheduling algorithm, the simplest of which is the round-robin algorithm. This services streams in a fixed order that does not vary from one round to the next. Round-robin scheduling's major drawback is that it, like EDF, does not exploit the relative positions of the media blocks being retrieved during a round. For this reason, data-placement algorithms that inherently reduce latencies are sometimes used in conjunction with round-robin scheduling.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9781558606517501443

Cloud Resource Scheduling Strategies

Wenhong Tian, Yong Zhao, in Optimized Cloud Resource Management and Scheduling, 2015

4.3.1.1 First come, first served

To fully satisfy a virtual machine’s resource requirement, a first come, first served strategy is generally used, combined with user priority. Early IBM virtual computing was set up in this way and was mostly used in companies or schools. There may not be specific scheduling optimization goal functions, but it still needs to define administrator resource allocation. The server can be divided into categories such as ordinary, high throughput, or extensive computing for users to choose.

4.3.1.2 Load balance

The goal of load balance is to create a balanced average resource utilization of the physical machines. Typical load balance strategies are used by VMWare and SUN plan [14,15].

Optimization goal: the utilization of resources=the average utilization of all physical servers (CPU, memory utilization, and network bandwidth).

When there is a resource assigned, the system must immediately calculate and monitor each resource utilization (or directly use a load balance allocation algorithm) and then allocate users’ requests to the resource with the lowest utilization.

Load balancing can be realized through software or through hardware. Hardware can utilize special load balance devices, such as multilayer switches, which can dispense packets in a cluster. Normally, implementation, configuration, and maintenance solutions from hardware require time and capital investment. As for software, scheduling algorithms—such as Round Robin—can be used.

4.3.1.3 Improve reliability

Optimization objectives: make each resource’s reliability to the specified requirement (such as Amazon’s 99.9% business guarantee [10]). Reliability and the server itself (average breakdown time, average maintenance time) are related, and breakdown, power outages, and dynamic migration produce business disruption that will influence reliability.

If a physical server’s reliability is 90% and user required business reliability is 99.99%, scheduling should provide for at least a double-machine backup. If dynamic migration decreases business reliability by 0.1%, scheduling strategy must reduce (or avoid) dynamic migration.

Under certain premises, a system should reduce the average number of virtual machine migrations (average migration numbers, total migration numbers, or maximum migration numbers for a single virtual machine). A system also needs statistics on the quantitative influence on virtual machine migration on reliability.

Ways to improve reliability: backup redundancy should not place master machine and backup machine in the same physical machine or frame. Specific indicators can be proposed by users (as a demand option for users to choose).

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780128014769000045

Queued Transaction Processing

Philip A. Bernstein, Eric Newcomer, in Principles of Transaction Processing (Second Edition), 2009

Message Ordering

The message in a queue may be ordered in a variety of ways, such as first-come, first-served, in which case an enqueue operation places the new message at the end of the queue, or highest-priority-first, in which case an enqueue operation places the new message before the first message in the queue of lower priority.

Whatever the priority mechanism, the ordering is normally made fuzzy by the possible abort of a transaction that does a dequeue. For example, suppose transaction T1 dequeues the first message M1 from the queue and then T2 dequeues the next message M2 (see Figure 4.8). If T1 aborts, then its dequeue operation is undone, so M1 is returned to the queue. However, T2 might commit, in which case M2 ends up being processed before M1, even though it should have been processed after M1.

Which of these Queueing disciplines ensure that all packets depart in the order in which they arrived?

Figure 4.8. An Abort Destroys Priority Ordering. Although M1 is dequeued before M2, since T1 aborts, M2 is processed before M1.

To avoid this anomaly, T2 should not be allowed to dequeue M2 until after T1 commits. For example, the queue may be set to disallow concurrent dequeues. Unfortunately, this eliminates concurrency among transactions that dequeue from the same queue, in this case T1 and T2, and therefore degrades performance. Since this reduction in concurrency is only to prevent the relatively infrequent out-of-order dequeuing that results from an abort, most systems allow concurrent dequeue operations and ignore the occasional out-of-order dequeuing. However, in some applications, out-of-order processing is unacceptable, for example, for legal reasons. For example, in a stock trading system, orders submitted at the same price (to buy or sell) may be legally required to be processed in strict arrival order. To obey this rule and get satisfactory concurrency, trading systems exploit the specific semantics of the trading transactions themselves, for example, by batching up a set of trades and committing them as a group (even though they were submitted separately).

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9781558606234000044

Queueing Systems: General Concepts

J. MEDHI, in Stochastic Models in Queueing Theory (Second Edition), 2003

2.1.6 The queue discipline

The queue discipline indicates the manner in which the units are taken for service. The usual queue discipline is first come, first served, or FCFS (first in first out, FIFO), though sometimes there are other service disciplines, such as last come, first served (which happens sometimes in case of messages) or service in random order.

When arrivals occur in batches and service is offered individually, then the manner in which customers arriving in a batch are arranged for service is also to be indicated.

There are also such disciplines as processor-sharing, usually adopted in computer systems with a number of terminals.

Sometimes customers may be of several kinds with a definite order of priority for receiving service with preemptive (or nonpreemptive) service discipline.

The demand for service is often expressed as a = λ/μ, the mean number of arrivals per unit time taken as the mean service time. This quantity is called offered load (or traffic intensity); it is a dimensionless quantity and is expressed in “erlang” (in honor of A. K. Erlang, the father of queueing theory). This offered load is a measure of what the customers want.

The quantity ρ = a/c when the numbers of servers is c(≥1) is the offered load per server and is called carried load. It is also called utilization factor or server utilization.

For a single-server system, a = ρ gives the long-run proportion (fraction) of time the server is busy. These have to be suitably defined in case of batch arrivals and/or bulk service and also in finite systems with limited waiting space or limited input source.

Unless otherwise stated, by a system we shall mean a single-server system with arrivals from an infinite source, with unlimited waiting space and with FIFO queue discipline. The interarrival (as well as service times) will be assumed to be mutually independent and also to be independent of one another.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780124874626500023

Blockchain Technology: Platforms, Tools and Use Cases

Shiho Kim, in Advances in Computers, 2018

3.3.4 Use Case of Solving Intersection Deadlock Problem for Autonomous Vehicles

Deadlock is the state in which no operation can progress. Autonomous vehicles negotiate the right-of-way before traversing each intersection without traffic signals (on a first-come first-served basis), because the car reaching the intersection first has passing priority. If four autonomous vehicles arrive at a four-way intersection almost simultaneously, none can proceed until determination of the priority, which results in the deadlock at intersections without traffic signals. A cooperative traffic management system may allow high performance at intersections; however, it may cause considerable maintenance costs or inefficiency because most intersections without traffic signals are placed in low-traffic regions. Kim and Singh proposed a trust point-based blockchain technology for intelligent vehicles, as well as a solution to the deadlock scenario [23]. As shown in Fig. 7, four vehicles, namely, IV-1, IV-2, IV-3, and IV-4 approach the intersection. When the vehicles are about to reach the intersection, they broadcast their signals. A consensus is made regarding the vehicle the earliest timestamp associated with the block and which should move first. Then, the same procedure is followed for the other three (possibly more) vehicles. Fig. 7 shows an example of an intersection scenario for IVs, where the arrival times of IV-1, IV-2, IV-3, and IV-4 at the intersection are 10:06, 10:02, 10:04, and 10:03, respectively. IV-2 crosses the intersection first, after consensus is reached.

Which of these Queueing disciplines ensure that all packets depart in the order in which they arrived?

Fig. 7. Example of deadlock at traffic intersection without signals (on a first-come first-served basis) for autonomous vehicles.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/S0065245818300238

The Internet and TCP/IP Networks

Jean Walrand, Pravin Varaiya, in High-Performance Communication Networks (Second Edition), 2000

4.6.4 Queuing Algorithms

A packet scheduler sorts packets that must be forwarded through a link interface into separate queues according to their QoS class. The algorithms attempt to provide the requested QoS by appropriately scheduling the transmission of packets.

In first-come first-served or FCFS queuing, packets are transmitted in the order they are received. This widely used algorithm makes no distinction among packets with different QoS requirements. Sources that deliver more or larger packets will receive greater bandwidth and may inflict large delays on sources that deliver fewer packets.

In priority queuing, packets are sorted into different priority queues. Higher priority packets are transmitted ahead of lower priority packets. When there is a large volume of higher priority traffic, lower priority traffic may get very little bandwidth and suffer large delays.

In class-based queuing, packets are sorted into queues, one queue per class. Packets within each queue are transmitted FCFS. Different queues are served in round-robin fashion. The number of packets transmitted from each class, or the bandwidth devoted to each class in each round, is determined by the attributes of that class. Thus the algorithm guarantees that each class will receive a certain fraction of the link bandwidth. Such guarantee is not provided by the two previous algorithms. However, within a class, “misbehaving” sources that deliver more or larger packets will inflict delays on sources that deliver fewer or smaller packets. In this sense, the scheduling algorithm may be unfair.

Fair queuing is a term applied to a set of algorithms that attempt to allocate bandwidth fairly among all flows within a certain class. A flow may be defined, for example, as data flowing between a source-destination pair, and the class as a collection of such flows. A fair bandwidth allocation might then be defined as one in which low-volume flows within the class get their entire requested allocation, whereas high-volume flows share the remaining bandwidth equally.

Some queuing algorithms are analyzed in Chapter 8. The QoS experienced by a flow depends on the scheduling algorithm in all the switches in its route. Since the IP layer forwards individual datagrams, packets within a flow cannot be assigned a fixed route and so it is difficult to guarantee QoS within an IP network. One advantage of circuit- and virtual circuit-switched networks is that they assign routes to flows and can better provide QoS guarantees. IP switching may also provide those guarantees.

Queuing algorithms that allocate bandwidth among different queues can be augmented by active queue management, in which packets may be selectively discarded. Such a mechanism may delete a lower priority packet from a queue when a higher priority arrives and the queue is full.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780080508030500095

Packet Queueing and Scheduling

Deep Medhi, Karthik Ramasamy, in Network Routing (Second Edition), 2018

17.1.1 First-In, First-Out Queueing

The idea of first-in, first-out (FIFO) queueing is simple. The first packet that arrives at the router is the first one to be transmitted. Note that FIFO queueing is also referred to as first-come, first-served (FCFS) queueing. FIFO, being the simplest, is easy to implement and presents a low system overhead for software-based routers. The advantage of a FIFO queue is that it provides a predictable delay that packets can experience as they pass through the router. If c is the link speed and B is the maximum buffer size, then the delay bound, D, can be calculated as follows:

(17.1.1) D≤Bc.

The major limitation of FIFO queueing is its inability to discriminate packets based on service class. For instance, a single flow that has a bursty arrival can monopolize the entire buffer space of the queue causing all other flows to be denied service until after the burst is serviced. Thus, this form of queueing is used as the default for an output link in a router in the absence of any other queueing discipline.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B978012800737200020X

Business Continuity Planning

James F. Broder, Eugene Tucker, in Risk Analysis and the Security Survey (Fourth Edition), 2012

Hot, Cold, and Warm Sites

A hot site is an alternative recovery location prepared ahead of time, in this case with desktops, servers, or a mainframe, and related equipment such as telecommunications. Hot-site vendors exist to provide this service on a first-come, first-served basis. The hot sites typically include a limited number of workstations and both data and voice communications infrastructure, enabling the organization to relocate employees temporarily. Organizations pay a subscription fee to the vendor and, when the hot site is needed, pay an additional “declaration fee”—to declare a disaster and reserve a system and space ahead of other possible claimants. The company brings its latest backup data tapes (has them shipped or electronically transferred to the site), loads its programs, and resumes operations at the hot site. Daily-use fees are usually payable as long as the hot site is occupied.

Because each site is limited in its capacity and as a necessity located a distance away from the area affected by the disaster, employees may be reluctant to travel great distances from their homes to occupy the hot site, especially after a large disaster. Depending on the potential impact of an outage, the use of an internal hot site may be the most practical solution for the rapid recovery or continuity of data systems. Duplicate data centers are maintained in different company locations, with all transactions of the main center immediately mirrored (duplicated or replicated) on the alternate system.

Plans should detail the step-by-step instructions required to transfer operations to the hot site and list the employees who are to occupy the site. Most hot-site vendors have personnel on staff to assist with developing the transfer plan.

A cold site consists of an empty facility or leased space where computer hardware, telecommunications, and furniture would be delivered to construct a temporary processing capability. At a cold site, nothing is prewired or ready for immediate operation. Obviously, this is a less expensive strategy, but because of the time required for setup, it may not be a practical solution. Something in between a hot and cold site is a warm site.

Read full chapter

URL: https://www.sciencedirect.com/science/article/pii/B9780123822338000169

What happens when a packet arrives at a full queue?

Given that the amount of buffer space at each router is finite, if a packet arrives and the queue (buffer space) is full, then the router discards that packet, as shown in Figure 156(b). This is done without regard to which flow the packet belongs to or how important the packet is.

What is a packet queue?

A queue, in computer networking, is a collection of data packets collectively waiting to be transmitted by a network device using a per-defined structure methodology.

Which method is used in queues for flow control on network?

Weighted Fair Queuing (WFQ) dynamically creates queues based on traffic flows and assigns bandwidth to these flows based on priority. The sub-queues are assigned bandwidths dynamically.

What is priority queuing in networking?

In computer science, a priority queue is an abstract data-type similar to a regular queue or stack data structure in which each element additionally has a priority associated with it. In a priority queue, an element with high priority is served before an element with low priority.