Return to search

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

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. / Thesis / Doctor of Philosophy (PhD)

Identiferoai:union.ndltd.org:mcmaster.ca/oai:macsphere.mcmaster.ca:11375/25567
Date January 2020
CreatorsYao, Shucai
ContributorsSekerinski, Emil, Farmer, William M., Computer Science
Source SetsMcMaster University
LanguageEnglish
Detected LanguageEnglish
TypeThesis

Page generated in 0.0031 seconds