2005Unpublished venueRequires access

Monitor preprocessor for pthreads

Jinhua Guo, Sari Seely

Open publisher page 0 citations

Abstract

A monitor construct is an abstract data type, which encapsulates private data with public methods to operate on that data. Mutual exclusion is provided implicitly by ensuring that procedures in the same monitor are not executed concurrently. Condition synchronization in monitors is provided explicitly by means of condition variables. This makes a concurrent program easier to develop and easier to understand. Although the Pthread library contains dozens of functions for threading and synchronization, it does not provide direct support for the monitor. Students must explicitly provide mutual exclusion around "monitor procedures" using mutex locks. However, monitor procedures by definition execute with implicit mutual exclusion. This makes it hard to teach the monitor concept in class and explain the semantic differences between monitors and semaphores. To solve this problem, we have designed and implemented a monitor preprocessor for Pthreads that provides explicit support for monitors in Pthreads.

About this research paper

What this paper is about

A monitor construct is an abstract data type, which encapsulates private data with public methods to operate on that data. Mutual exclusion is provided implicitly by ensuring that procedures in the same monitor are not executed concurrently. Condition synchronization in monitors is provided explicitly by means of condition variables. This makes a concurrent program easier to develop and easier to understand. Although the Pthread library contains dozens of functions for threading and synchronization, it does not provide direct support for the monitor. Students must explicitly provide mutual exclusion around "monitor procedures" using mutex locks. However, monitor procedures by definition execute with implicit mutual exclusion. This makes it hard to teach the monitor concept in class and explain the semantic differences between monitors and semaphores. To solve this problem, we have designed and implemented a monitor preprocessor for Pthreads that provides explicit support for monitors in Pthreads.

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

A monitor construct is an abstract data type, which encapsulates private data with public methods to operate on that data. Mutual exclusion is provided implicitly by ensuring that procedures in the same monitor are not executed concurrently. Condition synchronization in monitors is provided explicitly by means of condition variables. This makes a concurrent program easier to develop and easier to understand. Although the Pthread library contains dozens of functions for threading and synchronization, it does not provide direct support for the monitor. Students must explicitly provide mutual exclusion around "monitor procedures" using mutex locks. However, monitor procedures by definition execute with implicit mutual exclusion. This makes it hard to teach the monitor concept in class and explain the semantic differences between monitors and semaphores. To solve this problem, we have designed and implemented a monitor preprocessor for Pthreads that provides explicit support for monitors in Pthreads.

Key concepts: POSIX Threads, Semaphore, Mutual exclusion, Synchronization (alternating current), Computer science, Preprocessor, Closeness, Distributed computing

Related papers

Back to paper searchBrowse research topicsOriginal source
Monitor preprocessor for pthreads — Research Paper | ScholarLens