Sitemap

Amicuk Programming Answers

Plzzz write prog to this simple java threads question

2015-10-11   Views:0

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
I am using Carbon Copy Cloner to backup my iMac hard drive. I realize that I don't really know what "bootable" means and how it differs from "restorable" - - can you please clarify? 1.  If a backup on an external drive is bootable, doe [More]
I refer to a similar forum post here - http://forums.adobe.com/message/4081971 - which outlines a similar problem with opening a file. The difference is the file I can no longer open was created using Adobe indd CS5.5 and I am opening it with Adobe i [More]
When my 2006 Imac hard drive died I decided to get a new iMac. When I replace it with a new iMac how do I get to the files on my Time Caspule..I have all my old hard drive backed up on it so will my new iMac recognize it? How then do I back up my new [More]
Hello Everybody, I was looking at the features of "Sun Java Studio Enterprise 8" and in the UML support feature they said that this IDE provides source code synchronization with the model.It does this without using markers or tagging in the sour [More]
Streaming bluetooth and wifi at the same. Is it possible?You are not able to send the music to two different streams, you can use the bluetooth and wireless at the same time but for different tasks. The best way I have seen for what you are attemptin [More]
I ran Sync from my Palm Treo 700p to my Windows XP PC Palm Desktop.  I had previous media on my Desktop, which has never been overwritten during previous sync actions. Today my last Desktop media pictures disappeared after a sync (those picture has a [More]
I want to control navigation out of a block displayed on a "tab" canvas to other "tabs" in a form containing multiple tab canvases. Are ther any "events triggers" associated with the "tab" level similar to the " [More]
Hi All, I am trying to print my Custom Order Ack every thing prints good and works fine except on the first page,Its printing all windows and the header of the main window but its not printing the item details on the first page. From second page onwa [More]
Like others, I'm having trouble getting my AX to join an existing network from my third party modem/router (in this case a Siemens SE 515 dsl). After 2 days of sifting posts, changing settings and reset after reset, I'm about to take the thing back o [More]
My computer crashed and everything had to be reinstalled. I lost everything from the hard drive. I can access my website on-line, but when I go to iWeb none of my documents are there. I have tried dragging the site pages that are stored on iDisk, but [More]