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

How does cpu know that an interrupt has taken place, How does CPU know that...

How does CPU know that an interrupt has taken place? There needs to be a line or a register or status word in CPU which can be increased on occurrence of interrupt situation.

Operating systems Hw, Need help in class assignment !! i have only 24 hours...

Need help in class assignment !! i have only 24 hours!!

Define object oriented and structured development, How object oriented deve...

How object oriented development is dissimilar from structured development object oriented development is dissimilar from structured development of the system. In the structure

Approach to reasoning - first-order logic, Approach to reasoning - first-or...

Approach to reasoning - first-order logic: The formal approach to reasoning has bigger return and disadvantages. In generally we notice, if a computer program has proved somet

Message passing programme development environment, In a multicomputer syste...

In a multicomputer system the computational load amid different processors should be balanced.  To pass information between different nodes message passing technique is used. The p

With what symbolic names can be associated, Symbolic names can be associate...

Symbolic names can be associated with? Ans. With data or instruction symbolic names associated.

Slot machine, A special Slot Machine is introduced in a new casino; this ma...

A special Slot Machine is introduced in a new casino; this machine has a digital interface of a 3X3 grid. An interface button named as SPIN for making the machine spin. There are f

Explain instruction level of parallel processing, Instruction Level It ...

Instruction Level It refers to condition where different instructions of a program are implemented by different processing elements. Most processors have various execution unit

Define end directive and assume directive, END DIRECTIVE: ENDS directive e...

END DIRECTIVE: ENDS directive ends a segment and ENDP directive ends a procedure and END directive ends whole program which appears as last statement. ASSUME Directive:   An .

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