Monday, December 19, 2011

Process Creation

Process Creation--When a new process is to be added to those currently being managed, the OS builds the data structures that are used to manage the process and allocates address space in main memory to the process.
                 A process may create several new processes, via a create-process system call, during the course of execution. The creating process is called a parent process, and the new processes are called the children of that process. Each of these new processes may in turn create other processes, forming a tree of processes.
*Reasons for Process Creation->
1.New batch job -The OS is provided with a batch job control stream, usually on tape or
disk.When the OS is prepared to take on new work, it will read the
next sequence of job control commands.
2.Interactive login-> A user at a terminal logs on to the system.
3.Created by OS to provide a service-> The OS can create a process to perform a function on behalf of a user program, without the user having to wait (e.g., a process to control
printing).
4.Spawned by existing process->For purposes of modularity or to exploit parallelism, a user program
can dictate the creation of a number of processes.

                                                                     When the OS creates a process at the explicit request of another
process, the action is referred to as process spawning.

No comments:

Post a Comment