This site is a snapshot of the project taken when resources for maintenance at a production level became unavailable.An updated local version of the software source tree is here . Compilation instructions are included in a README in the source tree. The updated user manual is here . This latest local version has only been tested on Linux. It includes a new feature that allows the user to control how message passing evolves within a given execution, and reflects a significant rewrite of the source, as well as substantial debugging and testing, of the snapshot version. |
ConcurrentMentor: Distributed Channel and Topology Homepage |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
![]() |
|
About |
As part of our on-going concurrent computing project,
this webpage serves as an online user manual for our software, called ConcurrentMentor.
ConcurrentMentor is an on-going effort to develop a programming environment
and visualization tool to support concurrent computing.
Currently, we provide an abstraction of communication channels with
a control process and vector-time class to support the channels. These
interfaces are subject to change as our implementation evolves. If you
are interested in how we integrate the programming environment and the
run-time visualization, you may visit our ThreadMentor
web site, which presents our design for a user-level thread library
and runtime visualization system.
ConcurrentMentor: A Concurrent Computing Programming Environment
and Visualization System
Principal Investigators:
Acknowledgments:
|
Overview |
As part of the ConcurrentMentor project, we have
designed a channel library to enable message passing between concurrent
processes. Channels abstract away low-level socket programming details
and put all important communication operations under a single, unified
interface. Furthermore, a visualization component will soon be included
to help students visualize the behavior of concurrent programs, synchronization
protocols, communication mechanisms, clock synchronization, and other algorithms.
To support remote process creation, we have designed and implemented a central control process, cmrun, which creates remote processes automatically. Users can specify the number of user processes and the hosts on which these processes will execute. Both synchronous channels (blocking send and blocking receive) and asynchronous channels (nonblocking send and blocking/nonblocking receive) are implemented in the channel library to support different types of one-to-one process communication. The logical time (VectorClock) class is also designed so that users can design/implement various distributed algorithms on top of channels. In the following sections, we present the interface details for the Channel, VectorClock and Topology classes. Users can download the library and a couple of testing programs from the "Download & Install" section below. |
Control Process |
Control process is responsible for creating the visualization
process, spawning all the user application processes, and communicating
with the visualization system so the visualization system can show the
user what is happening in the distributed computation processes in a realtime
manner
Note: Since the control process use "rsh" or "ssh" to spawn the user process on remote hosts, our software assumes that any of the machines listed in user's machinefile are accessible via "rsh" or "ssh" without requiring password entry, you may need to contact your system administrator for help on this.. How to use the Control Process: cmrun
cmrun -{rsh | ssh} [-np nprocs] [-mf machinefile] {-pf programfile | userprog [user_arg0,user_arg1, ... ]} {-help} "cmrun" can be used in two ways, one for creating user processes that all execute the same program in one computation, and the other for creating user processes that execute different user programs which are specified in a configuration file: programfile. -- 4 processes will be spawned on the local host, each process will execute program "foo". -- 4 processes will be spawned, each process will execute the program named "foo" with command line arguments "2 8" Execution locations will be taken from "machinefile" and assigned in round-robin fashion to the four processes. A specific example " machinefile" is given here. In this case, two processes will run on host bear.cs1.mtu.edu, 1 on bova.csl.mtu.edu and 1 on brin.csl.mtu.edu. Note: the hosts listed in machinefile
must be in the user's ".rhosts" in the user's home directory. Here is an
example .rhosts file.
programfile --- a file containing all of the user programs to run in one computation. Here is an example program file. Assume there are n machines in machinefile and m processes in programfile. If n = m, then there is a one-to-one correspondence between the machines in machinefile and the processes listed in programfile. If n > m, then the m processes are assigned to the first n machines in machinefile. If n < m, then the processes are assigned to the machines in a round-robin fashion. File Format:
A machinefile is a file that contains a list of the possible hosts on which you want your program to run. If user does NOT specify the machinefile when he/she fire up "cmrun", by default, all the user process will run on the local host where the control process "cmrun" is running. If user specify an set of machines in his/her own machine file, "cmrun" will then create user process on those machines. The machine file is very simple and is just a list of machines user want his/her program to urn. A specific example " machinefile" is given here. Each host name is specified on one line of the machinefile. Sample machine file for Linux machines in th CS lab of Michigan
Tech.:
The machinefile should be kept in the same directory as user's executable files and named something appropriate like machinefile. The name of your machinefile will be used as an argument to the "cmrun" option -mf. Note: Make sure the hosts listed
in your machinefile also listed in the your ".rhosts" file in your home
directory. Here is an example .rhosts
file.
A programfile is a file that contains a list of the executable file the user want to run on various machines. If user does NOT specify the programfile, then all the user process will execute the same program user specifies on the command line, in this case, we say it's like the "SPMD" computation model. If user want to execute different programs on different machines, he/she can specify a lists of executable programs in the programfile, the control process will then map each executable program to different machines listed in user's "machinefile". In this case, we say it's like the "MPMD" computation model. The machine file is very simple and is just a list of executable programs user to urn. A specific example programfile file is given here. Each executable program name and command line arguments are specified on one line of the programfile. Sample program file:
The programfile should be kept in the same directory as user's executable files and named something appropriate like programfile The name of your programfile will be used as an argument to the "cmrun" option -pf. Note: Make sure the absolute path
of each executable file is specified in the program file.
The .rhosts files list hosts and users that are trusted by the local host when a connection is made using the "rshd" service. The .rhosts file resides in a user's home directory and specifies the remote machines and remote user names that the user may use to remotely log in to the local machine. Each line of these files has the format: hostname [username] hostname may be given as a host name (typically, a fully qualified host name in a DNS environment), an address, or a + character indicating that all hosts are to be trusted. username, if specified, may be given as either a user name on the remote host or a + character indicating all users on hostname. Here is an example .rhosts file. User Process ID:
To determines the process ID of the calling process, user can call the function "getMyId( )". "myid" will be the process id of the user process assigned by the control process. The demo program shows how to do this. To determines the total number of user processes created by the control process, use can call the function "getNumProcs( )". "numprocesss" will be the number of user processes created by the control process. The demo program shows how to do this. int myId; // process id int nProcs; // total number of user processes ......... getMyId(&myId); // get process id getNumProcs(&nProcs); // get total number of process .......... |
Channel Class |
SynOneToOneChannel provides a synchronous inter-process communication channel (IPC), it's transparent of the physical location of user's processes and provide the user a communication mechanism to exchange information between a pair of processes. The class interface is defined in system header file: Channel.h //--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
PRECONDITION:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
NOTE:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
RETURN VALUE:
NOTE:
AsynOneToOneChannel class AsynOneToOneChannel is an asynchronous inter-process communication channel (IPC), it's transparent of the physical location of user processes and provides the user a asynchronous communication mechanism for information exchange between a pair of processes. The class interface is defined in system header file: Channel.h //--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
PRECONDITION:
--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
PRECONDITION:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
NOTE:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
RETURN VALUE:
NOTE:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
>PARAMETERS:
RETURN VALUE:
NOTE:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
RETURN VALUE:
|
VectorClock Class |
VectorClock is implemented in our channel library
to support "logical clock". A vector clock for system of N processes is
an array of N integers. Each process keeps its own vector clock, which
it uses to timestamp local events.
//--------------------------------------------------------------------------------------------
~VectorClock( ) ---> destructor VectorClock( const VectorClock& ) ---> copy constructor VectorClock& operator=(const VectorClock&) ---> copy assignment //--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
RETURN VALUE:
NOTE:
EXAMPLES:
//--------------------------------------------------------------------------------------------
DESCRIPTIONS:
PARAMETERS:
RETURN VALUE:
Monitor class is designed to check the Channel status (i.e. message availablity for receiving) of a given set of Channels within a user specified time bound. It is defined in a system header file Channel.h. Click here to enter into the Monitor class descriptions. |
Demo Program |
Below we provide several sample demo programs for you to get familar with ConcurrentMentor. Here we give the templete makefiles for Byzantine Generals Problem as templete. You can make corresponding changes to write you own makefile for other demo programs and your own programs.Makefile for LinuxMakefile for Solaris 1. Byzantine Generals' Problem
2. Distributed Dining Philosophers' Problem
6. Ring Topology Test Program
|
Download & Install |
Installing Channel/Topology Library for Linux:
Redhat Linux version 7.1 without visual support (CMLinux_Novisual.tar.gz, 100K) Redhat Linux Version 7.1 with visual support(CMLinux_Visual.tar.gz, 1.2M) Installing Channel/Topology Library for Solaris:
Sun Solaris 2.8 (CMSolaris.tar.gz (105K))
Installing Channel Library for Windows
the files readme.txt or quickstart.txt carefully before installing. Read the file key_authentication.txt to make your ssh works wothout requiring password entry.
Windows2000/NT (CMWindows_Novisual.tar.gz, 620K) Unzip and Untar the download file by using any one of the shareware
programs
|
Help |
This section will be a collection of all questions asked about ConcurrentMentor
and their solutions.
|