PIC microcontrollers are low-cost programmable integrated circuits, consume very little energy, but are hard to program due to very little available resources. They are traditionally programmed using low-level languag...
详细信息
ISBN:
(数字)9783319196862
ISBN:
(纸本)9783319196862;9783319196855
PIC microcontrollers are low-cost programmable integrated circuits, consume very little energy, but are hard to program due to very little available resources. They are traditionally programmed using low-level languages (e.g., assembler or subsets of C), which provide very few safeguards if any. This paper presents the issues we had to solve to successfully port a modern multi-paradigm general-purpose programminglanguage, which notably provides automatic memory management and strong static type checking, to this rather peculiar hardware.
Modern accelerator programming frameworks, such as OpenCL (TM), organise threads into work-groups. Remote-scope promotion (RSP) is a language extension recently proposed by AMD researchers that is designed to enable a...
详细信息
Modern accelerator programming frameworks, such as OpenCL (TM), organise threads into work-groups. Remote-scope promotion (RSP) is a language extension recently proposed by AMD researchers that is designed to enable applications, for the first time, both to optimise for the common case of intra-work-group communication (using memory scopes to provide consistency only within a work-group) and to allow occasional inter-work-group communication (as required, for instance, to support the popular load-balancing idiom of work stealing). We present the first formal, axiomatic memory model of OpenCL extended with RSP. We have extended the HERD memory model simulator with support for OpenCL kernels that exploit RSP, and used it to discover bugs in several litmus tests and a work-stealing queue, that have been used previously in the study of RSP. We have also formalised the proposed GPU implementation of RSP. The formalisation process allowed us to identify bugs in the description of RSP that could result in well-synchronised programs experiencing memory inconsistencies. We present and prove sound a new implementation of RSP that incorporates bug fixes and requires less non-standard hardware than the original implementation. This work, a collaboration between academia and industry, clearly demonstrates how, when designing hardware support for a new concurrent language feature, the early application of formal tools and techniques can help to prevent errors, such as those we have found, from making it into silicon.
Previous attempts at garbage collection in uncooperative environments have generally used conservative or mostly-conservative approaches. We describe a technique for doing fully type-accurate garbage collection in an ...
详细信息
Previous attempts at garbage collection in uncooperative environments have generally used conservative or mostly-conservative approaches. We describe a technique for doing fully type-accurate garbage collection in an uncooperative environment, using a "shadow stack" to link structs of pointer-containing variables, together with the data or code needed to trace them. We have implemented this in the Mercury compiler, which generates C code, and present preliminary performance data on the overheads of this technique. We also show how this technique can be extended to handle multithreaded applications.
暂无评论