OS Process Creation Methods
Process is a program in execution. Therefore it is an instance of a program running on a computer. Each process associates its own code, data and resources allocated to it.
Four types of events will lead to process creation,
At the system initialization stage
When an operating system is booting, several processes will be created. These processes can be foreground or background processes. Foreground processes are the processes which interact with the user and perform work for them. But background processes will not associate with a particular user, instead have some specific function. For example accepting incoming email can be a background process.Request of the running process
Processes can be created by a request from a running process. For example a running process may issue “process creation” system calls to create a child process. Hence parent & child have the same memory image, same environment strings and same open files.In a UNIX operating system:
Fork system call is used to create a new process, and execve system call is used to execute the program.
In a Windows operating system:
Single win32 function call called create process handles both process creation and loading correct program in to new process.
A user request to create a new process
If a user requests some job from the computer system, in order to achieve that, the operating system will create new processes. For example in interactive systems, users can start programs by typing a command/ clicking an icon.Initiation of a batch job
In batch systems on large mainframes; user submits batch jobs to the system. If resources are available, the operating system creates a new process and runs the next job from the input queue.• Creating a new process is useful when the work to be done can be formulated in terms of several related, but otherwise independent interacting processes.
• A new process is created by having an existing process execute a “process creation” system call

Post a Comment