2006-02-20 22:19:17

by vamsi krishna

[permalink] [raw]
Subject: Process states inside the linux kernel. [Especially about the STATE D]

Hello All,

I have been debugging a program which takes huge memory around 12Gb
(On a 64-bit machine). I was trying to monitor the VmSize and RSS
sizes using top command for this process. I frequently see that the
process STATUS changes its state from 'D' to 'R' most of the time its
in the state 'D'.

I looked at the manual it says D uninterruptable sleep state (I have
googled on this but could'nt find much information about this stage).
As far as my text book knowledge, the process is either 1). Running
'R' 2.) Ready 'Re' 3.) Wait (for I/O) W .

So what is 'uninterruptable sleep state' D ? when does the process is
put in this state?

Can someone releate me the states cycle of the process in linux kernel.

Really appreciate your time and effort.

Thank you,
Vamsi.


2006-02-20 22:37:08

by Phillip Susi

[permalink] [raw]
Subject: Re: Process states inside the linux kernel. [Especially about the STATE D]

vamsi krishna wrote:
> Hello All,
>
> I have been debugging a program which takes huge memory around 12Gb
> (On a 64-bit machine). I was trying to monitor the VmSize and RSS
> sizes using top command for this process. I frequently see that the
> process STATUS changes its state from 'D' to 'R' most of the time its
> in the state 'D'.
>
> I looked at the manual it says D uninterruptable sleep state (I have
> googled on this but could'nt find much information about this stage).
> As far as my text book knowledge, the process is either 1). Running
> 'R' 2.) Ready 'Re' 3.) Wait (for I/O) W .
>
> So what is 'uninterruptable sleep state' D ? when does the process is
> put in this state?
>
> Can someone releate me the states cycle of the process in linux kernel.
>
> Really appreciate your time and effort.
>

It is called D because originally it stood for Disk, and was used for
when the process was blocked waiting to be swapped back in from the
disk. These days it is still mostly used for when the process is blocked
either handling a page fault or in a system call that does blocking disk
IO.