?
Solved

process interaction

Posted on 2008-10-29
4
Medium Priority
?
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1500 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

The CRUD Functions CRUD, meaning "Create, Read, Update, Delete (http://en.wikipedia.org/wiki/Create,_read,_update_and_delete)" is a common term to data base developers.  It describes the essential functions of data base table maintenance.  This art…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

752 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