Hi Sarath:
I would suggest you check the API
_task_get_td.
You can get the task descriptor , then you can check the state from the task descriptor.
2.1.274 _task_get_td
Gets a pointer to the task descriptor for the task ID.
Prototype
source\kernel\task.c
void *_task_get_td(
_task_id task_id)
For the task kill function, you can check
2.1.260 _task_destroy
Destroys the task.
Prototype
source\kernel\task.c
_mqx_uint _task_destroy(
_task_id task_id)
I hope it helps
Regards
Daniel