RE: Stopped and sleep processes

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

 



 

> -----Original Message-----
> From: kernelnewbies-bounce@xxxxxxxxxxxx 
> [mailto:kernelnewbies-bounce@xxxxxxxxxxxx] On Behalf Of Hari Prashanth
> Sent: Saturday, December 11, 2004 9:20 PM
> To: kernelnewbies@xxxxxxxxxxxx
> Subject: Stopped and sleep processes
> 
> Hi all,
> 
>      Hi  this s hari..I was away for quite a long time... Can 
> any1 clarify me on d below Q's?
> 
>        1.we can make process to stop by signallin 
>          SIGSTOP to the process in context.
>        2.Similarly dere are processes which ll be
>          sleepin. (Thou I dnt know how to make it     
> 
>          sleep).
> 
>        The above 2 are definitely not d same.. I need d 
> internal difference between dese 2..
> 
>         And also i need to know how to wake up a sleepin 
> process from d user level..
> 

This is what I think .. Let the gurus also comment :)

I this question was asked before. I think there is no process state
called sleeping. The sleeping process will be in either
TASK_INTERRUPTABLE or TASK_UNINTERRUPTABLE. I think the process in these
states are called sleeping processes. The process with these states will
be removed from the run queue ( Which has got only process with
TASK_RUNNING state ) and put in to the associcated wait queue as a
result of some operation. 

There is NO user interaces or system to change the process state to
TASK_RUNNING, remote it from the wait queue and put it in the run qeueu.
This can be done only by kernel when the event occurs which satisfy the
wait.

TASK_STOPPED will also be removed from the run queue. So the effect of
both the state are same because scheduler will only look in to the run
queue to schedule the process. But the stopped process can be woken up
by systems calls. If there is a pending signal to wake up the process,
the kernel will change the process state and place it in the run queue
again so that it can be scheduled later.


> Thanks in advance
> Hari
> 
> 
> =====
> Musically With Love ,
> Hari Prashanth
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Send holiday email and support a worthy cause. Do good. 
> http://celebrity.mail.yahoo.com
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
> 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




[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