Logo: to the web site of Uppsala University

uu.sePublications from Uppsala University
Change search
Link to record
Permanent link

Direct link
Wrigstad, Tobias, ProfessorORCID iD iconorcid.org/0000-0002-4269-5408
Publications (10 of 68) Show all publications
Parkinson, M. J., Clebsch, S. & Wrigstad, T. (2024). Reference Counting Deeply Immutable Data Structures with Cycles: An Intellectual Abstract. In: Bond, MD Lee, JW Payer, H (Ed.), Proceedings of the 2024 ACM Sigplan International Symposium on Memory Management, ISMM 2024: . Paper presented at 23rd ACM SIGPLAN International Symposium on Memory Management (ISMM), JUN 25, 2024, Copenhagen, DENMARK (pp. 131-141). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Reference Counting Deeply Immutable Data Structures with Cycles: An Intellectual Abstract
2024 (English)In: Proceedings of the 2024 ACM Sigplan International Symposium on Memory Management, ISMM 2024 / [ed] Bond, MD Lee, JW Payer, H, Association for Computing Machinery (ACM), 2024, p. 131-141Conference paper, Published paper (Refereed)
Abstract [en]

Immutable data structures are a powerful tool for building concurrent programs. They allow the sharing of data without the need for locks or other synchronisation mechanisms. This makes it much easier to reason about the correctness of the program. In this paper, we focus on what we call deep immutability from freeze, that is, objects are initially mutable, and then can be frozen, and from that point on the object and everything it refers to (transitively) can no longer be mutated. A key challenge with this form of immutability is "how to manage the memory of cyclic data structures?" The standard approach is to use a garbage collector (GC), or a back-up cycle detector. These approaches sacrifice the promptness of memory reclamation, and the determinism of memory usage. In this paper, we argue that memory underlying an immutable data structure can be efficiently managed using reference counting even in the presence of cycles, based on the observation that the cycles are themselves immutable. Our approach takes a classic algorithm for calculating strongly connected components (SCCs) and managing equivalence classes with union-find (UF), and combines them so that the liveness of each SCC can be tracked efficiently using only a single reference counter. The key observation is that since the graph is unchanging, we can calculate the SCCs once, in time that is almost linear in the size of the graph, and then use the result to reference count at the level of the SCCs. This gives precise reachability information, and does not require any backup mechanism to detect or handle cycles.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2024
Keywords
Reference Counting, Immutable Data Structures, Strongly Connected Components, Union-Find
National Category
Computer Sciences
Identifiers
urn:nbn:se:uu:diva-536797 (URN)10.1145/3652024.3665507 (DOI)001256917700011 ()979-8-4007-0615-8 (ISBN)
Conference
23rd ACM SIGPLAN International Symposium on Memory Management (ISMM), JUN 25, 2024, Copenhagen, DENMARK
Funder
Swedish Research Council, 2020-05346Swedish Research Council, 2023-05526Swedish Foundation for Strategic Research, SM19-0059
Available from: 2024-08-29 Created: 2024-08-29 Last updated: 2024-08-29Bibliographically approved
Shimchenko, M., Österlund, E. & Wrigstad, T. (2024). Scheduling Garbage Collection for Energy Efficiency on Asymmetric Multicore Processors. The Art, Science, and Engineering of Programming, 8(3), Article ID 10.
Open this publication in new window or tab >>Scheduling Garbage Collection for Energy Efficiency on Asymmetric Multicore Processors
2024 (English)In: The Art, Science, and Engineering of Programming, E-ISSN 2473-7321, Vol. 8, no 3, article id 10Article in journal (Refereed) Published
Abstract [en]

The growing concern for energy efficiency in the Information and Communication Technology (ICT) sector has prompted the exploration of resource management techniques. While hardware architectures, such as single-ISA asymmetric multicore processors (AMP), offer potential energy savings, there is still untapped potential for software optimizations. This paper aims to bridge this gap by investigating the scheduling of garbage collection (GC) activities on a heterogeneous architecture with both performance cores (“p-cores”) and energy cores (“e-cores”) to achieve energy savings.

Our study focuses on the concurrent ZGC collector in the context of Java Virtual Machines (JVM), as the energy aspect is not well studied in the context of latency-sensitive Java workloads. By comparing the energy efficiency, performance, latency, and memory utilization of executing GC on p-cores versus e-cores, we present compelling findings.

We demonstrate that scheduling GC work on e-cores overall leads to approximately 3% energy savings without performance and mean latency degradation while requiring no additional effort from developers. Overall energy reduction can increase to 5.3±0.0225% by tuning the number of e-cores (still not changing the program!).

