ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > zstu-(2021-2022)-1 > student homework directories > >
2019329621249陈雅冰homework2 Version 0
👤 Author: by 1422679707qqcom 2021-12-22 02:34:47
Definition of process: "process" is one of the most basic and important concepts of operating system. But so far, there is no exact and unified descr iption of this concept. Several definitions and descr iptions of processes are given below. Is an execution of the program. Processes are calculations that can be executed in parallel. A process is an activity that occurs when a program and the data it uses are executed in sequence on a processor. Is the running process of a program on a data set. It is an independent unit of the system for resource allocation and scheduling.
A program is a set of instructions that can be recognized and executed by a computer, which runs on an electronic computer and is an information tool to meet certain needs of people.
Main differences between processes and procedures:
(1) the program is eternal; The process is temporary, it is the execution of the program on the data set, there is creation and revocation, and the existence is temporary;
(2) The concept that the procedure is static and the process is dynamic;
(3) The process is concurrent, but the program is not;
(4) Process is the basic unit to compete for computer resources, but program is not.
(5) There is no one-to-one correspondence between processes and programs: one program can correspond to multiple processes, that is, multiple processes can execute the same program; A process can execute one or several programs.
The relation of processes and procedures:
(1)Process is a running activity of a program on a data set in a computer, the basic unit of resource allocation and scheduling in the system, and the foundation of the operating system structure.
(2)In the early computer structure of process-oriented design, the process is the basic execution entity of the program; In the contemporary computer architecture of thread-oriented design, the process is the container of threads. It is the descr iption of instructions, data and their organizational forms, and the process is the entity of the program.
(3)It is an ordered collection of instructions and data, which has no running meaning and is a static concept. Process is an execution process of a program on a processor, which is a dynamic concept.
Five-state model of process:
Running status: the process is executing.
Ready: The process is ready to be executed whenever there is a chance.
Blocking state (waiting state): the process can't be executed until something happens, waiting for the event blocking the process to finish.
New status: the newly created process, which has not been added to the executable process group by the operating system, is usually a process whose process control block has been created but has not been loaded into memory.
Exit status: the process released by the operating system from the executable process group, or stopped running for itself or some reason.
We frst complete the hot task and the state analysis that the process needs to complete.Because multiple processes share system resources duringconcurrent execution, they show intermittent operation rules during their operation. Therefore,the process may have more than one in its life cycle.Kindof state. Generally speaking, there are three states required by a process, and each process should be in at least one of thefollowing three basic states:Ready state,Running state and Block state.But it is not enough to just prepare the state phase required by the process f we want to run the process independently on the target of pralefexecution of the program, we need to package the process into a process control block in order to met the process control block's data and operatonintegrity requirements And to enhance the flexibility of management usuly two common states are introduced for the process in the system: the creatonstate and the termination state.
Process control block contains three types of information.
1. identification information. Used to uniquely identify a process, it is often divided into external identifiers used by users and internal identification numbers used by the system. Almost all processes in the operating system are given a unique numerical process number for internal use, and other control tables of the operating system can cross-reference the process control table through the process number. Commonly used identification information includes process identifier, parent process identifier, user process name, user group name, etc.
2. Site information. It is used to keep all kinds of information stored in the processor site when a process is running. When any process relinquishes the processor, it must save the information of the processor site in the process control block, and when the process resumes running, it should also restore the processor site. Common field information includes the contents of general registers, control registers (such as PSW registers), user heap pointer, system heap pointer, etc.
3. Control information. Used to manage and schedule a process. Commonly used control information includes: l) scheduling-related information of processes, such as process status, waiting events and reasons, process priority, queue indicator, etc. 2) process composition information, such as text segment pointer and data segment pointer: introducing mutually exclusive and synchronization mechanism of inter-process communication, such as message queue pointer and semaphore, etc. 4) address of processes in auxiliary memory 5) occupation and use information of 5)CPU resources, Such as time slice allowance, the time that the process has occupied the CPU, the total time that the process has executed, accounting information 6) privilege information of the process, such as privileges in memory access and processor status 7) resource list, including all resources needed by the process and resources already allocated, such as main memory resources, I/O devices, open file tables, etc.

Please login to reply. Login

Reversion History

Loading...
No reversions found.