Exploring Coordination of Threads in Multi-Core Libraries

Exploring Coordination of Threads in Multi-Core Libraries
复制标题

探索多核库中线程的协调

DOI:
--
复制
发表时间:
2010
期刊:
影响因子:
--
通讯作者:
Milo M. K. Martin
Milo M. K. Martin
中科院分区:
--
文献类型:
--
作者:
Michajlo P. Matijkiw;Milo M. K. Martin

文献摘要

被引文献

相似文献

现代多核库在将线程编程的细节从程序员那里抽象出来方面做得非常出色,为开发可移植的并行应用程序提供了一个便捷的接口。这些库拥有丰富的同步原语和无锁数据结构集合,使程序员能够轻松管理他们的程序。然而,它们的弱点在于,在初始化时,这些应用程序通常会启动与处理器数量相同的线程,所以如果存在两个该库的实例,那么线程数量将是CPU数量的两倍,此外还有系统上运行的任何其他进程。结果将是由于CPU过载,系统上所有应用程序的性能都会下降。使用共享资源的应用程序尤其会受到影响。提高锁性能一直是在高负载系统中提高性能的传统方法。虽然过去已证明它是有帮助的,但这种方法只能在一定程度上很好地扩展,并且可能仍然无法提供最佳性能。随着我们即将达到并行应用程序在通用机器上变得普遍的阶段,必须注意确保它们能够协同工作。我们提出,可以通过在运行时动态防止CPU过度订阅来提高多核库的性能和可扩展性。这种方法将极大地提高多核库的可扩展性,并使它们对于常见工作负载更具吸引力。
Modern multi-core libraries do an excellent job of abstracting the details of thread programming away from the programmer, delivering a convenient interface for developing portable parallel applications. With a rich collection of synchronization primitives and lock-free data structures, these libraries allow the programmer to easily manage their programs. Their weakness, however, is that at initialization these applications typically launch as many threads as there are processors, so if there were two instances of the library present there would be twice as many threads as CPUs, in addition to any other processes running on the system. The result would be decreased performance for all applications on the system due to overloading of the CPU. Applications using shared resources are especially effected. Improving lock performance has been the traditional approach to improving performance in systems under high load. While it has proven helpful in the past, such an approach only scales well to a certain point, and still may not provide optimal performance. As we are reaching a point where parallel applications will be commonplace on general purpose machines, care must be taken to make sure that they cooperate. We propose that we can improve the performance and scalability of multi-core libraries by dynamically preventing overs-subscription of the CPU at runtime. Such an approach would greatly improve the scalability of multi-core libraries and make them much more attractive for common workloads.