homework_2 Version 0 |
|
👤 Author: by 672016243qqcom 2017-09-27 15:33:11 |
Q1:
A single processor can run only one instruction at a time. A program might need some resource such as an input device which has a large delay or a program might start some slow operation such as sending output to a printer. This would lead to processor being "idle" (unused). To keep the processor busy at all times the execution of such a program is halted and the operating system switches the processor to run another program. Hence for representing the state and information of the running program the concept of a process was born.
Q2:
First a process has a life cycle thus it must exits a 'new' state a 'running' state and a 'terminated' state just like a person would born live and die. Then a CPU only can handle a process at a time so other processes need a 'ready' state for waiting to be assigned. And when a process is blocked it need a "waiting" state to wait for some event to occur.