Homework 2 2019529628024 SEYIDOVA JEMILE Version 0 |
|
👤 Author: by wx287_oz26ft5hylnh-3avnwh-nhhga730 2022-02-17 15:37:00 |
The relation and difference for process and program is that, process is a program in execution. It 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. Moreover, 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 memo
The status of process is divided into five states and not other numbers such as 4, and 7 because; as a process executes, it changes state. The state of a process is defined in part by the current activity of that process.
Process Control Block Each process is represented in the operating system by a process control block (PCB)-also called a task control block. In a brief descr iption, the PCB simply serves as the repository for any information that may vary from process to process. Contents within the PCB include Process state, Program counter, CPU registers, CPU-scheduling information, Memory-management information, Accounting information, and I/O status information