Reference Capabilities for Safe Parallel Array Programming

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 l...

Celý popis

Uloženo v:
Podrobná bibliografie
Vydáno v:The Art, Science, and Engineering of Programming Ročník 4; číslo 1
Hlavní autoři: Åkerblom, Beatrice, Castegren, Elias, Wrigstad, Tobias
Médium: Journal Article
Jazyk:angličtina
Vydáno: 2020
Témata:
ISSN:2473-7321, 2473-7321
On-line přístup:Získat plný text
Tagy: Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
Abstract 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. Operations on large arrays often lend themselves well to parallelisation, such as a fork-join style divideand-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. Reference capabilities have been used successfully in the past to statically guarantee the absence of dataraces in object-oriented programs by combining concepts such as uniqueness, read-only access, immutability, and borrowing. 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. We define a small language of operators on array capabilities. In addition to element access, these operations support the abstract manipulation of arrays: logical splitting of arrays into subarrays; merging subarrays; and in-place alignment of the physical elements of an array with the logical order defined through splitting and merging. The interplay of these operations with uniqueness, borrowing and read-only access allows expressing a wide range of array use cases. By formalising our type system and the dynamic semantics of the key operations on array capabilities in a simple calculus, we give a precise description of the array capabilities. We when prove type soundness and array disjointness—that two capabilities that allow mutation can never give access to overlapping sets of elements. Data-race freedom is stated as a corollary to these theorems, as data races require two array capabilities in different threads. In addition to the formal approach, we experiment with array capabilities on a small number of parallel array algorithms and report our preliminary findings. Array capabilities extend the safety of reference capabilities to arrays in a way that build cleanly on existing reference capability concepts and constructs. This allows programmers to express parallel array algorithms on a higher level than individual indices, and with absences of data races guaranteed statically.
AbstractList 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. Operations 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. Reference 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) This 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.
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. Operations on large arrays often lend themselves well to parallelisation, such as a fork-join style divideand-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. Reference capabilities have been used successfully in the past to statically guarantee the absence of dataraces in object-oriented programs by combining concepts such as uniqueness, read-only access, immutability, and borrowing. 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. We define a small language of operators on array capabilities. In addition to element access, these operations support the abstract manipulation of arrays: logical splitting of arrays into subarrays; merging subarrays; and in-place alignment of the physical elements of an array with the logical order defined through splitting and merging. The interplay of these operations with uniqueness, borrowing and read-only access allows expressing a wide range of array use cases. By formalising our type system and the dynamic semantics of the key operations on array capabilities in a simple calculus, we give a precise description of the array capabilities. We when prove type soundness and array disjointness—that two capabilities that allow mutation can never give access to overlapping sets of elements. Data-race freedom is stated as a corollary to these theorems, as data races require two array capabilities in different threads. In addition to the formal approach, we experiment with array capabilities on a small number of parallel array algorithms and report our preliminary findings. Array capabilities extend the safety of reference capabilities to arrays in a way that build cleanly on existing reference capability concepts and constructs. This allows programmers to express parallel array algorithms on a higher level than individual indices, and with absences of data races guaranteed statically.
Author Wrigstad, Tobias
Åkerblom, Beatrice
Castegren, Elias
Author_xml – sequence: 1
  givenname: Beatrice
  surname: Åkerblom
  fullname: Åkerblom, Beatrice
  organization: Stockholm University, Sweden
– sequence: 2
  givenname: Elias
  surname: Castegren
  fullname: Castegren, Elias
  organization: KTH Royal Institute of Technology, Sweden
– sequence: 3
  givenname: Tobias
  surname: Wrigstad
  fullname: Wrigstad, Tobias
  organization: Uppsala University, Sweden
BackLink https://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-313916$$DView record from Swedish Publication Index (Kungliga Tekniska Högskolan)
https://urn.kb.se/resolve?urn=urn:nbn:se:su:diva-177174$$DView record from Swedish Publication Index (Stockholms universitet)
BookMark eNqFkE1PwzAMhiM0JMbYf-gVia5xki4tt2p8SpNAfF2jtHVGoGuqZBPav6dsE-zGyZb1-LX8nJJB61ok5BzohDFIWdJ5t_B6ubTtIv5wa9_qZuL8ImGU0UQkcESGTEgeS85gcNCfkHEItqRCyGmeCjEkl09o0GNbYTTTnS5tY1cWQ2Scj561wehRe9002ESF93oTPf5dPiPHRjcBx_s6Iq831y-zu3j-cHs_K-ZxxSgXcclZhqmmeSV0SWvIAFIBINNMUGakrmqoUdaiTlMjZWX6MZZa5pQCRcwoH5GLXW74wm5dqs7bpfYb5bRVV_atUP3nKqwVSAlS9Hj8P_65elcceA7Tni92fOVdCB7N7wZQtdWtDnSrve5tyo9uJRTwb8DuffY
ContentType Journal Article
DBID AAYXX
CITATION
ADTPV
AFDQA
AOWAS
D8T
D8V
ZZAVC
ABAVF
DG7
DOI 10.22152/programming-journal.org/2020/4/1
DatabaseName CrossRef
SwePub
SWEPUB Kungliga Tekniska Högskolan full text
SwePub Articles
SWEPUB Freely available online
SWEPUB Kungliga Tekniska Högskolan
SwePub Articles full text
SWEPUB Stockholms universitet full text
SWEPUB Stockholms universitet
DatabaseTitle CrossRef
DatabaseTitleList

