DEFINITION OF A PROCESS

Informally a process, or sometimes called task is the activity resulting from the execution of a program with its data by a processor (CPU). Conceptually, each process has its own processor and program stored in physical memory.In reality, two different processes might be sharing the same program or the same processor. The operating system is then viewed as a collection of processes, all running concurrently. They operate almost independently of one another, cooperate by sending messages and synchronization signals to each other, and compete for resources. Each process is dedicated to a specific function, and its interations with other process are limited to only a few well-defined interfaces. Most existing computers are equipped with only one CPU, which must be shared among all processes in order to advance the state of their respective computations. To permit a system to be viewed as a collection of concurrent processes, the details of CPU sharing must be invisible at the process level. This is accomplished by the lowest level of the operating system, usually referred to as the kernel, whose task is to "virtualize" the CPU, that is, to create the illusion of a separated CPU for each running process. The kernel may also provide a separated storage, a virtual memory, for each process. Under these assumptions, each process may be viewed in isolation; it interacts with other processes only through a limited number of primitives also provided by the kernel. In systems equipped with only one processor, the achieved concurrency among processes (both user and system processes) is only logical since only one process might be executing at any given time. Thus the main benefit of introducing the concept of a process is the improve overall structure of the system. By examining the logic of processes and ignoring the number of physical processors and the details of physical memory allocation, it is possible to develop hardware-independent solutions to a number of systems and application problems. The solutions ensure that systems of processes cooperate correctly, regardless of whether or not they share physical resources. The process concept has several other implications in operating systems. It has permitted the isolation and specification of many primitive operating systems tasks, has simplified the study of the organization and dynamics of an operating system, and has led to the development of useful design methodologies. In the case of multiprocessors equipped with more than one processing element dedicated to general computation or in systems equipped with IO channels, physical concurrency is possible. The process notion is invaluable here for dealing with the additional problems of distributing computation to the available processors; typically, each process is viewed as an independent entity that may be scheduled for execution on a processor.

PROCESS STATE

Process state can be best described as the states of change that a process goes through as it executes. Each state of a process is defined in part by the current activity of that process. Here are some examples of the states in which each process might be:

� 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.

� Blocked: The process cannot proceed until it receives a particular resource or message.

� Terminated: The process has finished execution.

*Graph on Page 119 blue book, make a note of the additional state called blocked.

The names for the states mentioned above are not reliable, and can vary between operating systems. These states can handle many situations, but there are some applications for which a finer division of status types is desirable. Consider the following examples:

1.- A user is interactively debugging or running a program. Often, the user will wish to suspend execution to examine the state of computation, possibly make some changes, and either continue or terminate execution.

2.- An internal process might wish to suspend the activity of one or more other process to examine their state or perhaps modify them. The purpose of the suspension may be, for example, to detect or prevent some kinds of deadlocks, to detect and destroy a runaway process, or perhaps to swap the process out of main memory temporarily. In both cases one could block the process to achieve the suspension. However, a process could be already blocked when suspension is desired. Unless we wish to allow a process to blocked on more than one condition, a new suspended status is required.

PROCESS CONTROL BLOCK

A Process Control Block (PCB) represents each process in the operating system. Other name by which is well known is Task Control Block. The following graph shows the many pieces of information associated with a specific process, including these: � Process state: The states that it may include are new, ready, running, waiting, blocked, and so on.

� Program counter: The counter will indicate the address of the next instruction to be executed for this process.

� CPU registers: Registers can vary in type and also in number, everything depends on the computer architecture. They include stack pointers, accumulators, index registers, and other general purpose registers. Along with the program counter, this state information must be saved when an interrupt occurs, to allow the process to be continued correctly afterward.

� CPU scheduling information: This information includes a process priority, pointers to scheduling queues, and any other scheduling parameters.

� Memory-management information: This information may include the value of the base and limit registers, the page tables, or the segments tables depending on the memory system used by the operating system.

� Account information: This information includes the amount of CPU and real time used,time limits, account numbers, job or processes numbers, and so on.

� I/O status information: The information includes the list of I/O devices (such as tape drives) allocated to this process, a list of open files, and so on.

The Process Control Block serves as the repository for any information that may vary from process to process.

LinkExchange
LinkExchange Member Free Home Pages at GeoCities

Hosted by www.Geocities.ws

1