Download presentation
Presentation is loading. Please wait.
Published byFranklin Harvison Modified over 10 years ago
1
Parallel Virtual Machine Rama Vykunta
2
Introduction n PVM provides a unified frame work for developing parallel programs with the existing infrastructure n PVM enables a collection of heterogeneous computer systems as a single parallel virtual machine n Transparent to the user
3
Introduction n A simple computing model based on tasks is used which is given by a set of well defined function calls n An application is written as a set of co- operating tasks n Processes communicate/synchronize with other processes
4
Introduction n Process management, machine configuration and support for input/output is possible n User can configure the hosts according to the demand. He can position certain tasks on the most appropriate machines n Unit of parallelism in PVM is a task
5
n All tasks on PVM cooperate by sending and receiving messages from one another n PVM supports functional and data parallelism n A well defined library of PVM interface routines are used for programming
6
Details n PVM system is composed of two parts – Daemon(pvmd) that resides on all computers making the virtual machine – The second part of the system is a library of PVM interface routines n All PVM tasks are identified by an integer task identifier (TID) n A task can join or leave any group any time without having to inform any other task in the affected groups
7
Details n User can write programs in C, C++ or Fortran which contain embedded calls to the PVM library n Starting PVM –% pvm –pvm>add hostname –pvm>delete hostname –pvm>conf –pvm>ps -a –pvm>halt
8
Details n To compile use architecture independent aimk which automatically determines the architecture and links any OS specific libraries to the application n PVM supports use of multiple consoles, it is possible to run a console on any host and also to run multiple consoles on the same machine
9
Details n PVM supports two models of computation namely crowd computing and tree computing. n Crowd computing is a collection of closely related processes, typically executing the same code n Tree computing in which processes are spawned dynamically as the computation progresses
10
Example main() { int cc, tid, msgtag; char buf[100]; printf(Im t%x\n, pvm_mytid()); cc = pvm_spawn(hello_other, (char**)0, 0,, 1, &tid); if(cc == 1) { msgtag = 1; pvm_recv(tid, msgtag); pvm_upkstr(buf); printf(from t%x: %s\n, tid, buf); } else printf(cant start hello_other\n); pvm_exit(); }
11
Example # include pvm3.h main() { int ptid, msgtag; char buf[100]; ptid = pvm_parent(); strcpy(buf, hello, world from); gethostname(buf + strlen(buf), 64); msgtag = 1; pvm_initsend(PvmDataDefault); pvm_upkstr(buf); pvm_send(ptid, msgtag); pvm_exit(); }
12
Example n After printing the task ID it initiates the copy of the other program called hello_other using pvm_spawn() function. n The main program recieves the message using pvm_recv() function and the buffer is exracted by pvm_upkstr() n The final pvm_exit() call dissociates the program from the PVM system
13
XPVM n XPVM is a GUI tool for analyzing the parallel programs in PVM n XPVM is can be used as a trace monitor and a call-level debugger extension to the PVM n XPVM is based on PVM, TCL and TK n XPVM can be used to view task utilization, network view, space-time view and message-queue view.
14
XPVM n Hosts can be added and removed form the virtual machine n Using the task menu, tasks can be spawned, killed or signaled n Each host is connected to the network by a link and a color is used to indicate the state of the host –Green: Actively running the tasks –White: Host is idling –Yellow: Host is not busy collecting information
15
XPVM n Space - Time view displays the status of the tasks and hosts during a program execution n Utilization view shows the overall computing state during a given instance n Trace view prints the tasks during each instance of activity n Event History view contains all the trace events in the trace file
16
References n PVM: Parallel Virtual Machine: A Users' Guide and Tutorial for Networked Parallel Computing MIT Press Scientific and Engineering Computation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.