Hi, On Monday, 11 December 2006 03:05, Bob YANG wrote: > Hi, > > Could anybody explain to me what process freezing is? I mean, what will > happen to a frozen process? I tried to understand the codes in > kernel/power/process.c and found one thing freeze_process() does is to set > PF_FREEZE flag. What is that for? This is to tell the process to go to the refrigerator. The function used by processes to check if we want them to go to the refrigerator is called try_to_freeze() and defined in either sched.h or freezer.h (in newer kernels). User space processes call try_to_freeze() in get_signal_to_deliver() and kernel threads (that are freezeable) should call it explicitly wherever appropriate. The refrigerator itself is a function defined in process.c. Processes that enter it set their PF_FROZEN flags and change their states to TASK_UNINTERRUPTIBLE. They are in this state until we clear the PF_FROZEN flag for them, in thaw_processes(). Greetings, Rafael -- If you don't have the time to read, you don't have the time or the tools to write. - Stephen King