DeliveryMethod fulltext_linktorsrc
EISSN 2473-7321
ExternalDocumentID oai_DiVA_org_su_177174
oai_DiVA_org_kth_313916
10_22152_programming_journal_org_2020_4_1
GroupedDBID AAYXX
CITATION
M~E
ADTPV
AFDQA
AOWAS
D8T
D8V
ZZAVC
ABAVF
DG7
ID FETCH-LOGICAL-c2034-b328e5a09c4ab0d18115411758402f7acd1de7d4d55f77cf840eba790010ee803
ISSN 2473-7321
IngestDate Tue Nov 04 16:50:38 EST 2025
Tue Nov 04 16:58:36 EST 2025
Sat Nov 29 03:23:07 EST 2025
IsDoiOpenAccess true
IsOpenAccess true
IsPeerReviewed false
IsScholarly false
Issue 1
Language English
LinkModel OpenURL
MergedId FETCHMERGED-LOGICAL-c2034-b328e5a09c4ab0d18115411758402f7acd1de7d4d55f77cf840eba790010ee803
OpenAccessLink https://urn.kb.se/resolve?urn=urn:nbn:se:su:diva-177174
ParticipantIDs swepub_primary_oai_DiVA_org_su_177174
swepub_primary_oai_DiVA_org_kth_313916
crossref_primary_10_22152_programming_journal_org_2020_4_1
PublicationCentury 2000
PublicationDate 2020
PublicationDateYYYYMMDD 2020-01-01
PublicationDate_xml – year: 2020
  text: 2020
PublicationDecade 2020
PublicationTitle The Art, Science, and Engineering of Programming
PublicationYear 2020
SSID ssib044769544
Score 1.7235708
Snippet 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...
SourceID swepub
crossref
SourceType Open Access Repository
Index Database
SubjectTerms Arrays
Capabilities
Computer and Systems Sciences
data- och systemvetenskap
Parallelism
Type systems
Title Reference Capabilities for Safe Parallel Array Programming
URI https://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-313916
https://urn.kb.se/resolve?urn=urn:nbn:se:su:diva-177174
Volume 4
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
journalDatabaseRights – providerCode: PRVHPJ
  databaseName: ROAD: Directory of Open Access Scholarly Resources
  customDbUrl:
  eissn: 2473-7321
  dateEnd: 99991231
  omitProxy: false
  ssIdentifier: ssib044769544
  issn: 2473-7321
  databaseCode: M~E
  dateStart: 20170101
  isFulltext: true
  titleUrlDefault: https://road.issn.org
  providerName: ISSN International Centre
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV3Na9swFBddO8Yuo6UbS7cVH9pBDya2JFt2b1nW0UMJhaUlNyHLMkuTOsFORk_72_ee_JUENrrDLiYosqO83y_Sey_vg5AzFVKTYmYuzRhzuU60q1KauZ42Io5YEhtji7jeiNEomkzi2zqsubTtBESeR09P8fK_Qg1jADamzv4D3O1DYQBeA-hwBdjh-izgu9KxQzgIbewrWMM2nPC7ygzojAX2TwFkikJhfqAN0HpsjrCHjj6DKp2n_vk3cZ4bFQxtAN3O_QAe_vkeBTMAbL6wdPtibCOAlkNDVWKRitr3M5-qVrFHZwHoq5Z240XSvFO7JajX7VuUC-YKViU-N5ss3-XS7tZNscEuNhzuVu3WUsWADkxcgU_BTk3oa-hOr6062V-n9wMJs2W5lr4AS5W_IAdUgNGEQZ2_rpqdhnMRxoHt9Nuu9hW5aJbR_8Mi0FPk9Xnf31JitkrMWrVkfEje1PaEM6h4cET2TH5MLlsOOJsccIADDnLAaTjgWA44Gxi-JXffrsbDa7dukuFq6jHuJoxGJlBerLlKvBQUNlCKsf4qWO40E0qnfmpEytMgyITQGQybRIkYnQHGRB57R_bzRW7eE4dnESiEoL1oeLBKwijRQikm4lCFxnhhj1w231ouq1ooEmxIKzK5ITJZi8wigSKTXPo98rmSU3vrFmCz1Q_JfMwC75Hzv01skT155rwP5DWuoXKbfST7q2JtPpGX-udqWhanlha_Aapbfog
linkProvider ISSN International Centre
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Reference+Capabilities+for+Safe+Parallel+Array+Programming&rft.jtitle=The+Art%2C+Science%2C+and+Engineering+of+Programming&rft.au=%C3%85kerblom%2C+Beatrice&rft.au=Castegren%2C+Elias&rft.au=Wrigstad%2C+Tobias&rft.date=2020&rft.issn=2473-7321&rft.volume=4&rft.issue=1&rft_id=info:doi/10.22152%2Fprogramming-journal.org%2F2020%2F4%2F1&rft.externalDocID=oai_DiVA_org_su_177174
thumbnail_l http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=2473-7321&client=summon
thumbnail_m http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=2473-7321&client=summon
thumbnail_s http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=2473-7321&client=summon