High-Performance User-Level Threading
High-Performance User-Level Threading
批准号:
RGPIN-2014-04873
负责人:
Buhr, Peter
金额:
$1.46万
依托单位:
依托单位国家:
加拿大
项目类别:
Discovery Grants Program - Individual
财政年份:
2018
资助国家:
加拿大
项目状态:
已结题
起止时间:
2018-01-01 至 2019-12-31
中文摘要
本研究计划的目的是研究线程的抽象概念以及它们在编程语言中的交互机制。其目标是为程序员提供选择最适合问题的并发性数量的能力,同时仍然获得良好的性能。实现这一目标的机制是用户级线程,它可以扩展到10,000-100,000个线程,并且可以使用任何编程语言的线程模型。大量线程的主要好处是过度分区为较小的工作单元,以促进运行时的负载平衡。第二个好处是更简单的并发程序构造,使用线程对象,利用面向对象编程中的常规对象构造。在15年前试验了用户级M:N线程模型之后,UNIX社区采用了1:1线程模型。因此,每个用户级线程被绑定到一个内核线程,而不是在N个操作系统内核线程(M&>N)上多路传输M个用户线程。然而,随着处理器的增加,1:1线程系统开始饱和,难以支持具有大量线程的并发方法。**因此,用户级M:N线程的概念正在被重新考虑,期望从低成本中获得尚未开发的性能潜力:线程创建/删除、上下文切换、同步、互斥和抢占。其结果是重新激活了与创建和管理应用程序中的大量线程相关的程序语言和操作系统交互。例如,Erlang、Haskell和Google的新Go语言采用M:N线程模型,提供了创建和管理大量用户级线程的简单机制。不幸的是,内核级别的1:1线程模型通过内核/应用程序边界的限制显著限制了M:N线程模型。此研究计划的目标是重新检查M:N线程的主要问题领域,例如调度、阻塞、垃圾收集和抢占,看看是否可以设计出新的解决方案。目前的M:N系统没有处理其中的一些问题,因此是脆弱的或受限的,或者通过采用封闭的环境(没有外部互动)来忽视它们。虽然用户级线程已经得到了广泛的研究,但它仍然是一个具有挑战性的问题,有许多开放的问题,例如,由于内核不知道用户线程,发生了冲突的交互。**本研究计划的重点是尽可能利用现有的机制来为用户级线程生成概念验证。科学的方法是扩展C++和Go(可能还有Java)的运行时,以识别基本的用户级线程问题并测试不同的解决方案。下一步是构建性能实验来比较各种方法。最后,需要对结果进行广泛的分析,以了解时间在哪里损失或获得了。使用M:N线程与1:1线程(例如,每个连接的线程Web服务器)相比,将通过在几个关键领域展示显著的性能提升来衡量成功与否。这项工作的主要新颖性和预期意义在于使用可用的操作系统机制对高性能调度的编程语言运行时支持。第二个意义是与操作系统研究人员和硬件设计人员合作,探索一些跨越应用程序/操作系统边界的高性能交互方法。这些结果直接重新解决了M:N线程是否是未来编程语言和操作系统开发的可行方向的问题。回答这个问题对这两个领域未来5年的发展方向至关重要。
英文摘要
The purpose of this research program is to examine the abstract notion of threads and the mechanisms for their interaction in a programming language. The goal is to provide programmers with the ability to choose the amount of concurrency that best fits the problem, while still achieving good performance. The mechanism to accomplish this goal is user-level threading, which can scale to 10,000-100,000 threads, and can work with threading models in any programming language. The primary benefit from large numbers of threads is over-partitioning into small work-units to facilitate load balancing by the runtime. The secondary benefit is simpler concurrent program-construction using thread objects, leveraging normal object-construction in object-oriented programming. After experimenting with the user-level M:N threading model 15 years ago, the UNIX community adopted the 1:1 threading model. Hence, instead of M user threads multiplexing across N OS kernel-threads (M>>N), each user-level thread is bound to one kernel thread. However, 1:1 threading systems are beginning to saturate with increased processors and struggle to support concurrency approaches with large numbers of threads.**As a result, the notion of user-level M:N threading is being revisited with the expectation of untapped performance potential from low-cost: thread creation/deletion, context switching, synchronization, mutual exclusion, and preemption. The results are reinvigorating program-language and OS interaction with respect to creating and managing large numbers of threads in an application. For example, the languages Erlang, Haskell, and the new Go language from Google adopt the M:N threading model, providing simple mechanisms to create, and manage large numbers of user-level threads. Unfortunately, the 1:1 threading-model at the kernel level significantly constrains the M:N threading-model through restrictions at the kernel/application boundary. The objective of this research program is to reexamine the major problem areas of M:N threading, e.g., scheduling, blocking, garbage collection, and preemption, to see if new solutions can be engineered. Current M:N systems do not handle some of these problems, and hence are fragile or restrictive, or ignore them by adopting a closed environment (no outside interaction). While user-level threading has been worked on extensively, it still remains a challenging problem with many open issues, e.g., as the kernel is unaware of user threads, conflicting interactions occur.**The focus of this research program is leveraging existing mechanisms as much as possible to generate proof-of-concepts for user-level threading. The scientific approach is extending the runtime for C++ and Go (and possibly Java) to identify fundamental user-level threading problems and test different solutions. Next is building performance experiments to compare approaches. Finally, extensive analysis of the results is required to understand where time is being lost or gained. Success will be measured by demonstrating a significant performance gain in a few key areas using M:N threading versus 1:1 threading (e.g., thread-per-connection web-server). The primary novelty and expected significance of the work is in programming-language runtime-support with respect to high-performance scheduling using available OS mechanisms. The secondary significance is to work with OS researchers and hardware designers to explore a few approaches for high-performance interactions across the application/OS boundary. The results directly re-address the question of whether M:N threading is a viable direction for future programming-language and OS development. Answering this question is crucial to the development direction of both these areas over the next 5 years.
期刊论文(0)
专著(0)
科研奖励(0)
会议论文
Programming Language Type Systems and Concurrency
-
批准号:RGPIN-2020-03908
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.75万
-
财政年份:2022
-
负责人:Buhr, Peter
-
依托单位:
New Programming Language and Runtime System
-
批准号:537903-2018
-
项目类别:Collaborative Research and Development Grants
-
资助金额:$8.87万
-
财政年份:2021
-
负责人:Buhr, Peter
-
依托单位:
Parallel Client/Server System for Programming Language Research
-
批准号:RTI-2022-00004
-
项目类别:Research Tools and Instruments
-
资助金额:$8.3万
-
财政年份:2021
-
负责人:Buhr, Peter
-
依托单位:
Programming Language Type Systems and Concurrency
-
批准号:RGPIN-2020-03908
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.75万
-
财政年份:2021
-
负责人:Buhr, Peter
-
依托单位:
New Programming Language and Runtime System
-
批准号:537903-2018
-
项目类别:Collaborative Research and Development Grants
-
资助金额:$8.87万
-
财政年份:2020
-
负责人:Buhr, Peter
-
依托单位:
Programming Language Type Systems and Concurrency
-
批准号:RGPIN-2020-03908
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.75万
-
财政年份:2020
-
负责人:Buhr, Peter
-
依托单位:
New Programming Language and Runtime System
-
批准号:537903-2018
-
项目类别:Collaborative Research and Development Grants
-
资助金额:$8.87万
-
财政年份:2019
-
负责人:Buhr, Peter
-
依托单位:
High-Performance User-Level Threading
-
批准号:RGPIN-2014-04873
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.46万
-
财政年份:2017
-
负责人:Buhr, Peter
-
依托单位:
High-Performance User-Level Threading
-
批准号:RGPIN-2014-04873
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.46万
-
财政年份:2016
-
负责人:Buhr, Peter
-
依托单位:
High-Performance User-Level Threading
-
批准号:RGPIN-2014-04873
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.46万
-
财政年份:2015
-
负责人:Buhr, Peter
-
依托单位:
High-Performance User-Level Threading
-
批准号:RGPIN-2014-04873
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.46万
-
财政年份:2014
-
负责人:Buhr, Peter
-
依托单位:
High-performance concurrent programming
-
批准号:9168-2009
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.38万
-
财政年份:2013
-
负责人:Buhr, Peter
-
依托单位:
High-performance concurrent programming
-
批准号:9168-2009
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.38万
-
财政年份:2012
-
负责人:Buhr, Peter
-
依托单位:
High-performance concurrent programming
-
批准号:9168-2009
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.38万
-
财政年份:2011
-
负责人:Buhr, Peter
-
依托单位:
High-performance concurrent programming
-
批准号:9168-2009
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.38万
-
财政年份:2010
-
负责人:Buhr, Peter
-
依托单位:
High-performance multiprocessor servers for programming languages and information retrieval research groups
-
批准号:407696-2011
-
项目类别:Research Tools and Instruments - Category 1 (<$150,000)
-
资助金额:$5.43万
-
财政年份:2010
-
负责人:Buhr, Peter
-
依托单位:
High-performance concurrent programming
-
批准号:9168-2009
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$1.38万
-
财政年份:2009
-
负责人:Buhr, Peter
-
依托单位:
Vertical improvements in the UNIX software hierarchy for the development and execution of concurrent applications
-
批准号:9168-2004
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$2.19万
-
财政年份:2008
-
负责人:Buhr, Peter
-
依托单位:
Vertical improvements in the UNIX software hierarchy for the development and execution of concurrent applications
-
批准号:9168-2004
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$2.19万
-
财政年份:2007
-
负责人:Buhr, Peter
-
依托单位:
Vertical improvements in the UNIX software hierarchy for the development and execution of concurrent applications
-
批准号:9168-2004
-
项目类别:Discovery Grants Program - Individual
-
资助金额:$2.19万
-
财政年份:2006
-
负责人:Buhr, Peter
-
依托单位:
海外基金