Our findings highlight the practicality and benefits of scheduling GC on e-cores, showcasing the potential for energy savings in heterogeneous architectures running Java workloads while meeting critical latency requirements. Our research contributes to the ongoing efforts toward achieving a more sustainable and efficient ICT sector.

Place, publisher, year, edition, pages
Aspect-Oriented Software Association, 2024
Keywords
Energy-efficiency, Java, Garbage Collection, Asymmetric multicore processors
National Category
Computer Sciences
Identifiers
urn:nbn:se:uu:diva-526870 (URN)10.22152/programming-journal.org/2024/8/10 (DOI)
Funder
Swedish Research Council, 2020-05346Swedish Foundation for Strategic Research, SM19-0059
Available from: 2024-04-19 Created: 2024-04-19 Last updated: 2024-06-28Bibliographically approved
Castegren, E. & Wrigstad, T. (2023). Encore: Coda. In: Active Object Languages: Current Research Trends. Springer Nature
Open this publication in new window or tab >>Encore: Coda
2023 (English)In: Active Object Languages: Current Research Trends, Springer Nature, 2023Chapter in book (Refereed)
Abstract [en]

Encore is a programming language that was developed between 2014  and 2019. Encore was designed following the principle of  inversion of defaults: computations are concurrent (rather than  sequential) by default; data is isolated (rather than freely  sharable) by default. The language worked as a seedbed for a  large number of research ideas aimed at making programming with  active objects safe, expressive and efficient.

Encore allows active objects to share data but statically  ensures the absence of data races and allows fully concurrent  garbage collection. Active objects can synchronize using  first-class futures, which are also used to delegate and  coalesce computations across active objects. The type system  also supports orchestration of intra-object parallelism,  expressed using composable units of computation. Active objects  which see a lot of traffic can turn themselves into passive  objects protected by lock-free synchronization mechanisms to  avoid performance bottle-necks, while still facilitating safe  sharing and concurrent garbage collection.

This paper gives an overview of these features of Encore,  reflecting on lessons learned from trying to fit all of these  research ideas into a single language.

Place, publisher, year, edition, pages
Springer Nature, 2023
Series
Lecture Notes in Computer Science
National Category
Computer Sciences
Identifiers
urn:nbn:se:uu:diva-510262 (URN)10.1007/978-3-031-51060-1_3 (DOI)
Available from: 2023-08-25 Created: 2023-08-25 Last updated: 2024-06-19Bibliographically approved
Tavakolisomeh, S., Shimchenko, M., Osterlund, E., Bruno, R., Ferreira, P. & Wrigstad, T. (2023). Heap Size Adjustment with CPU Control. In: Moss, E Bruno, R (Ed.), PROCEEDINGS OF THE 20TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON MANAGED PROGRAMMING LANGUAGES AND RUNTIMES, MPLR 2023: . Paper presented at 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes (MPLR), OCT 22, 2023, Cascais, PORTUGAL (pp. 114-128). ASSOC COMPUTING MACHINERY
Open this publication in new window or tab >>Heap Size Adjustment with CPU Control
Show others...
2023 (English)In: PROCEEDINGS OF THE 20TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON MANAGED PROGRAMMING LANGUAGES AND RUNTIMES, MPLR 2023 / [ed] Moss, E Bruno, R, ASSOC COMPUTING MACHINERY , 2023, p. 114-128Conference paper, Published paper (Refereed)
Abstract [en]

This paper explores automatic heap sizing where developers let the frequency of GC expressed as a target overhead of the application's CPU utilisation, control the size of the heap, as opposed to the other way around. Given enough headroom and spare CPU, a concurrent garbage collector should be able to keep up with the application's allocation rate, and neither the frequency nor duration of GC should impact throughput and latency. Because of the inverse relationship between time spent performing garbage collection and the minimal size of the heap, this enables trading memory for computation and conversely, neutral to an application's performance. We describe our proposal for automatically adjusting the size of a program's heap based on the CPU overhead of GC. We show how our idea can be relatively easily integrated into ZGC, a concurrent collector in OpenJDK, and study the impact of our approach on memory requirements, throughput, latency, and energy.

