From the survival cycle of the program, the survival period of the process is running will end. For example: main () {printf ("Hello World / N");} How to change the survival cycle of the process: The only reason for waiting and interrupting processes is not over, it is waiting for an interrupt event such as the message to the Socket The arrival of the data, the mouse and keyboard input or other messages sent, and the timer, exception, etc. When the event has not arrived, the program blocks - so the life cycle of the process is extended.
What is the meaning of the process life cycle for a computational job, do not want the process back to block, but hope that it will be executed as soon as possible, because it is synchronized. Many of our current written is asynchronous, it doesn't know how to change your status after running. For example, a Windows program that is waiting for input and various messages to change its state such as MFC to map all mouse events into messages. When you click X in the upper right corner, it receives the ended signal and terminates run. Another example is that a server program is blocked at an Accept, waiting for a connection to arrive, equivalent to an interrupt signal arrival, the system status changes, from waiting for the column to enter the ready execution state. So from a sense, the Window program and the server program are the same.
Conclusion: All procedures are blocking and waiting for the incident.
Next, analyze the design and implementation of various signals, asynchronous environments.