ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU-(2020-2021)-1 > student homework > 2018329621213_黄冰慧 >
homework02_2018329621213 Version 0
👤 Author: by 454234624qqcom 2020-09-28 14:23:20

  1. What is the purpose of process?


 

The purpose of process is to allow multiple programs to be loaded into memory and executed concurrently.

 

  1. Describe their relation and difference for process and program?


 

Informally, as mentioned earlier, a process is a program in execution. A process is more than the program code, which is sometimes known as the text section. It also includes the current activity, as represented by the value of the program counter and the contents of the processor’s registers. A process generally also includes the process stack, which contains temporary data (such as function parameters, return addresses, and local variables), and a data section, which contains global variables. A process may also include a heap, which is memory that is dynamically allocated during process run time.

A program by itself is not a process; a program is a passive entity, such as a file containing a list of instructions stored on disk(often called an executable file), whereas a process is an active entity, with a program counter specifying the next instruction to execute and a set of associated resources. A program becomes a process when an executable file is loaded into memory.

 

  1. Why the status of process is divided into five states, not other numbers, such as 4, 7?


 

Its purpose is to make the best use of computer. As a process executes, it changes state. The state of a process is defined in part by the current activity of that process. It is important to realize that only one process can be running on any process at any instant. Many processes may be ready and waiting.

Please login to reply. Login

Reversion History

Loading...
No reversions found.