Place, publisher, year, edition, pages
ASSOC COMPUTING MACHINERY, 2023
Keywords
JVM, Garbage Collection, Heap sizing policy
National Category
Computer Sciences
Identifiers
urn:nbn:se:uu:diva-523058 (URN)10.1145/3617651.3622988 (DOI)001142913500011 ()979-8-4007-0380-5 (ISBN)
Conference
20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes (MPLR), OCT 22, 2023, Cascais, PORTUGAL
Available from: 2024-02-16 Created: 2024-02-16 Last updated: 2024-05-06Bibliographically approved
Arvidsson, E., Castegren, E., Clebsch, S., Drossopoulou, S., Noble, J., Parkinson, M. J. & Wrigstad, T. (2023). Reference Capabilities for Flexible Memory Management. Paper presented at OOPSLA ACM SIGPLAN conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH), 22-27 October, 2023, Cascais, Portugal. Proceedings of the ACM on Programming Languages, 7(OOPSLA2), 1363-1393, Article ID 270.
Open this publication in new window or tab >>Reference Capabilities for Flexible Memory Management
Show others...
2023 (English)In: Proceedings of the ACM on Programming Languages, E-ISSN 2475-1421, Vol. 7, no OOPSLA2, p. 1363-1393, article id 270Article in journal (Refereed) Published
Abstract [en]

Verona is a concurrent object-oriented programming language that organises all the objects in a program into a forest of isolated regions. Memory is managed locally for each region, so programmers can control a program's memory use by adjusting objects' partition into regions, and by setting each region's memory management strategy. A thread can only mutate (allocate, deallocate) objects within one active region---its "window of mutability". Memory management costs are localised to the active region, ensuring overheads can be predicted and controlled. Moving the mutability window between regions is explicit, so code can be executed wherever it is required, yet programs remain in control of memory use. An ownership type system based on reference capabilities enforces region isolation, controlling aliasing within and between regions, yet supporting objects moving between regions and threads. Data accesses never need expensive atomic operations, and are always thread-safe.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2023
Keywords
memory management, type systems, isolation, ownership
National Category
Computer Sciences
Identifiers
urn:nbn:se:uu:diva-510261 (URN)10.1145/3622846 (DOI)001087279100050 ()
Conference
OOPSLA ACM SIGPLAN conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH), 22-27 October, 2023, Cascais, Portugal
Funder
Swedish Research Council, 2020-05346
Available from: 2023-08-25 Created: 2023-08-25 Last updated: 2023-11-17Bibliographically approved
Cheeseman, L., Parkinson, M. J., Clebsch, S., Kogias, M., Drossopoulou, S., Chisnall, D., . . . Liétar, P. (2023). When Concurrency Matters: Behaviour-Oriented Concurrency. Paper presented at OOPSLA 2023, ACM SIGPLAN conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH), 22-27 October, 2023, Cascais, Portugal. Proceedings of the ACM on Programming Languages, 7(OOPSLA2), 1531-1560
Open this publication in new window or tab >>When Concurrency Matters: Behaviour-Oriented Concurrency
Show others...
2023 (English)In: Proceedings of the ACM on Programming Languages, E-ISSN 2475-1421, Vol. 7, no OOPSLA2, p. 1531-1560Article in journal (Refereed) Published
Abstract [en]

Expressing parallelism and coordination is central for modern concurrent programming. Many mechanisms exist for expressing both parallelism and coordination. However, the design decisions for these two mechanisms are tightly intertwined. We believe that the interdependence of these two mechanisms should be recognised and achieved through a single, powerful primitive. We are not the first to realise this: the prime example is actor model programming, where parallelism arises through fine-grained decomposition of a program’s state into actors that are able to execute independently in parallel. However, actor model programming has a serious pain point: updating multiple actors as a single atomic operation is a challenging task. We address this pain point by introducing a new concurrency paradigm: Behaviour-Oriented Concurrency (BoC). In BoC, we are revisiting the fundamental concept of a behaviour to provide a more transactional concurrency model. BoC enables asynchronously creating atomic and ordered units of work with exclusive access to a collection of independent resources. In this paper, we describe BoC informally in terms of examples, which demonstrate the advantages of exclusive access to several independent resources, as well as the need for ordering. We define it through a formal model. We demonstrate its practicality by implementing a C++ runtime. We argue its applicability through the Savina benchmark suite: benchmarks in this suite can be more compactly represented using BoC in place of Actors, and we observe comparable, if not better, performance.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2023
National Category
Computer Sciences
Research subject
Computing Science
Identifiers
urn:nbn:se:uu:diva-510264 (URN)10.1145/3622852 (DOI)001087279100056 ()
Conference
OOPSLA 2023, ACM SIGPLAN conference on Systems, Programming, Languages, and Applications: Software for Humanity (SPLASH), 22-27 October, 2023, Cascais, Portugal
Funder
Swedish Research Council, 2020-05346
Available from: 2023-08-25 Created: 2023-08-25 Last updated: 2023-11-22Bibliographically approved
Shimchenko, M., Popov, M. & Wrigstad, T. (2022). Analysing and Predicting Energy Consumption of Garbage Collectors in OpenJDK. In: Elisa Gonzalez Boix; Tobias Wrigstad (Ed.), MPLR '22: Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes. Paper presented at MPLR '22: 19th International Conference on Managed Programming Languages and Runtimes, Brussels, Belgium, September 14-15, 2022 (pp. 3-15). New York: Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Analysing and Predicting Energy Consumption of Garbage Collectors in OpenJDK
2022 (English)In: MPLR '22: Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes / [ed] Elisa Gonzalez Boix; Tobias Wrigstad, New York: Association for Computing Machinery (ACM), 2022, p. 3-15Conference paper, Published paper (Refereed)
Abstract [en]

