Solved

process interaction

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Latch a Value with No Circular Reference Error in Excel 2010 9 762
Scrum and Problem reports 1 177
algorithm 15 145
Math Question 1 145
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Software development teams often use in-memory caches to improve performance. They want to speed up access to, or reduce load on, a backing store (database, file system, etc.) by keeping some or all of the data in memory.   You should implement a…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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