Solved

process interaction

Posted on 2008-10-29
4
309 Views
Last Modified: 2013-11-12
Hi, got a general question:
I build a product, which can take two different arguments to run as two different system processes; now they are running on same Linux box, and I observed that only one of them can run at a time even the Linux has 8 CPUs.

Is this correct that actually both running processes use the same stack since they actually are the product built from the same source? If I want them to run independently (with no iteraction to each other), what shall I do, usng multi-threading, build two differnt products on the same source code?

Thanks for the help.
0
Comment
Question by:cw1592
  • 2
4 Comments
 
LVL 10

Expert Comment

by:kyleb84
ID: 22836862
That doesn't sound right...

Does your kernel have SMP support?

In the end, a multi threaded process would be better, but maybe I could give a more suited answer if you can give me some insight into your project?
0
 
LVL 5

Accepted Solution

by:
zmo earned 500 total points
ID: 22837067
is this what you want ?

http://www.cyberciti.biz/tips/setting-processor-affinity-certain-task-or-process.html

ie set a given processus to a given cpu ?
0
 

Author Comment

by:cw1592
ID: 22838014
kyleb84,
the situation can be described by the following:
OS: Linux, ReadHat
Two processes running with the others; but this two processes are same product (from the same source code, but spawn out by two different arguments; for example, say checkoutline(A) and checkoutline(B)).

Since they are two "different" processes now, I expect that these two shall run independently. But my observation is that when checkoutline(B) is running then checkoutline(A) becomes very slow.

These two processes do access the same memory area (a tmp table for DB; B somehow has to run after A since B needs to clean up the DB tmp table for A). By using the top command I can see that the OS put the high priority on A (18 or even 25 when running).

Not sure if this is enough information, please comment, thanks.
0
 
LVL 5

Expert Comment

by:zmo
ID: 22847680
well, I'm not sure of what you really want, if the two processes are really independant, you can run each one on a different CPU, and they'll get full parallelism. cf my previous post.

Then what's the problem ?
''when checkoutline(B) is running then checkoutline(A) becomes very slow.'' ?

what makes you notice that ? load ? nice level ? ... ?

and the "[...]same memory area (a tmp table for DB[...]" what is it ?
another process like a mysqld ? Or is it like a sqlite DB managed by both A and B ?

because in the first case both processes shouldn't be that linked, whereas in the second case, this is different...

"Not sure if this is enough information, please comment, thanks."

could you tell us more, please ? :)
or even give us a code skeleton that represents your code ?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
understanding interfaces 3 248
Pure Scrum tool 2 128
Scrum and terminology 2 195
static method overriding vs normal non static method overriding in child class 13 103
This article explores the difference between two entities: List and Category.   In part one,  we'll look at the basic concepts, and set some groundwork.  In part two, we'll get to some conclusions. I know that these two things are different, but…
Introduction Many of the most common information processing tasks require sorting data sets.  For example, you may want to find the largest or smallest value in a collection.  Or you may want to order the data set in numeric or alphabetical order. …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question