PROCESS CREATION (In Linux/Unix)
PROCESS CREATION
PROGRAM:
#include<stdio.h>
#include<conio.h>
main(int argc,char *argv[])
{
int pid;
pid=fork();
if(pid<0)
{
fprintf(stderr,”Fork failed”);
exit(-1);
}
else if(pid==0)
execlp(“/bin/ls”,”ls”,NULL)
else
{
wait(NULL):
printf(“Child completed”);
}
exit (0);
}
I NEED LINUX OS SCHEDULING ALGORITHM CODE
ReplyDelete