Okay John,

thanks by correct my example with pthreads. This "patch" is very elegant ;-) and works !!!

But, i have another program ( initially without source code ) and following message appears:

"Cannot move process 775543 - 775543 is a system process"

New doubts:
 
1 - in which conditions the openssi recognizes a specific process as being a system process? is a resident flag on binary? is a specific system call?

2 - how can I change my example (pthreads-test.c) to purposely transforms it on a system process?

Regards, Cleir



Date: Thu, 9 Apr 2009 13:34:31 +0200
From: john@Calva.COM
To: cajaraujo@hotmail.com
CC: ssic-linux-devel@lists.sourceforge.net; avilcap@pep.ufrj.br
Subject: Re: [SSI-devel] Simple Program with pthreads(with source) + openssi stable 1.2.2

Cleir Araujo wrote:
 
Hello developers,
 
when i try to exec a simple program with pthreads, the
following message appears: "Cannot move process 775543 - 775543 is a system process".
One strange thing about your test process is that it starts all of the worker threads then calls pthread_exit(NULL), so the main thread is defunct while the others are runnning:
john@f:~$ bash-ll
john@f:~$ clusternode_num
6
john@f:~$ where_pid $$
6
john@f:~$ ./calc >/dev/null &
[1] 437832
john@f:~$ ps -fp 437832
UID PID PPID C STIME TTY TIME CMD
john 437832 437810 0 13:37 pts/7 00:00:08 [calc] <defunct>
If I "fix" it so the main thread waits for the workers (even though they will never finish) and then try migrating it I get:
add_thread_group:Cannot move process 438181 (calc) - cannot find all shares
add_thread_group: group(438181)/share imbalance 4/1
(This is on my 2.6.14 system, so it may have bugs that the standard 2.6.11 based system doesn't have).





Imagem de exibição animada? Só com o novo Messenger. Baixe agora!