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

Example of finding cross points and switches, For a non blocking crossbar c...

For a non blocking crossbar configuration, taking N as the number of subscribers, there will be               number of cross points and _             number of switches for est

Computer graphics, What is intractive graphics and user dialouge in comput...

What is intractive graphics and user dialouge in computer graphics

Binary search tree in the descending order, In order to get the information...

In order to get the information kept in a Binary Search Tree in the descending order, one should traverse it in which of the following order?    Right, Root, Left

What are modes of operation of centralized spc, What are modes of operation...

What are modes of operation of centralized SPC? In about all the present day electronic switching systems utilizing centralized control, only a two-processor configuration is

Illustrate about object oriented development, Illustrate about object orien...

Illustrate about object oriented development object oriented development is not direct way of system development as in this approach a holistic view of application domain is co

Define a B- tree of order m, Define a B tree of order m. B Tree of orde...

Define a B tree of order m. B Tree of order m  A balanced multiway search tree of order m in which every non root node having at least m/2 keys is known as a B-Tree of order

Unification, Unification: As just above this we have said that the rul...

Unification: As just above this we have said that the rules of inference for propositional logic detailed in the last lecture can also be required in first-order logic. Moreov

Functions in first-order logic sentences, Functions in first-order logic se...

Functions in first-order logic sentences - artificial intelligence: Functions may be thought of as special predicates, where we think of all but 1 of the arguments as input and

Explain interactive reporting, What is interactive reporting? A classic...

What is interactive reporting? A classical non-interactive report having of one program that makes a single list.  Instead of one extensive and detailed list, with interactive

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