Re: Hung Task Timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Philipp for the explanation and the link.

But i Still have the same question:-

Do scheduler schedule the tasks with TASK_INTERRUPTIBLE state ?
As i know TASK_UNINTERRUPTIBLE & TASK_INTERRUPTIBLE  both are not in the run queue
and so both type of tasks should not being scheduled by the scheduler.
If YES, then why it is needed to schedule task in TASK_INTERRUPTIBLE state ?

What is the significance of the task->switch_count in the scheduler ?
surely it got updated for the TASK_INTERRUPTIBLE task.
[kernel/hung_task.c]check_hung_task()

Thanks
Mani


On Tue, Apr 17, 2012 at 1:06 PM, Philipp Ittershagen <p.ittershagen@xxxxxxxxxxxxxx> wrote:
On Tue, Apr 17, 2012 at 6:26 AM, mani <manishrma@xxxxxxxxx> wrote:
> So is that means that TASK_UNINTERRUPTIBLE will not get schedule by the
> scheduler ?
> Can anyone give the detail information what's going on in backyard ?

An explanation of the different states is given in [1]:

A process can sleep in two different modes, interruptible and
uninterruptible. In an interruptible sleep, the process could be woken
up for processing of signals. In an uninterruptible sleep, the process
could not be woken up other than by issuing an explicit wake_up.
Interruptible sleep is the preferred way of sleeping, unless there is
a situation in which signals cannot be handled at all, such as device
I/O.

So, unless you absolutely cannot handle singals, you should use
TASK_INTERRUPTIBLE and check for signals using signal_pending() (many
code examples use this in the ldd3 book).

TASK_UNINTERRUPTIBLE consequently means that your thread is not
scheduled unless you explicitly wake up the thread.


Greetings,

 Philipp

[1]: http://www.linuxjournal.com/article/8144?page=0,0

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux