2019329621250-迟海滢-Homework-2 Version 0 |
|
👤 Author: by 2990994011qqcom 2021-10-29 07:15:34 last modified by 2990994011qqcom |
Q1、Describe their relation and difference for process and program?
1. Processes are dynamic , programs are static.
2. A process has a certain life span, while a program is a collection of instructions and has no "movement" in itself. A program that does not create a process is not recognized as a separate unit by the operating system.
3. One program can correspond to multiple processes, but one process can only correspond to one program. Process is to procedure what performance is to play.
4. Different processes and procedures are composed. From the static point of view, the process is composed of three parts: program, data and process PCB. A program is an ordered set of instructions.
Q2:Why the status of process is divided into five states, not other numbers ,such as 4,7?
As a process executes, it changes state:
new: The process is being created
running: Instructions are being executed
waiting: The process is waiting for some event to occur
ready: The process is waiting to be assigned to a process
terminated: The process has finished execution
These names are arbitrary, and they vary across operating systems. The states that they represent are found on all systems, however. Certain operating systems also more finely delineate process states. It is important to realize that only one process can be running on any processor at any instant. Many processes may be ready and waiting, however.
Q3:Describe the contents of process control block?
Process state
Program counter
CPU registers
CPU scheduling information
Memory-management information
Accounting information
I/O status information