Os All Programs

Share Embed Donate


Short Description

UNIPUE TE-IT...

Description

/* ======================================================================= Problem Statement : Process control system calls: The demonstration of for k, execve and wait system calls along with zombie and orphan states a. Implement the C program in which main program accepts the integers to be sorted. Main program uses the fork system call to create a new process called a child process. Parent process sorts the integers using merge sort and waits for child process using wait system call to sort the integers usin g quick sort. Also demonstrate zombie and orphan state. ======================================================================= */ #include #include #include #include #include void quicksort(int [10],int,int); void main() { int pid, ppid, a[10], size, i; printf("\nPARENT: My process-id is %d.", getpid()); printf("\n\nEnter the number of elements in the array: "); scanf("%d", &size); printf("Enter %d elements: ", size); for(i=0;i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF