1830504 Members
2406 Online
110006 Solutions
New Discussion

Concurreny problem

 
Ragni Singh
Super Advisor

Concurreny problem

Hello all, Can you possibly explain whats going on here.

I was running multiple processes on my system for data loading.
The main script spawned out three additional shells running different loading scripts
concurrently. After the spawning, there were four processes running
at the same time. The processes were all running with my own user account.
When I ran the utility TOP, it showed only one CPU was utilized 100% and the other three
CPUs were idled. Why was that? I was expecting all CPUs were fully utilized.
Can you think of any reason why only one CPU was utilized, but not four?
Is there any restriction because of the user account (not root)?

Any help here will be greatly appreciated and points will always be assigned.
4 REPLIES 4
Pete Randall
Outstanding Contributor

Re: Concurreny problem

Sanjay,

OK, I'll be obvious:

How were these other processes "spawned"? In the background?


Pete

Pete
Tim Sanko
Trusted Contributor

Re: Concurreny problem

Sanjay,

When you say spawn, there are multiple variants spawning can occur. Depending on how it is implemented it can be spawned with
the environment of the parent, run totally separate, independent, or be effectively blocked with a semaphore. What does the script look like, and I may be able to give you guidance.

In C (which the OS is written in) there are the exec functions. They have different properties. Any of these functions can spawn a process, but they have wildly different results...

Tim

Pete Randall
Outstanding Contributor

Re: Concurreny problem

Sanjay,

Another thought:

Is it possible any other processes have set affinity to those other three processors? Our Informix database has this capability, for example.


Pete

Pete
Hein van den Heuvel
Honored Contributor

Re: Concurreny problem


How about a hint as to what the jobs are that you are forking over?

Data loading into what?
tarring up stuff?
zipping up stuff?
relational database row inserts?
Oracle SQLloader? Oracle Import?

> only one CPU was utilized 100% and the other three CPUs were idled. Why was that?

- Because they were waiting on soem terminal input?
- Because the job takes out a high level (applicaiton) lock?

How about trying to run the job twice from two windows... does that get two active jobs or is one also idle? Does the system you are loading into have tools to monitor process states? wait events? lock contention?

Cheers,
Hein.