For an operating system of mobile devices, a kernel space mainly includes various key functions of the operating system of mobile devices (such as process scheduling, memory management, interrupt response, user system call and so on). A process scheduling module mainly enables various processes to switch among different states. States of a process in the kernel generally include the follows: 1. running state; 2. executable state; 3. interruptible sleep state; 4. uninterruptible sleep state; 5. pause state; 6. exit state. The running state indicates that the process or thread has obtained central processing unit (CPU) resource and is running. The executable state indicates that the process can be run but does not obtain CPU resource. The uninterruptible sleep state indicates that the process is in the sleep state, but at this point the process cannot be interrupted. The interruptible sleep state indicates that the process is in the sleep state, but the process can be interrupted. The pause state indicates that the process is paused and cannot be run. The exit state indicates that the process begins to exit.
The existing of the uninterruptible sleep state is to indicate that some kernel procedures cannot be interrupted. If asynchronous signals are responded, a procedure for processing the asynchronous signals may be inserted into the execution procedure of a program (the inserted procedure may exist in a kernel mode and may extend to a user mode), thus the original procedure is interrupted. When a process operates some hardware (for example, the process calls a read-write system call to perform a read-write operation on a certain device file, the read-write system call finally executes codes corresponding to device drivers and interacts with corresponding physical devices), the process in the uninterruptible sleep state may be employed to realize protection, so as to avoid interruption of the interaction process between the process and the device and avoid that the device falls into an uncontrollable state. However, when a duration that a process is in the uninterruptible sleep state is long, the operating system may have a response delay, thereby affecting stability of the operating system.