Show the spawned program, Computer Engineering

Assignment Help:

Q. Show the spawned program?

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_pkstr(buf);

   pvm_send(ptid, msgtag);

   pvm_exit();

}

Program is a listing of 'slave' or spawned program its first PVM action is to get the task id of 'master' using pvm_parent call. This program then gets its hostname and sends it to master using three-call sequence - pvm_initsend to start send buffer. Pvm_pkstr to place a string in a strongly typed and architecture independent manner into the send buffer and pvm_send to send it to destination process specified by ptid, 'tagging' the message with number1.


Related Discussions:- Show the spawned program

What is default look-and-feel of a swing component, The default Look and Fe...

The default Look and Feel of swing components are Java Look-and-Feel.

Explain what is defecttracker, DefectTracker from Pragmatic Software - D...

DefectTracker from Pragmatic Software - Defect Tracker is a fully web-based defect tracking and hold up ticket system that manages issues and bugs, customer needs, test cases, a

List the acid properties, a. List the ACID properties. Describe the usefuln...

a. List the ACID properties. Describe the usefulness of each. b. During its implementation, a transaction passes by several states, until it finally commits or aborts. List all

What is the use of digital switch, What is the use of digital switch? ...

What is the use of digital switch? Digital switch: This is a device which handles digital signals generated at or passed via a telephone company’s central office further

Perceptron training, Perceptron training: Here the weights are initial...

Perceptron training: Here the weights are initially assigned randomly and training examples are needed one after another to tweak the weights in the network. Means all the exa

Setjmp and longjmp, How does throwing and catching exceptions differ from u...

How does throwing and catching exceptions differ from using setjmp and longjmp? Ans) The throw operation calls the destructors for automatic objects instantiated as entry to th

What is secondary storage systems, There are various limitations of primary...

There are various limitations of primary memory like limited capacity which is its not enough to store a very large volume of data and volatility which is when power is turned off

Define the karnaugh maps (k maps), Define The Karnaugh Maps (K Maps) Th...

Define The Karnaugh Maps (K Maps) The Karnaugh map (K map) provides the systematic method for simplifying a Boolean expression or a truth table function when used properly the

Can a vector have a component equivalent to zero, Q. Can a vector have a co...

Q. Can a vector have a component equivalent to zero and still have a nonzero magnitude? Answer:- Yes For example the 2-dimensional vector (1, 0) has length sqrt (1+0) = 1

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd