0
2.4kviews
Write a Short note on Process Operations
1 Answer
0
22views

Process Creation:

In general-purpose systems, some way is needed to create processes as needed during operation.

There are four principal events led to processes creation.

  1. System initialization.
  2. Execution of a process Creation System calls by a running process.
  3. A user request to create a new process.
  4. Initialization of a batch job.

Foreground processes interact with users. Background processes that stay in background sleeping but suddenly springing to life to handle activity such as email, webpage, printing, and so on..

A process may create a new process by some create process such as 'fork'. It choose to does so, creating process is called parent process and the created one is called the child processes. Only one parent is needed to create a child processNotice that each child has only one parent but each parent may have many children.

Following are some reasons for creation of a process:

• User logs on.

• User starts a program.

• Operating systems creates process to provide service, e.g., to manage printer.

• Some program starts another process, e.g., Netscape calls xv to display a picture.

Process Termination

A process terminates when it finishes executing its last statement. Its resources are returned to the system, it is purged from any system lists or tables, and its process control block (PCB) is erased i.e., the PCB's memory space is returned to a free memory pool. The new process terminates the existing process, usually due to following reasons:

Normal Exist Most processes terminates because they have done their job. This call is exist in UNIX.

Error Exist When process discovers a fatal error. For example, a user tries to compile a program that does not exist.

Fatal Error An error caused by process due to a bug in program for example, executing an illegal instruction, referring non-existing memory or dividing by zero.

• Killed by another Process A process executes a system call telling the Operating Systems to terminate some other process. In UNIX, this call is kill. In some systems when a process kills all processes it created are killed as well (UNIX does not work this way).

Please log in to add an answer.