 Hello everyone, I, Mrs. Komal Rahul Pradeshi working as an assistant professor in Department of Computer Science and Engineering of Vulture Institute of Technology, Solarpur going to deliver a lecture on operation on processes. The learning outcome of this video are at the end of this session student will be able to explain system calls used for process creation and termination. Let us see operations on processes. Processes in the system can execute concurrently and they must be created and deleted dynamically. For this purpose the operating system must provide a facility for process creation and process termination. Let us see process creation. Process can be created using create process system call in Windows operating system. Process creation is different in different operating system. Different operating system may use different system calls to create a processes. Here we are going to see example using create process system call. Whenever this system call is executed the invoking process is called as a parent process and the newly created process is called as a child process. Then the child process can also execute create process system call and tree of processes can be formed as shown in this figure. Process P1 is a parent process who invokes create process system call to create process P2 which is a child process. Then P2 can again invoke create process system call to create two child processes P3 and P4. In this way tree of the processes can be formed. Let us see the tree of processes on Unix operating system. In Unix operating system processes are created using fork system call. Initially whenever system boots the root process is created. Root process is responsible to create page daemon, swapper and init process. Then init process creates different user processes and user processes then again create different processes using fork system call. So here using fork system call many processes can be created under different processes. In this way the tree of the processes can be formed on Unix operating system. Let us see the process creation. When a process creates a new process two possibilities exist in terms of execution. First the parent may continue its execution along with child process or parent wait until some or all of its children have terminated. Again there exist the two possibilities in terms of address space of the new process. The child process is duplicate of a parent process means child process can share the whole address space of the parent process or the child process may have its own program loaded into it. To understand this concept let us consider Unix operating system. Unix operating system uses fork system call. Unix operating fork system call child process is created. This child process consist of copy of the address space of the parent process. It allows the parent process to communicate easily with its child. Both processes continue execution. Exec LP system call can be used by child process after fork. Exec LP execute only in child's address space. Let us see example this is the C program for invoking a fork system call after declaration of header file the main function contains one variable called as a PID for process ID because in Unix operating system each and every process is created as Unix using its own process ID. Whenever fork is invoked fork system call written returns the process ID of newly created process that is child process to its parent process and 0 is written to the variable which is written before fork system call here it is PID. So if PID is less than 0 then fork failed and process terminates that means fork system call is not executed properly and so program may terminate. But if PID is equal to equal to 0 that means child process is created and its new identifier is written to the parent process. Once child process is created it starts its execution and using exec LP system call child process executes LS command which displays all files present in bin directory. After completion of the child process parent process executes. Now here the wait system call is used because parent process is waiting for child termination. So here parent is waiting till child process completes its execution. After completion of child process parent prints child complete and exit. This is how the fork system call can be used to create number of processes in Unix operating system. Now pause the video and write your answer for when process creates a new process what are the possibilities that exist in terms of execution and address base of the new processes. Let us see the answer as I already explained whenever new process is created the two possibilities exist in terms of execution that means parent may continue its execution along with child process or parent wait until the termination of the child process. Similarly two possibilities exist in terms of address space of the new process that is child process may contain duplicate address space of the parent process or child has its own program loaded into it. Now let us see process termination. Process terminate when it finish executing its final statement. Let ask the operating system to delete it by using exit system call. If the terminating process is a child process then it may return data to its parent process using wait system call. After that all the resources of the process including physical and virtual memory open files and IO buffers are deallocated by operating system. If the terminating process is the parent process then parent process must wait for termination of the child process using wait system call and parent must wait one after another termination of the child process that is called as cascade termination. Wait system call returns the process identifier of termination child so that parent can identify which child process is terminated. Once all child process terminates parent can also terminate this termination is called as a cascading termination. There may be the case that parent may terminate and child is still alive. Then such type of child processes are adopted by init process. Init process is new parent for that child process and the process which do not have its parent process such processes are called as a orphan processes in Unix operating system and these orphan processes are adopted by init process in Unix. So, these are the references for this video thank you.