基于内存的临时文件中转系统研究与设计外文翻译资料

 2022-11-04 16:00:49

外文文献

An extensive empirical study on C concurrency constructs

Di Wu; Lin Chen; Yuming Zhou; Baowen Xu;

  1. 文献基本信息:

ABSTRACT:Conclusions : This is the first extensive empirical study on C concurrency constructs. The results of this paper should be helpful for designing, teaching, and using C concurrency constructs.

KEYWORDS:Programming Language; C ; Concurrency; Empirical Study;

JOURNAL:Information and Software Technology

SOURCE:爱思唯尔期刊

DOI:10.1016/j.infsof.2016.04.004

YEAR:2016

PUBLISHER:Elsevier B.V.

二、文献部分内容:

Abstract

Context

Nowadays concurrent programming is in large demand. The inherent support for concurrency is therefore increasingly important in programming languages. As for C , an abundance of standard concurrency constructs have been supported since C 11. However, to date there is little work investigating how these constructs are actually used in developing real software.

Objective

In this paper, we perform an extensive empirical study to investigate the actual adoption of C concurrency constructs in open-source applications, with the goal to provide useful information for language designers and practitioners to improve the design and use of concurrency constructs.

Method

We first conduct a survey to understand the developersrsquo; perception of concurrency constructs. Then, we analyze 492 open-source concurrent applications, comprising 131 million lines of C code, to collect the data of the practical adoption of concurrency constructs. Finally, we perform statistical analysis on the collected data and get the quantitative analysis results.

Results

Using the experimental data, we uncover many interesting findings with respect to the usage of concurrency constructs, the management of synchronization, the relationship between standard concurrency constructs and third-party concurrency constructs, and the difference of applications in using concurrency constructs. For example, we find that: (1) thread-based constructs are significantly more often used to write concurrent programs than atomics-based constructs and task-based constructs; (2) lock-based constructs are significantly more often used to manage synchronization than lock-free constructs and blocking constructs; (3) developers in most projects do not move from third-party concurrency constructs to standard concurrency constructs; and (4) small-size applications introduce concurrency constructs more intensively and more quickly than medium-size applications and large-size applications.

Conclusions

This is the first extensive empirical study on C concurrency constructs. The results of this paper should be helpful for designing, teaching, and using C concurrency constructs.

Keywords

  • Programming language;
  • C ;
  • Concurrency;
  • Empirical study

1. Introduction

Concurrency is widely used to improve the performance of software through enhancing its throughput and responsiveness on multiprocessor platforms. Also, concurrency is a good way to separate distinct areas of functionality, making it easy to implement complex systems using separation of concerns [1]. For these reasons, many modern languages have provided well-designed concurrency constructs. As for C , it has started to support concurrency since C 11 [2], which provides concurrency constructs at different abstraction levels (including atomics, threads, and tasks) and corresponding synchronization mechanisms to manage interference between concurrent operations. With these constructs, programmers can efficiently implement portable and quality concurrent programs.

Ever since these standard concurrency constructs were introduced, many researchers have investigated correctness of concurrent programs through theoretical verification [3], [4] and [5]. However, few studies empirically investigate the actual adoption of C concurrency constructs in real software. This may lead to several problems. For language designers, they cannot know which concurrency constructs are practically needed and which new concurrent language features need to be introduced in the future language standard. For language educators, they do not understand which concurrency constructs are the most useful and need to be taught. For developers, they are unaware of whether they have properly used concurrency constructs and whether their concurrent programs needs to be revised.

In this paper, we perform an empirical study to investigate the actual adoption of C concurrency constructs in open-source applications, with the goal to provide useful information for language designers and practitioners to improve the design and use of concurrency constructs. To be specific, we propose the following research questions:

bull;

RQ1: How do developers use1 concurrency constructs?

bull;

RQ2: How do developers manage synchronization?

bull;

RQ3: Do developers move from third-party concurrency constructs to standard concurrency constructs?

bull;

RQ4: Do different applications adopt concurrency constructs differently?

These research questions are critically important, as they investigate C concurrency

剩余内容已隐藏,支付完成后下载完整资料


外文翻译

一个关于C 并发结构的广泛的实证研究

  1. 文献基本信息:

摘要:结论:这是第一个关于C 并发结构的广泛的实证研究。本文的结果应该有助于设计,教学和使用C 并发结构。

关键词:编程语言; C ; 并发; 实证研究;

期刊:信息与软件技术

来源:爱思唯尔期刊

