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 time slicing, What is time slicing? With this technique each pr...

What is time slicing? With this technique each program runs for a short period known as a time slice, and then another program runs for its time slice and so on.

Dick cheney approach, How many "true" terrorists are there in the US?  I do...

How many "true" terrorists are there in the US?  I don't know, but let's suppose that there are 3000 out of a total population of, say, 3,000,000.  That is, one person in 100,000 i

What is high level formatting, Q. What is High level formatting? In any...

Q. What is High level formatting? In any disk system the space at some time in use would become discarded and therefore will be free for other application. Operating system ass

Multiple assign statements targeting the same wire, What logic is inferred ...

What logic is inferred when there are multiple assign statements targeting the same wire? It's illegal to specify multiple assign statements to the same wire in a synthesizable

Advantages on electronic payment system, Advantages on electronic payment s...

Advantages on electronic payment system It gives good security schemes.  Four necessary security requirements for safe e-payments are Authentication, Encryption, Integrity,

Principles of logic circuits, A logic gate is an electronic circuit that ge...

A logic gate is an electronic circuit that generates a typical output signal which depends on its input signal. Output signal of a gate is a general boolean operation of its input

Customer credit-rating software , Gordon Grant, majority shareholder and Ch...

Gordon Grant, majority shareholder and Chief Executive Officer of Finance-IT Ltd, is determined to be one of the entrepreneurs making money out of the recession. He started the fir

Software engineering, assignment on transaction flow, transform flow, trans...

assignment on transaction flow, transform flow, transform mapping: refining the architectural design

Illustrate basic strategy used in raid, Q. Illustrate Basic strategy used i...

Q. Illustrate Basic strategy used in RAID? Basic strategy used in RAID is to replace large capacity disk drive with multiple smaller capacity disks. Data on these disks is dist

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