omanakuttan wrote: { temp->state = TASK_STOPPED; call schedule here as well. amith> i called schedule where u wanted me to - but,it is still running ! } Are you sure, statement temp->state = TASK_STOPPED is executed. Put one printk there and check. > i have printed it out as well - it is set to TASK_STOPPED. am i going throught the list of currently running tasks ? struct task_struct *temp; temp = get_current(); ...... while( ) { does temp = temp->next..... give me the next task which is running ?? } cheers, Amith -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/