Priority queue classes with priority update
نویسندگان
چکیده
A limitation in the design of the interface of C++ standard priority queues is addressed. The use of priority queues in Dijkstra’s shortest path search algorithm is used as an example. Priority queues are often implemented using heaps. There is a problem, as it may be necessary to change the priority of an element while it is in the queue, but finding the element from within a heap is costly. The problem may be solved by keeping track, in a variable that is outside the heap, of the position of the element in the heap. Unfortunately, this is impossible with the template class interface used by the C++ standard library priority queue. In this research, the problem is analysed in detail. Four interface designs and corresponding implementations are suggested. They are compared experimentally to each other and the C++ design.
منابع مشابه
A NONPREEMPTIVE PRIORITY MAP/G/l QUEUE WITH TWO CLASSES OF CUSTOMERS
This p p e r considers a nunpreemptive priority queue with two classes of customers. Customers in each priority class arrive to the system according to a Markovian arrival process (MAP). Since the MAP is weakly dense in the class of stationary point processes, it is a fairly general arrival process. The service times of custcomers in ea,ch priority class are independent and identically distribu...
متن کاملA Heap-Based Concurrent Priority Queue with Mutable Priorities for Faster Parallel Algorithms
Existing concurrent priority queues do not allow to update the priority of an element after its insertion. As a result, algorithms that need this functionality, such as Dijkstra’s single source shortest path algorithm, resort to cumbersome and inefficient workarounds. We report on a heap-based concurrent priority queue which allows to change the priority of an element after its insertion. We sh...
متن کاملFluid Approximation of a Priority Call Center With Time-Varying Arrivals
In this paper, we model a call center as a preemptive-resume priority queue with time-varying arrival rates and two priority classes of customers. The low priority customers have a dynamic priority where they become high priority if their waiting-time in queue exceeds a given service-level time. The performance of the call center is measured by the mean number in system for the two customer cla...
متن کاملCommunication Networks Delay Analysis of a Probabilistic Priority Discipline
In computer networks, the Strict Priority (SP) discipline is perhaps the most common and simplest method to schedule packets from different classes of applications, each with diverse performance requirements. With this discipline, however, packets at higher priority levels can starve packets at lower priority levels. To resolve this starvation problem, we propose to assign a parameter to each p...
متن کاملA preemptive repeat priority queue with resampling: Performance analysis
In this paper, we analyze a discrete-time preemptive repeat priority queue with resampling. High-priority packets have preemptive repeat priority, and interrupted low-priority packets are subjected to independent retransmission attempts. Both classes contain packets with generally distributed transmission times. We show that the use of generating functions is beneficial for analyzing the system...
متن کامل