Back to search

McMaster University

An Efficient Implementation of Guard-Based Synchronization for an Object-Oriented Programming Language

Abstract

dc:description.abstract

Object-oriented programming has had a significant impact on software development because it provides programmers with a clear structure of a large system. It encapsulates data and operations into objects, groups objects into classes and dynamically binds operations to program code. With the emergence of multi-core processors, application developers have to explore concurrent programming to take full advantage of multi-core technology. However, when it comes to concurrent programming, object-oriented programming remains elusive as a useful programming tool. Most object-oriented programming languages do have some extensions for concurrency, but concurrency is implemented independently of objects: for example, concurrency in Java is managed separately with the Thread object. We employ a programming model called Lime that combines action systems tightly with object-oriented programming and implements concurrency by extending classes with actions and guarded methods. This provides programmers with a unified and straightforward design view for a concurrent object-oriented program. In this work, using coroutines with guarded methods and actions is proposed as a means of implementing the concurrency extension for objects. Mapping objects to coroutines can result in stack overflow as the number of objects increases. A dynamically segmented stack mechanism, which does not introduce runtime overhead, is implemented to support large-scale concurrency. Since Lime allows guarded methods and actions to "get stuck," a new user-level cooperative scheduler, and a fast coroutine context switch mechanism are implemented to improve the performance. Compared with the traditional segmented stack mechanisms, the new dynamically segmented stack mechanism gets equal performance for more common scenarios. Besides, it outperforms the contemporary stack mechanisms for deep recursion scenarios. Above all, Lime does not only provide the programmers with a unified and straightforward object-oriented programming model for concurrency, but also accomplishes a better performance than concurrent programming languages such as Erlang and Go, in fine-grained, highly concurrent benchmarks.

Degree

thesis:*
Department dc:contributor.department
Computer Science
Year dc:date.issued
2020

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Yao, Shucai
Advisors dc:contributor.advisor
  • Sekerinski, Emil
  • Farmer, William M.

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
McMaster University
Base URL
macsphere.mcmaster.ca/server/oai/request
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
citation

Yao, Shucai. An Efficient Implementation of Guard-Based Synchronization for an Object-Oriented Programming Language. 2020. http://hdl.handle.net/11375/25567