0% found this document useful (0 votes)
27 views

Refer To README - DESD - 4.txt and Unix - Env - PDF, For More Hints !!! Refer To Process - Unix - PDF For Theory and Details of Implementation !!!

This document provides instructions for three Unix/Linux programming assignments involving processes and waitpid(). 1. Create 5 child processes from a parent and use waitpid() to collect their termination statuses after the parent finishes its tasks. Cover normal and abnormal termination scenarios. 2. Create 5 more child processes to launch applications like a PDF viewer. Use waitpid() to collect termination statuses after the parent finishes. Terminate children normally and abnormally. 3. Create 5 child processes to compile programs and use exit codes to determine if object files can be linked into a final executable. Load the executable if linking succeeds.

Uploaded by

Shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Refer To README - DESD - 4.txt and Unix - Env - PDF, For More Hints !!! Refer To Process - Unix - PDF For Theory and Details of Implementation !!!

This document provides instructions for three Unix/Linux programming assignments involving processes and waitpid(). 1. Create 5 child processes from a parent and use waitpid() to collect their termination statuses after the parent finishes its tasks. Cover normal and abnormal termination scenarios. 2. Create 5 more child processes to launch applications like a PDF viewer. Use waitpid() to collect termination statuses after the parent finishes. Terminate children normally and abnormally. 3. Create 5 child processes to compile programs and use exit codes to determine if object files can be linked into a final executable. Load the executable if linking succeeds.

Uploaded by

Shivam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Refer to README_DESD_4.txt and unix_env.pdf, for more hints !!!

Refer to process_unix.pdf for theory and details of implementation !!! 
EOS/Linux assignment – 3
1. Create 5 children processes from a common parent and ensure that the 
    parent terminates after cleaning all the terminated children using  waitpid().
    The waitpid()  must  be called after  all the children are created
    and the parent has completed its work real work,if any. You must interpret
    the exit code of the cleaned­up processes, using waitpid(), in parent process
     – you must cover all the possible scenarios !!!
Hints :   a) refer to fork2n.c  and related samples 
             b) as per fork2n.c, you can modify certain children processes
                  to execute, in a while loop and others can normally terminate
             c) you can use  kill    ­SIGKILL   <pid>  to terminate children 
                 processes forcibly/abnormally 
             d) as always, use ps  and  top commands to check the status of 
                  processes 
   
3. Create a 5 child process from a common parent and launch different
    applications from the children processes  ­ you may launch pdf viewer,
     kwrite,  gcc, and w1(based on while1.c) ­ parent process must use waitpid() 
     to collect the termination status of the child process ­  waitpid()           
    must  be called after  all the children are created and the parent has  
    completed its work real work,if any. You must interpret the exit code of the 
    cleaned­up processes, using waitpid(), in the parent process 
     – you must cover all the possible scenarios ­
    meaning, terminate the children processes normally(successful/
    unsuccessful) or abnormally !!!
Note: do not load complex applications, which will require additional settings    
4. Create 5 processes from a common parent and ensure that the parent 
    terminates after cleaning all the terminated children using  waitpid().
    The waitpid()  must  be called after  all the children are created
    and the parent has completed its work real work,if any; in addition, you must
    compile 5 different program files to in children processes to generate their 
    respective object files ; the parent process must use waitpid() to collect the 
    termination  status of children processes – based on the exit code information
    generated by children processes, link all the object files to 
    generate the final, linked program/application. In addition, the generated
    binary executable must be loaded in a new process, if the linking is 
    successful !!!   Hint – refer to unix_env.pdf, for more hints  ­ also, refer
     to assgn1_4.c    

You might also like