0% found this document useful (0 votes)
28 views4 pages

CSE430 Midterm 1

A process consists of more than just program code - it also includes the current activity represented by the program counter, contents of registers, a process stack containing temporary data, a data section containing global variables, and potentially a heap for dynamic memory allocation. A program only becomes a process when it is loaded into memory. There are several possible states that a process can be in, including new, running, waiting, ready, and terminated. A process control block stores information about the state and resources allocated to each process.

Uploaded by

maunghtaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

CSE430 Midterm 1

A process consists of more than just program code - it also includes the current activity represented by the program counter, contents of registers, a process stack containing temporary data, a data section containing global variables, and potentially a heap for dynamic memory allocation. A program only becomes a process when it is loaded into memory. There are several possible states that a process can be in, including new, running, waiting, ready, and terminated. A process control block stores information about the state and resources allocated to each process.

Uploaded by

maunghtaik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

3.1.

1 The Process
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 processors 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.
We emphasize that 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). In contrast, 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.

3.1.2 Process State


As a process executes, it changes state. The state of a process is defined in part by
the current activity of that process. A process may be in one of the following states:
New. The process is being created.
Running. Instructions are being executed.
Waiting. The process is waiting for some event to occur (such as an I/O
completion or reception of a signal).

Ready. The process is waiting to be assigned to a processor.


Terminated. The process has finished execution.
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. The state diagram
corresponding to these states is presented in Figure 3.2.

3.1.3 Process Control Block

You might also like