Sustainable computing needs energy-efficient software. This paper explores the potential of leveraging the nature of software written in managed languages: increasing energy efficiency by changing a program’s memory management strategy without altering a single line of code. To this end, we perform comprehensive energy profiling of 35 Java applications across four benchmarks. In many cases, we find that it is possible to save energy by replacing the default G1 collector with another without sacrificing performance. Furthermore, potential energy savings can be even higher if performance regressions are permitted. Inspired by these results, we study what the most energy-efficient GCs are to help developers prune the search space for energy profiling at a low cost. Finally, we show that machine learning can be successfully applied to the problem of finding an energy-efficient GC configuration for an application, reducing the cost even further.

Place, publisher, year, edition, pages
New York: Association for Computing Machinery (ACM), 2022
Keywords
Energy, GC, Java, Machine Learning
National Category
Computer Sciences
Research subject
Computer Science
Identifiers
urn:nbn:se:uu:diva-490859 (URN)10.1145/3546918.3546925 (DOI)978-1-4503-9696-7 (ISBN)
Conference
MPLR '22: 19th International Conference on Managed Programming Languages and Runtimes, Brussels, Belgium, September 14-15, 2022
Projects
JVMReCo
Funder
Swedish Foundation for Strategic Research, SM19-0059
Available from: 2022-12-15 Created: 2022-12-15 Last updated: 2024-05-06Bibliographically approved
Norlinder, J., Österlund, E. & Wrigstad, T. (2022). Compressed Forwarding Tables Reconsidered. In: Elisa Gonzalez Boix; Tobias Wrigstad (Ed.), MPLR '22: Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes. Paper presented at MPLR '22: 19th International Conference on Managed Programming Languages and Runtimes, Brussels, Belgium, September 14-15, 2022 (pp. 45-63). New York: Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Compressed Forwarding Tables Reconsidered
2022 (English)In: MPLR '22: Proceedings of the 19th International Conference on Managed Programming Languages and Runtimes / [ed] Elisa Gonzalez Boix; Tobias Wrigstad, New York: Association for Computing Machinery (ACM), 2022, p. 45-63Conference paper, Published paper (Refereed)
Abstract [en]

How concurrent compacting collectors store and manage forwarding information is crucial for their performance.

In this paper, we propose CFW, a representation technique for forwarding information that guarantees that forwarding information for an entire heap can be stored in at most 3.14% of its size. By providing such a guarantee, we simplify the task of deploying programs with respect to memory needs. This is important given how memory is typically the dominating factor in the cost model for cloud-based deployments.

We explore the design space of our technique through a prototype implementation on-top of ZGC. A rigorous performance evaluation shows promising results.

Place, publisher, year, edition, pages
New York: Association for Computing Machinery (ACM), 2022
Keywords
garbage collection, concurrent object relocation, forwarding information
National Category
Computer Sciences
Research subject
Computer Science
Identifiers
urn:nbn:se:uu:diva-490857 (URN)10.1145/3546918.3546928 (DOI)978-1-4503-9696-7 (ISBN)
Conference
MPLR '22: 19th International Conference on Managed Programming Languages and Runtimes, Brussels, Belgium, September 14-15, 2022
Projects
JVMReCo
Funder
Swedish Foundation for Strategic Research, SM19-0059
Available from: 2022-12-15 Created: 2022-12-15 Last updated: 2023-06-22Bibliographically approved
Yang, A. M. & Wrigstad, T. (2022). Deep Dive into ZGC: A Modern Garbage Collector in OpenJDK. ACM Transactions on Programming Languages and Systems, 44(4), Article ID 22.
Open this publication in new window or tab >>Deep Dive into ZGC: A Modern Garbage Collector in OpenJDK
2022 (English)In: ACM Transactions on Programming Languages and Systems, ISSN 0164-0925, Vol. 44, no 4, article id 22Article in journal (Refereed) Published
Abstract [en]

