Ø Operations on process –
·
The process in most system can execute
concurrently and they may be created and deleted dynamically.
·
So this system must provide a mechanism
for process creation and termination.
1. Process
creation
2. Process
creation
1.
Process
creation –
·
A process may create several new
process creating process is called parent process and the new process are
called the child process.
·
Each of this new process creates other
process in form tree structure.
·
All operating system identity process
according to a unique PID (process Identifier) number, which is integer number.
·
When a process create a new process,
there are number of possibilities for execution exist –
i.
The parent process continues to execute
concurrently with its children.
ii.
The process wait until some or all of
its children have terminated
iii.
The process has new program loaded into
it –
In UNIX operating system a new process created by the fork
() system call.
exe() system call for execute created process.
Wait () system call for placed device queue or wait state.
In windows operating system new process created using
createprocess() system call.
In this function there are two parameters passed -
a.
STARUPINFO
b.
Process information
Process creation
using the fork ( ) system call
2. Process termination –
·
A process terminate when it finished
its execution using exit () system call.
·
At this point the process may return a
status value (integer values) to its parent process via wait() system call.
·
All the resources of process including
physical and virtual memory open file and input – output buffers are
deallocated by the operating system.
·
In window process terminated by
terminateprocess() system call.
·
A parent may terminate the execution of
one of its children for a several reason such as –
i.
The child has executed its uses of some
of the resources that it has been allocated.
ii.
The task assign to the child is no
longer required.
iii.
The parent is existing, and the operating
system does not allow a child to continue if its parent terminates.
·
In such system, if a process terminates
(either normally or abnormally) then all its children must be terminated is
called cascading termination.
·
Terminate a process by using the exit()
system call
·
When a process terminates its resources
are deallocated by the operating system, but its entry in process table must
remain there until the parent call wait(), but whose parent has not yet called
wait() is known as zombie process.