ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU-(2020-2021)-1 > student homework > 2018329621210-鲍露菲 >
2018329621210-鲍露菲-homework2 Version 0
👤 Author: by 1720650158qqcom 2020-09-22 08:41:37
Purpose of process introduction:

Between some concurrent procedures section, there is a certain limit, the relationship between the implementation of paragraph each program should not only restricted by other program execution, but also rely on the allocation of system resources dynamically, so that each can be concurrent execution procedures section will can not run due to external limitations, forced in the blocking state. The concept of a program alone cannot represent the stop-and-go phenomenon of a program and the competition for resources in the process of running the program, so a dynamic concept is needed to describe the stop-and-go phenomenon of concurrent programs, which gives rise to the concept of a process.

Links and differences between processes and procedures:

difference :

(1) The process is the execution process of the program, is a dynamic process, belongs to a dynamic concept. Program is

A set of ordered static instructions and data used to indicate the operation of a processor; a static concept.

(2) Structurally, each process entity is composed of program segment and corresponding data segment.

The process structure also contains a PCB, or process control block.

(3) A process may involve the execution of one or more programs; Conversely, the same program can pair

Should be multiple processes, that is, the same program segment can run on different data sets, can constitute different feeds

Cheng.

(4) The process can truly describe the process of concurrent execution, while the program is only the order of static instruction accumulation

The column.

(5) The process has the function of creating other processes, while the general program does not have the function of creating other programs

Function.

(6) Each program is run in a process field.

Contact:

A process is the execution of a program, the program is the running entity of the process, no program, no process.

A process is structured, consisting of a program, data, and a process control block

The five states of the process are:

1) Creation status: The process needs to apply for a blank PCB when it is created, fill in the control and management process information to complete the resource allocation. If the creation cannot be completed, such as the resource cannot be met, it cannot be scheduled to run, and the state in which the process is located is called the creation state

2) Ready state: The process is ready, allocated to the required resources, and can run as soon as it is allocated to the CPU

3) Execution state: After the process is in the ready state and scheduled, it enters the execution state

4) Blocking state: The executing process is temporarily unable to run due to some events (I/O request, application cache failed), and the process is blocked. Enter the ready state when the request is satisfied and wait for the system call

5) Termination state: the process terminates, or an error occurs, or the system terminates, and the process enters the termination state. No longer able to hold

Other processes in concurrent execution have a mutually restrictive relationship. It is sometimes in a running state, sometimes suspended for some reason, in a waiting state, and when the reason for suspending it disappears, it is ready to run again. So you have to distinguish between these states, and with these five states, the system can operate according to the situation.

Please login to reply. Login

Reversion History

Loading...
No reversions found.