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

Explain handlers classification, Handlers Classification In 1977, Wolfg...

Handlers Classification In 1977, Wolfgang Handler suggested a complex notation for representing the pipelining and parallelism of computers. Handler's categorization addresses

What is public-key infrastructures, a. What are the differences among conve...

a. What are the differences among conventional signatures and digital signatures? Write a short note on "Attacks on digital signature". b. What is Public-Key Infrastructures

How does computer know that overflow has happened, Q. How does computer kno...

Q. How does computer know that overflow has happened? Illustration: Add numbers 65 and 75 in 8 bit register in signed 2's complement notation.  Here expected result is

Read after write and write after write - data hazards, RAW  and WAW - Data ...

RAW  and WAW - Data hazards: RAW (read after write) - j tries to read a source before i writes it, hence j wrongly gets the old value .This is the most usual type of

What is data in computers, Q. What is data in computers? In modern digi...

Q. What is data in computers? In modern digital computers data is signified in binary form by employing two symbols 0 and 1. These are known as binary digits or bits however da

What do you understand by scan codes, Q. What do you understand by Scan Cod...

Q. What do you understand by Scan Codes? A scan code is a code produced by a microprocessor in keyboard when a key is pressed and is unique to key struck. When this code is rec

What is assembler directive, What is assembler directive? SUM EQU 200 ...

What is assembler directive? SUM EQU 200 Assembler directives are not instructions that will be implemented. It easily informs the assembler that the name SUM should be chan

Define the term busy hour, Define the term busy hour Busy Hour: Conti...

Define the term busy hour Busy Hour: Continuous 1- hour period lying completely in the time interval concerned, for that the traffic volume or the number of calls attempts is

Computers and cntrol, Define open and closed loop cotrol systems.Explain di...

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example

Differentiate between qa and testing, Differentiate between QA and testing....

Differentiate between QA and testing. - Quality Assurance is more a stop thing, ensuring quality in the company and thus the product rather than just testing the product for so

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