DOI:10.1016 / j.infsof.2016.04.004

YEAR: 2016

出版者: Elsevier BV

二、文献部分内容翻译:

摘要

上下文

现在并发编程需求很大。因此,并发的固有支持在编程语言中变得越来越重要。对于C ,自C 11以来已经支持了大量的标准并发构造。然而,到目前为止,没有什么工作研究这些结构如何实际用于开发真正的软件。

目的

在本文中,我们执行广泛的实证研究,以调查在开源应用程序中C 并发结构的实际采用,目的是为语言设计师和从业者提供有用的信息,以改进并发结构的设计和使用。

方法

我们首先进行一项调查,以了解开发人员对并发结构的看法。然后,我们分析了492个开源并发应用程序,包括131万行C 代码,以收集实际采用并发结构的数据。最后,对收集的数据进行统计分析,得到定量分析结果。

结果

使用实验数据,我们发现了关于并发构造的使用,同步管理,标准并发构造和第三方并发构造之间的关系以及使用并发构造的应用程序的差异的许多有趣的发现。例如,我们发现:(1)基于线程的构造比基于原子的构造和基于任务的构造明显更频繁地用于写并发程序; (2)基于锁的构造明显更多地用于管理同步,而不是无锁构造和阻塞构造; (3)大多数项目中的开发人员不从第三方并发构造转移到标准并发构造; 和(4)小型应用程序比中型应用程序和大型应用程序更加集中和更快速地引入并发构造。

结论

这是第一个关于C 并发结构的广泛的实证研究。本文的结果应该有助于设计,教学和使用C 并发结构。

关键词

  • 编程语言 ;
  • C ;
  • 并发 ;
  • 实证研究

1.介绍

并发性广泛用于通过增强其在多处理器平台上的吞吐量和响应性来提高软件的性能。此外,并发性是分离不同功能区域的好方法,使得使用分离关注点实现复杂系统变得容易[1]。由于这些原因,许多现代语言提供了良好设计的并发构造。对于C ,它已经开始支持并发性,因为C 11 [2]提供了不同抽象级别(包括原子,线程和任务)的并发结构和相应的同步机制来管理并发操作之间的干扰。通过这些结构,程序员可以有效地实现便携式和高质量并发程序。

自从引入这些标准并发构造以来,许多研究人员通过理论验证研究了并发程序的正确性[3][4][5]。然而,很少有研究经验性地调查实际软件中C 并发结构的实际采用。这可能导致几个问题。对于语言设计者,他们不能知道实际需要哪些并发结构,并且需要在未来语言标准中引入哪些新的并发语言特征。对于语言教育者,他们不明白哪些并发结构是最有用的,需要教授。对于开发人员,他们不知道他们是否正确使用了并发构造,以及他们的并发程序是否需要修改。

在本文中,我们执行一个实证研究,以调查在开源应用程序中C 并发结构的实际采用,目标是为语言设计者和从业者提供有用的信息,以改进并发结构的设计和使用。具体来说,我们提出以下研究问题:

bull;

RQ1:开发人员如何使用1个并发结构?

bull;

RQ2:开发人员如何管理同步?

bull;

RQ3:开发者是否从第三方并发构造转移到标准并发构造?

bull;

RQ4:不同的应用程序是否采用不同的并发结构?

这些研究问题非常重要,因为他们从不同的角度研究C 并发结构。图。图1显示了在开源应用程序中采用C 并发结构的场景。我们可以看到,C 并发构造分为标准并发构造和第三方并发构造。特别地,标准并发构造包括基于任务的构造,基于线程的构造和基于原子的构造。在并发构造内,包括不同的同步构造,其用于处理进程间/线程间干扰。对于开源并发应用程序,可以按大小或软件域对它们进行分类。我们提出的研究问题分别集中在这个场景的关键部分。具体来说,RQ1研究并发构造的使用,RQ2研究同步的管理,RQ3研究标准并发构造和第三方并发构造之间的关系,RQ4研究应用程序在使用并发构造方面的差异。为了详细回答这些RQ,我们将它们分成几个子RQ。

图。1。

在开源应用程序中采用C 并发结构的场景。

图选项

对于RQ1,我们将其分解为以下子RQ:

bull;

RQ1.1:哪种类型的并发结构是最常用的?

bull;

RQ1.2:是否有开发人员通常滥用的并发结构?

bull;

RQ1.3:并发程序是否配备了异常处理程序以避免执行失败?

