Application not working in multi core platform


 
Thread Tools Search this Thread
Operating Systems Solaris Application not working in multi core platform
# 1  
Old 08-03-2014
Application not working in multi core platform

Hi,
I have a multiprocess C application (used POSIX library for threads and fork() & exec for creating process) of millions of LOC.

1. Which works fine in single processor machine.
2. Which works fine in multicore machine only if one core is enabled.

Problem is, which results an undefined behavior if more than one core/processor exists. Please suggest where/which area (APIs) may have issue?

Thank you
# 2  
Old 08-03-2014
You say you have a multi-process application and you say you are using the POSIX threads library. These are two very different things, but you have the same issue either way. You have multiple threads (or processes) updating data that has not been properly protected against simultaneous access. If you have a multi-process application, the shared data could be in a file or could be in a shared memory segment. If you have a multi-threaded single process application, the shared data could be in a file, a shared memory segment, or any non-thread-local storage in the process. It could be caused by using an api like read() into a global buffer. It could caused by a statement like a++; for some variable shared by more than one thread/process. It could be thousands of other things in you millions of LOC.

If you can figure out what data is being screwed up on a multi-processor system, start by looking at everything that references that data.

Good luck...
# 3  
Old 08-04-2014
It would also help if you would describe the problems you have in a multi-core environment.

What could be causing the problem? Anything and everything, unfortunately. It all depends on how your application code is written.

Do you know what "reentrant" means? If not, you shouldn't be writing multithreaded code.

Although I would like to know how much use your application makes of static variables.
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Multi platform script perl or awk

Hi gurus, I am trying to match records in following format: (-,username,domain1.co.uk)\ (-,username,domain2.co.uk) either awk or perl must be used. I am using cygwin. I wrote following code which works and matches both above entries: awk 'BEGIN {musr="(-,username,+.co.uk)"} {if... (8 Replies)
Discussion started by: wakatana
8 Replies

2. UNIX for Advanced & Expert Users

Multi-platform Centralized Patch Management

We have a mix of AIX, HP-UX, Linux (RHEL and SLES), and Solaris in our environment. Currently we have seperate patch management systems for each platform (NIM, SD, Spacewalk, etc), but have started looking for a centralized patch management solution that would work for most, if not all, of our... (0 Replies)
Discussion started by: kknigga
0 Replies

3. Programming

Multi-platform includes?

I know that <cstudio> can also be <stdio> and can be written different ways on Linux then with windows. I've see some code doing a IFDEF __APPLE__ (I'm guessing, if compiled on a mac do whats between this) Is there one for Linux/Window? (3 Replies)
Discussion started by: james2432
3 Replies
Login or Register to Ask a Question

Featured Tech Videos