<< Chapter < Page | Chapter >> Page > |
The idea behind PVM is to assemble a diverse set of network-connected resources into a “virtual machine.” A user could marshal the resources of 35 idle workstations on the Internet and have their own personal scalable processing system. The work on PVM started in the early 1990s at Oak Ridge National Labs. PVM was pretty much an instant success among computer scientists. It provided a rough framework in which to experiment with using a network of workstations as a parallel processor.
In PVM Version 3, your virtual machine can consist of single processors, shared-memory multiprocessors, and scalable multiprocessors. PVM attempts to knit all of these resources into a single, consistent, execution environment.
To run PVM, you simply need a login account on a set of network computers that have the PVM software installed. You can even install it in your home directory. To create your own personal virtual machine, you would create a list of these computers in a file:
% cat hostfile
frodo.egr.msu.edugollum.egr.msu.edu
mordor.egr.msu.edu%
After some nontrivial machinations with paths and environment variables, you can start the PVM console:
% pvm hostfile
pvmd already running.pvm>conf
1 host, 1 data formatHOST DTID ARCH SPEED
frodo 40000 SUN4SOL2 1000gollum 40001 SUN4SOL2 1000
mordor 40002 SUN4SOL2 1000pvm>ps
HOST TID FLAG 0x COMMANDfrodo 40042 6/c,f pvmgs
pvm>reset
pvm>ps
HOST TID FLAG 0x COMMANDpvm>
Many different users can be running virtual machines using the same pool of resources. Each user has their own view of an empty machine. The only way you might detect other virtual machines using your resources is in the percentage of the time your applications get the CPU.
There is a wide range of commands you can issue at the PVM console. The ps command shows the running processes in your virtual machine. It’s quite possible to have more processes than computer systems. Each process is time-shared on a system along with all the other load on the system. The reset command performs a soft reboot on your virtual machine. You are the virtual system administrator of the virtual machine you have assembled.
To execute programs on your virtual computer, you must compile and link your programs with the PVM library routines: Note: the exact compilation may be different on your system.
% aimk mast slav
making in SUN4SOL2/ for SUN4SOL2cc -O -I/opt/pvm3/include -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ
-DSYSVSIGNAL -DNOWAIT3 -DNOUNIXDOM -o mast../mast.c -L/opt/pvm3/lib/SUN4SOL2 -lpvm3 -lnsl -lsocket
mv mast ˜crs/pvm3/bin/SUN4SOL2cc -O -I/opt/pvm3/include -DSYSVBFUNC -DSYSVSTR -DNOGETDTBLSIZ
-DSYSVSIGNAL -DNOWAIT3 -DNOUNIXDOM -o slav../slav.c -L/opt/pvm3/lib/SUN4SOL2 -lpvm3 -lnsl -lsocket
mv slav ˜crs/pvm3/bin/SUN4SOL2%
When the first PVM call is encountered, the application contacts your virtual machine and enrolls itself in the virtual machine. At that point it should show up in the output of the ps command issued at the PVM console.
Notification Switch
Would you like to follow the 'High performance computing' conversation and receive update notifications?