Solved

process interaction

Posted on 2008-10-29
4
302 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Pretext and Context In previous  (http://www.experts-exchange.com/Programming/Theory/Software-Design/A_4457-System-Data-Modeling-Series-Identity-Management-System-Basic-System.html)article, I designed the data model of a basic Identity Management…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now