On Thursday 13 January 2005 14:15, Noah yan wrote: > I try to use the signal to suspend/resume processes for a user-level > time-sharing scheduling code. I have some newbies questions and > appreciate some of you could help me out this. Thanks very much in > advance: > > When a process is suspened manually by signal, what is it like other > than stoping execution? That is basically it. > Is is stil in memory or swapped out? It could get swapped out, but need not be so. > What is > a suspended process to the scheduler? Is is true that the scheduler > will never consider it before being assumed? The scheduler only looks at runable processes. A stopped process isn't runable, so it ignores them. > What is the difference between a suspended process with a sleeping > process(like calling sleep syscall), is a sleeping process in memory > or swapped? A sleeping process could be swapped out, but it certainly need not be. A sleeping process is waiting for some event to occur (e.g. I/O completed). when that happens it gets woken up and it becomes runable and then the scheduler will consider it for execution. A stopped process will remain so until it is continued. e.g. receives a SIGCONT signal. Think of it as a special case of sleeping. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/