Sitemap

Amicuk Programming Answers

Plzzz write prog to this simple java threads question

2015-10-11   Views:2

Advertisement

Write a program in C to create four processes. The original processes creates two children before it prints out "PARENT". The children processes print "CHILD1" and "CHILD2" respectively. The first child process creates a chil

Write a program in C to create four processes. The original processes creates
two children before it prints out "PARENT". The children processes print
"CHILD1" and "CHILD2" respectively. The first child process creates a child
process that prints out "GRANDCHILD".
Note: The output must be guaranteed to print out in the following order each
time it is executed:
GRANDCHILD
CHILD2
CHILD1
PARENT
a. Write the program using C or C++ and forks to create the children processes.
b. Write a second program using Java and Threads for the children processes.
The output statements for CHILD1, CHILD2 and GRANDCHILD must come from print
statements in the run method of the thread.

The replay answer
Advertisement
Most people here will not do your homework for you. If you post a reasonable question that shows you've made some effort, and what the results of that effort were, and provides details about what parts you're having trouble with, then somebody will probably provide guidance so that [you can complete the work.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Go to See the other 15 answers

Plzzz write prog to this simple java threads question

Category:DefaultRelease time:2015-10-11Views:130

Write a program in C to create four processes. The original processes creates two children before it prints out "PARENT". The children processes print "CHILD1" and "CHILD2" respectively. The first child process creates a chil[More]

Simple java architecture question

Category:DefaultRelease time:2015-10-11Views:130

This should be a simple question to answer but I haven't been able to find a good answer. I have an application that establishes a network connection with a server and registers event listeners on that connection. What I want to do is find a way with[More]

Simple Java Coding Question

Category:DefaultRelease time:2015-10-11Views:130

I know this is a simple question, but I can't search for the answer to this because it involves syntax that Google and the like don't seem to search for.. I am trying to figure out some Java code that I have found. I would like to know what: a[--i] a[More]

Simple Java EJB question.

Category:DefaultRelease time:2015-10-11Views:130

When it comes to EJB v3 Remote and Local interfaces, (With JBoss EJB Container Software in mind, for this question,) -Does the Remote interface for the EJB include method signatures from the Bean class -that are to be seen -that are to be hidden? -Do[More]

Simple Java Array Question

Category:DefaultRelease time:2015-10-11Views:130

// This is how I was taught to make a simple array. You have to define the size first. String [] test1 = new String[4]; test1[0] = "1"; test1[1] = "2"; test1[2] = "3"; test1[3] = "4"; out.println(test1[0]); out.prin[More]

Simple EVENT & THREAD question.

Category:DefaultRelease time:-0001-11-30Views:130

Hello, Let's say I create a thread from the main one... This thread is supposed to do some work while the main one is waiting for the signal that the work is done... After the signal is received by the main thread it can continue to run... How this c[More]

Java Thread question

Category:DefaultRelease time:-0001-11-30Views:130

Hello everyone, We have a C/C++ SDK lib (on Solaris) that supports JNI. Customer has a Java App (single threaded) that calls our SDK. In one of our function, we can pthread_self several times. It turns out even in this single threaded Java App, pthre[More]

Simple Java SDK question for server group assignment

Category:DefaultRelease time:2015-10-11Views:130

I have a snippet of code below in which I am trying to apply the setProcessingServerGroup() and setProcessingServerGroupChoice() methods to my report object. My question should be relatively simple: I believe I need to cast(?) my iObject report objec[More]

Simple Java regex question

Category:DefaultRelease time:2015-10-11Views:130

I have a file with set of Name:Value pairs e.g Action1:fail Action2:pass Action3:fred Using regex package I Want to get value of Name "Action1" I have tried diff things but I cannot figure out how I can do it. I can find Action1: is present or n[More]

Simple Java Sound Question...

Category:DefaultRelease time:2015-10-11Views:130

Can I draw waveforms while capturing data? If yes, how. If no, why. Thanks. I need the answer ASAP, please help.Hi nfactorial, Can I draw waveforms while capturing data?If you would like to do that in Java you would need to know about how to use the[More]

Simple java pgm - question

Category:DefaultRelease time:2015-10-11Views:130

Hallo, to the following pgm I had question: static void printPrimes (int max) (= wavy bracket; boolean(should be angular brackets) sieve = new booolean (angular br max+1 angular br) int i,j; for (i=2; i = max;i++)sieve(angluarbr i angular br)= true i[More]

Hot
When I upgrade IOS7.1 -- I can't use / open Data / 3G?? WHY????Try here: Find your AppleId: http://support.apple.com/kb/HT5625?viewlocale=en_US&locale=en_US You can get your appleID password reset at iforgot.apple.com,Read other 2 answers [More]
Hi all, I have a template based page with one flash animation. When I preview my template page the flash is working fine, but in my pages bases on the template I don't see my flash animation. Do I miss something? You can find my pages (text) on the f [More]
My husband and I were sharing an Apple id, only for convenience.  Our contacts have been combined, assumed it is because we share an id and it isn't a problem.  However, since updating to ios7, we are now receiving each other's texts and do not know [More]
Hi. I have an Report that must starts with an Job. The Reports calls the report RFBIBL00. I create an entry in the Transaction OBDU and then i define a job. At the first run, all is ok. But when the job must run a second time, i get the error  messag [More]
Dear Abaers, I am new to Idoc. i have one Idoc (Orders01) for creating sales order. I had seen the t-codes WE 30 and WE 60 to know the field description. The fielddescription shows names like name1 name2 ort01 etc. i want to know what are the db tabl [More]
I am in a fix . I am trying to develop and HTTPSClient in java which will run and get html from this URL https://webqa.mpnr.com/servlet/Test Since this website is served by 4 separate boxes with a load balancer in between . I want to creat a utility [More]
I am having trouble making the time capsul the primary wireless router connected to a comcast cable modem. cable modem is a CISCO DPC3008. I can make the time capsule work as a backup, but then there is no internet connectivity. I can make the wirele [More]
In our Environment (GC Version 10.2.0.3 on Linux ), we are using Proxy to connect to Internet and our GC server is behind the Firewall. When I try to enter the metalink user name and Password in "Metalink and Patching settings" tab, getting the [More]
when i complie the jsp file,the following errors occur: java.lang.NullPointerException --------------- nested within: ------------------ "Jsp1.jsp": weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested exception: [java.lang. [More]
I've seen now for many days my 2 phones discharge at an incredible speed, get warn doing nothing, and I can actually see the percentage going down by probably 1% every 4 or 5 minutes, running nothing but turning the screen on to watch it. But it is d [More]