Os Lab - 3
Os Lab - 3
Aim: Implementation of fork(), wait(), exec() and exit() process system calls.
1.Name of the system call: fork()
Description:The use of the fork() system call is to create a new process by duplicating the calling process. The
fork() system call is made by the parent process, and if it is successful, a child process is created. The fork() system
call does not accept any parameters.
Output:
Output:
Syntax:
Example Program:
#include <stdio.h>
#include <stdlib.h>
// Driver Code
int main(void)
{
printf("START");
exit(0);
// The program is terminated here
// This line is not printed
printf("End of program");
}
Output: