ThreadMentor: An Overview

ThreadMentor is designed to help you learn multithreaded programming and the use of synchronization primitives easily. It consists of three components, a class library that simplifies your programming task, a visualization system that permits you to see the execution behavior of every threads and synchronization primitives in your threaded program, and mtuThread, a user-level kernel that supports non-preemptive multithreaded programming. The architecture of ThreadMentor is shown in the diagram below.

The class library of ThreadMentor supports thread creation, termination, join and yield, and most commonly seen synchronization primitives (e.g., locks, semaphores, monitors, barriers, and channels). When a program compiled with ThreadMentor is run, it will automatically bring up the visualization system. The visualization system is run in an address space that is independent of the running program so that it will not interfere the running program. The class library sends all all monitoring information of a running program to the visualization system, which uses various windows to display these information. A user can slowly run or even step through his/her program, and visualize all the details of every thread and every synchronization primitive.

ThreadMentor is portable and runs on Sun Solaris, Windows, any system (e.g., Linux) that supports Pthread, and mtuThread. However, all of these system dependent issues are hidden from the user by the class library. Therefore, ThreadMentor is platform transparent.