Localizing Globals and Statics to Make C Programs Thread-Safe

被引:0
|
作者
Smith, Adam R. [1 ]
Kulkarni, Prasad A. [1 ]
机构
[1] Univ Kansas, Dept Elect Engn & Comp Sci, Lawrence, KS 66045 USA
来源
PROCEEDINGS OF THE PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON COMPILERS, ARCHITECTURES AND SYNTHESIS FOR EMBEDDED SYSTEMS (CASES '11) | 2011年
关键词
Thread-safe; Globals; COMPILERS;
D O I
暂无
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Challenges emerging from the exponential growth in CPU power dissipation and chip hot spots with increasing clock frequencies have forced manufacturers to employ multicore processors as the ubiquitous platform in all computing domains. Embedded mobile devices are increasingly adopting multicore processors to improve program performance and responsiveness at low power levels. However, harnessing these performance and power benefits requires the construction of parallel programs, a task significantly more complex than writing sequential code. Parallel code development is also made more difficult by differences in the use of several programming language constructs. Therefore, it is critical to provide programmers with tools to ease the formidable task of parallelizing existing sequential code or developing new parallel code for multicore processors. In this work we focus on the use of static and global variables that are commonly employed in C/C++ programs, the languages of choice for developing embedded systems applications. Unprotected use of such variables produces functions that are not thread-safe, thereby preventing the program from being parallelized. Manually eliminating global and static variables from existing sequential code is tedious, time-consuming and highly error-prone. While no good solution to this problem currently exists, researchers have proposed partial mitigation techniques that require massive changes to linkers and runtime systems. In this work we study the characteristics and effects of static and global variables in traditional benchmark programs, and propose, construct, and explore a compiler-based, semi-automatic and interactive technique to handle such variables and generate thread-safe code for parallel programs.
引用
收藏
页码:205 / 214
页数:10
相关论文
共 50 条
  • [1] Thread-safe access to collections
    Kleber, Jeff
    C/C++ Users Journal, 2000, 18 (05): : 38 - 39
  • [2] Thread-Safe Reactive Programming
    Drechsler, Joscha
    Mogk, Ragnar
    Salvaneschi, Guido
    Mezini, Mira
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [3] Thread-Safe Reactive Programming
    Drechsler, Joscha
    Mogk, Ragnar
    Salvaneschi, Guido
    Mezini, Mira
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [4] (Quasi-) thread-safe PVM and (quasi-) thread-safe MPI without active polling
    Plachetka, T
    RECENT ADVANCES IN PARALLEL VITUAL MACHINE AND MESSAGE PASSING INTERFACE, PROCEEDINGS, 2002, 2474 : 296 - 305
  • [5] Issues in developing a thread-safe MPI implementation
    Gropp, William
    Thakur, Rajeev
    RECENT ADVANCES IN PARALLEL VIRTUAL MACHINE AND MESSAGE PASSING INTERFACE, 2006, 4192 : 12 - 21
  • [6] Towards Generating Thread-Safe Classes Automatically
    Wang, Haichi
    Wang, Zan
    Sun, Jun
    Liu, Shuang
    Sadiq, Ayesha
    Li, Yuan-Fang
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 943 - 955
  • [7] Cuckoo: a language for implementing memory-safe and thread-safe system
    West, R
    Wong, GT
    PLC '05: PROCEEDINGS OF THE 2005 INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGES AND COMPILERS, 2005, : 94 - 100
  • [8] Fyr: a memory-safe and thread-safe systems programming language
    Weis, Torben
    Waltereit, Marian
    Uphoff, Maximilian
    SAC '19: PROCEEDINGS OF THE 34TH ACM/SIGAPP SYMPOSIUM ON APPLIED COMPUTING, 2019, : 1574 - 1577
  • [9] TOSThreads: Thread-safe and Non-invasive Preemption in TinyOS
    Klues, Kevin
    Liang, Chieh-Jan Mike
    Paek, Jeongyeup
    Musaloiu-E, Razvan
    Levis, Philip
    Terzis, Andreas
    Govindan, Ramesh
    SENSYS 09: PROCEEDINGS OF THE 7TH ACM CONFERENCE ON EMBEDDED NETWORKED SENSOR SYSTEMS, 2009, : 127 - 140
  • [10] Efficient Test Case Generation for Thread-Safe Classes
    Bo, Lili
    Jiang, Shujuan
    Qian, Junyan
    Wang, Rongcun
    Wang, Xingya
    IEEE ACCESS, 2019, 7 : 26984 - 26995