1,286 research outputs found
Efficient optimization of memory accesses in parallel programs
The power, frequency, and memory wall problems have caused a major shift in mainstream computing by introducing processors that contain multiple low power cores. As multi-core processors are becoming ubiquitous, software trends in both parallel programming languages and dynamic compilation have added new challenges to program compilation for multi-core processors. This thesis proposes a combination of high-level and low-level compiler optimizations to address these challenges.
The high-level optimizations introduced in this thesis include new approaches to May-Happen-in-Parallel analysis and Side-Effect analysis for parallel programs and a novel parallelism-aware Scalar Replacement for Load Elimination transformation. A new Isolation Consistency (IC) memory model is described that permits several scalar replacement transformation opportunities compared to many existing memory models.
The low-level optimizations include a novel approach to register allocation that retains the compile time and space efficiency of Linear Scan, while delivering runtime performance superior to both Linear Scan and Graph Coloring. The allocation phase is modeled as an optimization problem on a Bipartite Liveness Graph (BLG) data structure. The assignment phase focuses on reducing the number of spill instructions by using register-to-register move and exchange instructions wherever possible.
Experimental evaluations of our scalar replacement for load elimination transformation in the Jikes RVM dynamic compiler show decreases in dynamic counts for getfield operations of up to 99.99%, and performance improvements of up to 1.76x on 1 core, and 1.39x on 16 cores, when compared with the load elimination algorithm available in Jikes RVM. A prototype implementation of our BLG register allocator in Jikes RVM demonstrates runtime performance improvements of up to 3.52x relative to Linear Scan on an x86 processor. When compared to Graph Coloring register allocator in the GCC compiler framework, our allocator resulted in an execution time improvement of up to 5.8%, with an average improvement of 2.3% on a POWER5 processor.
With the experimental evaluations combined with the foundations presented in this thesis, we believe that the proposed high-level and low-level optimizations are useful in addressing some of the new challenges emerging in the optimization of parallel programs for multi-core architectures
Formal foundations for hybrid effect analysis
Type-and-effect systems are a powerful tool for program construction and verification. Type-and-effect systems are useful because it can help reduce bugs in computer programs, enable compiler optimizations and also provide sort of program documentation. As software systems increasingly embrace dynamic features and complex modes of compilation, static effect systems have to reconcile over competing goals such as precision, soundness, modularity, and programmer productivity. In this thesis, we propose the idea of combining static and dynamic analysis for effect systems to improve precision and flexibility.
We describe intensional effect polymorphism, a new foundation for effect systems that integrates static and dynamic effect checking. Our system allows the effect of polymorphic code to be intensionally inspected. It supports a highly precise notion of effect polymorphism through a lightweight notion of dynamic typing. When coupled with parametric polymorphism, the powerful system utilizes runtime information to enable precise effect reasoning, while at the same time retains strong type safety guarantees. The technical innovations of our design include a relational notion of effect checking, the use of bounded existential types to capture the subtle interactions between static typing and dynamic typing, and a differential alignment strategy to achieve efficiency in dynamic typing.
We introduce the idea of first-class effects, where the computational effect of an expression can be programmatically reflected, passed around as values, and analyzed at run time. A broad range of designs โhard-coded in existing effect-guided analyses can be supported through intuitive programming abstractions. The core technical development is a type system with a couple of features. Our type system provides static guarantees to application-specific effect management properties through refinement types, promoting โcorrect-by-design effect-guided programming. Also, our type system computes not only the over-approximation of effects, but also their under-approximation. The duality unifies the common theme of permission vs. obligation in effect reasoning.
Finally, we show the potential benefit of intensional effects by applying it to an event-driven system to obtain safe concurrency. The technical innovations of our system include a novel effect system to soundly approximate the dynamism introduced by runtime handlers registration, a static analysis to precompute the effects and a dynamic analysis that uses the precomputed effects to improve concurrency. Our design simplifies modular concurrency reasoning and avoids concurrency hazards
Reductie van het geheugengebruik van besturingssysteemkernen Memory Footprint Reduction for Operating System Kernels
In ingebedde systemen is er vaak maar een beperkte hoeveelheid geheugen beschikbaar. Daarom wordt er veel aandacht besteed aan het produceren van compacte programma's voor deze systemen, en zijn er allerhande technieken ontwikkeld die automatisch het geheugengebruik van programma's kunnen verkleinen. Tot nu toe richtten die technieken zich voornamelijk op de toepassingssoftware die op het systeem draait, en werd het besturingssysteem over het hoofd gezien. In dit proefschrift worden een aantal technieken beschreven die het mogelijk maken om op een geautomatiseerde manier het geheugengebruik van een besturingssysteemkern gevoelig te verkleinen. Daarbij wordt in eerste instantie gebruik gemaakt van compactietransformaties tijdens het linken. Als we de hardware en software waaruit het systeem samengesteld is kennen, is het mogelijk om nog verdere reducties te bekomen. Daartoe wordt de kern gespecialiseerd voor een bepaalde hardware-software combinatie. Overbodige functionaliteit wordt opgespoord en uit de kern verwijderd, terwijl de resterende functionaliteit wordt aangepast aan de specifieke gebruikspatronen die uit de hardware en software kunnen afgeleid worden. Als laatste worden technieken voorgesteld die het mogelijk maken om weinig of niet uitgevoerde code (bijvoorbeeld code voor het afhandelen van slechts zeldzaam optredende foutcondities) uit het geheugen te verwijderen. Deze code wordt dan enkel ingeladen op het moment dat ze effectief nodig is. Voor ons testsysteem kunnen we met de gecombineerde technieken het geheugengebruik van een Linux 2.4 kern met meer dan 48% verminderen
C์ ์ ์์ค ๊ธฐ๋ฅ๊ณผ ์ปดํ์ผ๋ฌ ์ต์ ํ ์กฐํ์ํค๊ธฐ
ํ์๋
ผ๋ฌธ (๋ฐ์ฌ)-- ์์ธ๋ํ๊ต ๋ํ์ : ๊ณต๊ณผ๋ํ ์ปดํจํฐ๊ณตํ๋ถ, 2019. 2. ํ์ถฉ๊ธธ.์ฃผ๋ฅ C ์ปดํ์ผ๋ฌ๋ค์ ํ๋ก๊ทธ๋จ์ ์ฑ๋ฅ์ ๋์ด๊ธฐ ์ํด ๊ณต๊ฒฉ์ ์ธ ์ต์ ํ๋ฅผ ์ํํ๋๋ฐ, ๊ทธ๋ฐ ์ต์ ํ๋ ์ ์์ค ๊ธฐ๋ฅ์ ์ฌ์ฉํ๋ ํ๋ก๊ทธ๋จ์ ํ๋์ ๋ฐ๊พธ๊ธฐ๋ ํ๋ค. ๋ถํํ๋ C ์ธ์ด๋ฅผ ๋์์ธํ ๋ ์ ์์ค ๊ธฐ๋ฅ๊ณผ ์ปดํ์ผ๋ฌ ์ต์ ํ๋ฅผ ์ ์ ํ๊ฒ ์กฐํ์ํค๊ฐ ๊ต์ฅํ ์ด๋ ต๋ค๋ ๊ฒ์ด ํ๊ณ์ ์
๊ณ์ ์ค๋ก ์ด๋ค. ์ ์์ค ๊ธฐ๋ฅ์ ์ํด์๋, ๊ทธ๋ฌํ ๊ธฐ๋ฅ์ด ์์คํ
ํ๋ก๊ทธ๋๋ฐ์ ์ฌ์ฉ๋๋ ํจํด์ ์ ์ง์ํด์ผ ํ๋ค. ์ปดํ์ผ๋ฌ ์ต์ ํ๋ฅผ ์ํด์๋, ์ฃผ๋ฅ ์ปดํ์ผ๋ฌ๊ฐ ์ํํ๋ ๋ณต์กํ๊ณ ๋ ํจ๊ณผ์ ์ธ ์ต์ ํ๋ฅผ ์ ์ง์ํด์ผ ํ๋ค. ๊ทธ๋ฌ๋ ์ ์์ค ๊ธฐ๋ฅ๊ณผ ์ปดํ์ผ๋ฌ ์ต์ ํ๋ฅผ ๋์์ ์ ์ง์ํ๋ ์คํ์๋ฏธ๋ ์ค๋๋ ๊น์ง ์ ์๋ ๋ฐ๊ฐ ์๋ค.
๋ณธ ๋ฐ์ฌํ์ ๋
ผ๋ฌธ์ ์์คํ
ํ๋ก๊ทธ๋๋ฐ์์ ์๊ธดํ๊ฒ ์ฌ์ฉ๋๋ ์ ์์ค ๊ธฐ๋ฅ๊ณผ ์ฃผ์ํ ์ปดํ์ผ๋ฌ ์ต์ ํ๋ฅผ ์กฐํ์ํจ๋ค. ๊ตฌ์ฒด์ ์ผ๋ก, ์ฐ๋ฆฐ ๋ค์ ์ฑ์ง์ ๋ง์กฑํ๋ ๋์จํ ๋์์ฑ, ๋ถํ ์ปดํ์ผ, ์ ์-ํฌ์ธํฐ ๋ณํ์ ์คํ์๋ฏธ๋ฅผ ์ฒ์์ผ๋ก ์ ์ํ๋ค. ์ฒซ์งธ, ๊ธฐ๋ฅ์ด ์์คํ
ํ๋ก๊ทธ๋๋ฐ์์ ์ฌ์ฉ๋๋ ํจํด๊ณผ, ๊ทธ๋ฌํ ํจํด์ ๋
ผ์ฆํ ์ ์๋ ๊ธฐ๋ฒ์ ์ง์ํ๋ค. ๋์งธ, ์ฃผ์ํ ์ปดํ์ผ๋ฌ ์ต์ ํ๋ค์ ์ง์ํ๋ค. ์ฐ๋ฆฌ๊ฐ ์ ์ํ ์คํ์๋ฏธ์ ์์ ๊ฐ์ ์ป๊ธฐ ์ํด ์ฐ๋ฆฌ๋ ๋
ผ๋ฌธ์ ์ฃผ์ ๊ฒฐ๊ณผ๋ฅผ ๋๋ถ๋ถ Coq ์ฆ๋ช
๊ธฐ ์์์ ์ฆ๋ช
ํ๊ณ , ๊ทธ ์ฆ๋ช
์ ๊ธฐ๊ณ์ ์ด๊ณ ์๋ฐํ๊ฒ ํ์ธํ๋ค.To improve the performance of C programs, mainstream compilers perform aggressive optimizations that may change the behaviors of programs that use low-level features in unidiomatic ways. Unfortunately, despite many years of research and industrial efforts, it has proven very difficult to adequately balance the conflicting criteria for low-level features and compiler optimizations in the design of the C programming language. On the one hand, C should support the common usage patterns of the low-level features in systems programming. On the other hand, C should also support the sophisticated and yet effective optimizations performed by mainstream compilers. None of the existing proposals for C semantics, however, sufficiently support low-level features and compiler optimizations at the same time.
In this dissertation, we resolve the conflict between some of the low-level features crucially used in systems programming and major compiler optimizations. Specifically, we develop the first formal semantics of relaxed-memory concurrency, separate compilation, and cast between integers and pointers that (1) supports their common usage patterns and reasoning principles for programmers, and (2) provably validates major compiler optimizations at the same time. To establish confidence in our formal semantics, we have formalized most of our key results in the Coq theorem prover, which automatically and rigorously checks the validity of the results.Abstract
Acknowledgements
Chapter I Prologue
Chapter II Relaxed-Memory Concurrency
Chapter III Separate Compilation and Linking
Chapter IV Cast between Integers and Pointers
Chapter V Epilogue
์ด๋กDocto
Intensional Effect Polymorphism
Type-and-effect systems are a powerful tool for program construction and verification. We describe intensional effect polymorphism, a new foundation for effect systems that integrates static and dynamic effect checking. Our system allows the effect of polymorphic code to be intensionally inspected through a lightweight notion of dynamic typing. When coupled with parametric polymorphism, the powerful system utilizes runtime information to enable precise effect reasoning, while at the same time retains strong type safety guarantees. We build our ideas on top of an imperative core calculus with regions. The technical innovations of our design include a relational notion of effect checking, the use of bounded existential types to capture the subtle interactions between static typing and dynamic typing, and a differential alignment strategy to achieve efficiency in dynamic typing. We demonstrate the applications of intensional effect polymorphism in concurrent programming, security, graphical user interface access, and memoization
Micro Virtual Machines: A Solid Foundation for Managed Language Implementation
Today new programming languages proliferate, but many of them
suffer from
poor performance and inscrutable semantics. We assert that the
root of
many of the performance and semantic problems of today's
languages is
that language implementation is extremely difficult. This
thesis
addresses the fundamental challenges of efficiently developing
high-level
managed languages.
Modern high-level languages provide abstractions over execution,
memory
management and concurrency. It requires enormous intellectual
capability
and engineering effort to properly manage these concerns.
Lacking such
resources, developers usually choose naive implementation
approaches
in the early stages of language design, a strategy which too
often has
long-term consequences, hindering the future development of the
language. Existing language development platforms have failed
to
provide the right level of abstraction, and forced implementers
to
reinvent low-level mechanisms in order to obtain performance.
My thesis is that the introduction of micro virtual machines will
allow
the development of higher-quality, high-performance managed
languages.
The first contribution of this thesis is the design of Mu, with
the
specification of Mu as the main outcome. Mu is
the first micro virtual machine, a robust, performant, and
light-weight
abstraction over just three concerns: execution, concurrency and
garbage
collection. Such a foundation attacks three of the most
fundamental and
challenging issues that face existing language designs and
implementations, leaving the language implementers free to focus
on the
higher levels of their language design.
The second contribution is an in-depth analysis of on-stack
replacement
and its efficient implementation. This low-level mechanism
underpins
run-time feedback-directed optimisation, which is key to the
efficient
implementation of dynamic languages.
The third contribution is demonstrating the viability of Mu
through
RPython, a real-world non-trivial language implementation. We
also did
some preliminary research of GHC as a Mu client.
We have created the Mu specification and its reference
implementation,
both of which are open-source. We show that that Mu's on-stack
replacement API can gracefully support dynamic languages such as
JavaScript, and it is implementable on concrete hardware. Our
RPython
client has been able to translate and execute non-trivial
RPython
programs, and can run the RPySOM interpreter and the core of the
PyPy
interpreter.
With micro virtual machines providing a low-level substrate,
language
developers now have the option to build their next language on a
micro
virtual machine. We believe that the quality of programming
languages
will be improved as a result
An Ada-like language to facilitate reliable coding of low cost embedded systems
Due to a lack of operating system (0/S) support, it is more difficult to develop programs for embedded systems than for workstations. For those developing on a low budget, the problem is often further compounded by the necessity of using inappropriate, 0/S dependent, compilers. This study attempts to ascertain those elements of a High Level Language (HLL) which are absolutely necessary and implementable to produce reliable, efficient, embedded programs without the benefit of a large budget. The study is based upon the Ada philosophy as the Ada language incorporates many desirable features for modelling real-world problems in terms of embedded solutions. By implication, the research provides a small step towards an increased availability of low cost tools to assist in the development of reliable and efficient code for use in medium performance embedded systems
Programming Languages and Systems
This open access book constitutes the proceedings of the 29th European Symposium on Programming, ESOP 2020, which was planned to take place in Dublin, Ireland, in April 2020, as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The actual ETAPS 2020 meeting was postponed due to the Corona pandemic. The papers deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
- โฆ