Solved

process interaction

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 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