Reference Capabilities for Safe Parallel Array Programming

05/31/2019
by   Beatrice Åkerblom, et al.
0

The array is a fundamental data structure that provides an efficient way to store and retrieve non-sparse data contiguous in memory. Arrays are important for the performance of many memory-intensive applications due to the design of modern memory hierarchies: contiguous storage facilitates spatial locality and predictive access patterns which enables prefetching.perations on large arrays often lend themselves well to parallelisation, such as a fork-join style divide-and-conquer algorithm for sorting. For parallel operations on arrays to be deterministic, data-race freedom must be guaranteed. For operations on arrays of primitive data, data-race freedom is obtained by coordinating accesses so that no two threads operate on the same array indices. This is however not enough for arrays of non-primitives due to aliasing: accesses of separate array elements may return pointers to the same object, or overlapping structures.eference capabilities have been used successfully in the past to statically guarantee the absence of data-races in object-oriented programs. This paper presents the first extension of reference capabilities---called array capabilities---that support concurrent and parallel operations on arrays of both primitive and non-primitive values. In addition to element access, array capabilities support the abstract manipulation of arrays, logical splitting of arrays into subarrays, and merging subarrays. These operations allow expressing a wide range of array use cases. (edited) his paper presents the array capability design space and show how it applies to a number of array use cases. The core ideas are formalised and proven sound in a simple calculus, along with a proof that shows that well-typed programs with array capabilities are free from data-races.

READ FULL TEXT
research
08/31/2020

Constraint-Logic Object-Oriented Programming with Free Arrays

Constraint-logic object-oriented programming provides a useful symbiosis...
research
06/09/2022

Linear Delta Arrays for Compliant Dexterous Distributed Manipulation

This paper presents a new type of distributed dexterous manipulator: del...
research
09/03/2019

Towards Gradual Checking of Reference Capabilities

Concurrent and parallel programming is difficult due to the presence of ...
research
09/08/2022

Looplets: A Language For Structured Coiteration

Real world arrays often contain underlying structure, such as sparsity, ...
research
10/13/2019

Modelling Resistive and Phase Change Memory with Passive Selector Arrays – A Matlab Tool

Memristor devices are crucial for developing neuromorphic computers and ...
research
10/10/2017

A Lambda Calculus for Transfinite Arrays: Unifying Arrays and Streams

Array programming languages allow for concise and generic formulations o...
research
06/13/2023

Efficient GPU Implementation of Affine Index Permutations on Arrays

Optimal usage of the memory system is a key element of fast GPU algorith...

Please sign up or login with your details

Forgot password? Click here to reset