RQ1.1的目的是调查是否存在比其他更经常使用的少数并发结构。基于这个结果,我们可以知道开发人员是否按照专家的建议,“程序员应该考虑可以并发执行的任务,而不是直接在线程” [6]。RQ1.2的目的是调查并发结构的滥用。在[6]中,Stroustrup强调了滥用三个重要的并发结构(即互斥,承诺和未来)。然而,没有数据报告这些构造在实际软件中被错误使用的情况。我们试图通过回答RQ1.2填补这个空白。特别是,如果发现某种常见的滥用,我们可以给开发者建议注意避免这些滥用。RQ1.3的目的是研究对C 并发程序的保护。基于其结果,我们可以验证开发人员很少使用异常处理程序来保护他们的并发程序不会导致执行失败,如Pinto和同事所报告的,他们通过分析Java并发程序来得出这个结论[7]

RQ2研究同步的管理。在这里,我们将它分成以下子RQ:

bull;

RQ2.1:哪种类型的同步结构是最常用的?

bull;

RQ2.2:哪些数据结构常用于关键部分2

RQ2.1的目的是研究哪种类型的同步结构在管理并发对象之间的干扰中起关键作用。凭借这种知识,我们可以理解并发程序如何实际实现。RQ2.2的目的是研究哪些数据结构实际上用于多线程干扰。由于C 不提供线程安全集合(例如在java.util.concurrent包中定义的ConcurrentHashMap和BlockingQueue),开发人员只能将共享变量放在关键部分。这使得实现多线程操作变得复杂。通过研究RQ2.2,我们可以理解实际需要哪些线程安全的数据结构,并建议语言设计者在未来的C 标准库中包含这种常用的线程安全数据结构。

RQ3研究标准并发构造和第三方并发构造之间的关系。我们知道,许多标准并发构造源于第三方库。然而,标准并发构造已经投入使用了四年,因此开发人员可能仍然使用由第三方库提供的并发结构,如TBB [36]和PPL [37]。由于大多数第三方库是特定于域的,使用那些非标准化的并发结构可能会降低程序的可移植性。将非标准化结构的采用转变为采用标准替代方案是一个明智的选择。因此,我们提出RQ3来研究这种变换是否实际上有所不同。

RQ4研究了应用程序在使用并发构造方面的差异。更具体地说,我们将其分解为以下子RQ:

bull;

RQ4.1:不同大小的应用程序采用不同的并发结构?

bull;

RQ4.2:不同软件域的应用程序是否采用不同的并发结构?

这些子RQ的目的是调查应用程序大小3和软件域4如何影响并发结构的采用。通过回答这两个问题,我们试图找出一组应用程序,集中56快速采用并发构造,并建议C 教师使这些应用程序作为现实世界的例子来教C 并发结构。

为了回答上述研究问题,我们首先进行调查,以了解开发人员对并发构造的看法。然后,我们分析了492个开源并发应用程序,包括131万行C 代码,以收集实际采用并发结构的数据。最后,对收集的数据进行统计分析,得到定量分析结果。使用实验数据,我们发现了关于所提出的RQ的许多有趣的发现。更具体地,我们发现:(1)基于线程的构造比基于原子的构造和基于任务的构造明显更频繁地用于实现并发程序; (2)承诺比互斥和期货明显更常被滥用; (3)只有小比例的并发应用程序(11.4%)使用异常处理程序来避免可能的执行失败,并且根异常处理程序(即std :: exception)是最常用的; (4)基于锁的构造明显更多地用于管理同步,而不是无锁构造和阻塞构造; (5)向量是关键部分中最常用的数据结构; (6)大多数项目中的开发人员不从第三方并发构造转移到标准并发构造; (7)小型应用程序比中型应用程序和大型应用程序更加集中和更快地引入并发构造; 和(8)不同软件域的应用不采用不同的并发结构。基于这些发现,我们得出了大量可行的影响,这应该有助于语言设计师,语言教育者和开发人员协助他们设计,教学和使用C 并发结构。

本文的贡献如下:(1)我们对C 并发构造执行第一次广泛的实证研究,提供了关于并发构造的使用,同步管理,标准并发性之间的关系的丰富的经验证据构造和第三方并发构造,以及应用程序在使用并发构造方面的差异; (2)我们在并发编程研究领域提供有价值的数据(包括调查数据和源代码分析数据),同时提供有限的实验数据; 和(3)我们为语言设计者,语言教育

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[140531],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

课题毕业论文、外文翻译、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。