• DocumentCode
    2820301
  • Title

    Monitor preprocessor for Pthreads

  • Author

    Guo, Jinhua ; Seely, Stan

  • Author_Institution
    Dept. of Comput. & Inf. Sci., Michigan Univ., Dearborn, MI, USA
  • fYear
    2004
  • fDate
    20-23 Oct. 2004
  • 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.
  • Keywords
    computer science education; data encapsulation; operating systems (computers); synchronisation; Pthread library; abstract data type; monitor procedures; mutex locks; preprocessor monitor; private data encapsulation; Computer languages; Computerized monitoring; Condition monitoring; Information science; Java; Libraries; Operating systems; Protection; Timing; Yarn;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Frontiers in Education, 2004. FIE 2004. 34th Annual
  • ISSN
    0190-5848
  • Print_ISBN
    0-7803-8552-7
  • Type

    conf

  • DOI
    10.1109/FIE.2004.1408714
  • Filename
    1408714