Many task-parallel applications can benefit from attempting to execute tasks in a specific order, as for instance indicated by priorities associated with the tasks. We present three lock-free data structures for priority scheduling with different trade-offs on scalability and ordering guarantees. First we propose a basic extension to work-stealing that provides good scalability, but cannot provide any guarantees for task-ordering in-between threads. Next, we present a centralized priority data structure based on $k$-fifo queues, which provides strong (but still relaxed with regard to a sequential specification) guarantees. The parameter $k$ allows to dynamically configure the trade-off between scalability and the required ordering guarantee. Third, and finally, we combine both data structures into a hybrid, $k$-priority data structure, which provides scalability similar to the work-stealing based approach for larger $k$, while giving strong ordering guarantees for smaller $k$. We argue for using the hybrid data structure as the best compromise for generic, priority-based task-scheduling.
We analyze the behavior and trade-offs of our data structures in the context of a simple parallelization of Dijkstra's single-source shortest path algorithm. Our theoretical analysis and simulations show that both the centralized and the hybrid $k$-priority based data structures can give strong guarantees on the useful work performed by the parallel Dijkstra algorithm. We support our results with experimental evidence on an 80-core Intel Xeon system.
考虑以下随机过程:我们给出$n$队列,递增标签的元素随机均匀插入其中。为了删除一个元素,我们随机挑选两个队列,并删除其中标签较低(优先级较高)的元素。移除的成本是被移除的标签在任何队列中仍然存在的标签中的排名,也就是说,每一步与最优选择的距离。这种策略的变体在最先进的并发优先级队列实现中很流行。然而,不知道这样的实现是否提供任何等级保证,即使在顺序模型中也是如此。我们回答这个问题,表明这种策略提供了令人惊讶的强有力的保证:虽然单一的选择过程中,我们总是插入和删除一个随机选择的队列,有降低成本,去无穷大,因为我们增加的步骤数,在两个选择过程中,预期的排名被删除的元素是PDMATHAMN,而预期的最坏情况下的成本是$O( n \log n )$。这些边界是紧的,并且与我们运行过程的步骤数量无关。这个论点是基于一个新的技术连接之间的“重载”球到箱子的过程和优先级调度。我们的分析结果启发了一个新的并发优先级队列的实现,提高了最先进的实际性能。
VenusRL: A Fully Disaggregated Agentic RL System with Priority Scheduling and Scalable Interaction
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);Beihang University(北京航空航天大学);Infrawaves;Shanghai Innovation Institute(上海创新研究院);Shanghai Qiji Zhifeng Co., Ltd.(上海奇绩智峰有限公司)