Skip navigation.
Home
The QNX Community Portal

View topic - Delete threads in an Adaptive partition

Delete threads in an Adaptive partition

For discussion of realtime and/or embedded programming.

Delete threads in an Adaptive partition

Postby ninja123 » Wed Feb 17, 2010 9:15 am

Hi all,

Is it possible to kill all threads running in a partition??

I initially thought of killing a partition and thereby killing all processes/threads in it..However I learn that one can only set zero budget to partition so that it has least priority over the other threads in all all other partitions and doesnt take CPU.

I want to kill a partition(say 'A')(all threads in that partition) when any thread running in such a partition behaves in a particular way..

What is the best way to realise this?
And oh by the way there is a hitch. This partition 'A' has a lot of client threads and there is a server thread in another partition 'B' which actually detects this partitcular behaviour of the clients and has to kill all clients in partition 'A'.

Thanks a lot
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

RE: Delete threads in an Adaptive partition

Postby ninja123 » Mon Feb 22, 2010 2:31 pm

Does anyone have an idea?
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am

RE: Delete threads in an Adaptive partition

Postby maschoen » Mon Feb 22, 2010 5:21 pm

What might be difficult is to generically kill all the threads in a partition. You would need a way to figure out what processes are running in the partition and then kill them all.

But that doesn't sound like your situation. It sounds like you already know what is running and they are your processes. If so, on startup have them register their pid with a supervisor process. When you want to kill them all, send a message to the supervisor and have it do the killing.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

RE: Delete threads in an Adaptive partition

Postby ninja123 » Wed Feb 24, 2010 8:34 am

wow that sounds just the thing. Yes, to have processes register their pid at startup would be very apt for me.
ninja123
Active Member
 
Posts: 36
Joined: Wed Dec 02, 2009 10:13 am


Return to Realtime and Embedded

Who is online

Users browsing this forum: No registered users and 4 guests

cron