ZGC is a modern, non-generational, region-based, mostly concurrent, parallel, mark-evacuate collector recently added to OpenJDK. It aims at having GC pauses that do not grow as the heap size increases, offering low latency even with large heap sizes. The ZGC C++ source code is readily accessible in the OpenJDK repository, but reading it (25 KLOC) can be very intimidating, and one might easily get lost in low-level implementation details, obscuring the key concepts. To make the ZGC algorithm more approachable, this work provides a thorough description on a high-level, focusing on the overall design with moderate implementation details. To explain the concurrency aspects, we provide a SPIN model that allows studying races between mutators and GC threads, and how they are resolved in ZGC. Such a model is not only useful for learning the current design (offering a deterministic and interactive experience) but also beneficial for prototyping new ideas and extensions. Our hope is that our detailed description and the SPIN model will enable the use of ZGC as a building block for future GC research, and research ideas implemented on top of it could even be adopted in the industry more readily, bridging the gap between academia and industry in the context of GC research.

Place, publisher, year, edition, pages
New York: Association for Computing Machinery (ACM), 2022
National Category
Computer Sciences
Research subject
Computer Science
Identifiers
urn:nbn:se:uu:diva-490860 (URN)10.1145/3538532 (DOI)000910732700002 ()
Projects
JVMReCo
Funder
Swedish Foundation for Strategic Research, SM19-0059
Available from: 2022-12-15 Created: 2022-12-15 Last updated: 2023-02-23Bibliographically approved
Källén, M. & Wrigstad, T. (2021). Jupyter Notebooks on GitHub: Characteristics and Code Clones. The Art, Science, and Engineering of Programming, 5(3), Article ID 15.
Open this publication in new window or tab >>Jupyter Notebooks on GitHub: Characteristics and Code Clones
2021 (English)In: The Art, Science, and Engineering of Programming, E-ISSN 2473-7321, Vol. 5, no 3, article id 15Article in journal (Refereed) Published
Abstract [en]

Jupyter notebooks has emerged as a standard tool for data science programming. Programs in Jupyter notebooks are different from typical programs as they are constructed by a collection of code snippets interleaved with text and visualisation. This allows interactive exploration and snippets may be executed in different order which may give rise to different results due to side-effects between snippets. Previous studies have shown the presence of considerable code duplication – code clones – in sources of traditional programs, in both so-called systems programming languages and so-called scripting languages. In this paper we present the first large-scale study of code cloning in Jupyter notebooks. We analyse a corpus of 2.7 million Jupyter notebooks hosted on GitHJub, representing 37 million individual snippets and 227 million lines of code. We study clones at the level of individual snippets, and study the extent to which snippets are recurring across multiple notebooks. We study both identical clones and approximate clones and conduct a small-scale ocular inspection of the most common clones. We find that code cloning is common in Jupyter notebooks – more than 70% of all code snippets are exact copies of other snippets (with possible differences in white spaces), and around 50% of all notebooks do not have any unique snippet, but consists solely of snippets that are also found elsewhere. In notebooks written in Python, at least 80% of all snippets are approximate clones and the prevalence of code cloning is higher in Python than in other languages. We further find that clones between different repositories are far more common than clones within the same repository. However, the most common individual repository from which a Jupyter notebook contains clones is the repository in which itself resides.

Keywords
Jupyter notebooks, Mining software repositories, Code cloning, Software analytics
National Category
Software Engineering Computational Mathematics
Identifiers
urn:nbn:se:uu:diva-429906 (URN)10.22152/programming-journal.org/2021/5/15 (DOI)
Funder
eSSENCE - An eScience Collaboration
Available from: 2021-01-05 Created: 2021-01-05 Last updated: 2024-06-28Bibliographically approved
Projects
Structured Aliasing [2012-04967_VR]; Uppsala UniversitySCADA: Scalable Data for Pervasive Parallelism [2014-05545_VR]; Uppsala UniversityAccelerating Managed Languages [2020-05346_VR]; Uppsala University
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0002-4269-5408

Search in DiVA

Show all publications

Profile pages

http://wrigstad.com