Fall 2024 - CS604 - 1
Fall 2024 - CS604 - 1
Assignment # 01 Deadline
November 19,
Fall 2024 2024
Please carefully read the following instructions before attempting the assignment.
You should consult the recommended books to clarify your concepts, as handouts are insufficient.
You are supposed to submit your assignment in Doc or Docx format.
Any other formats like scanned images, PDF, ZIP, RAR, PPT, BMP, etc. will not be accepted.
Topic Covered:
This assignment covers theoretical understanding, practical implementation, and critical analysis
of the PROCESS FORKIG, Child process and
Topic Covered
Lecture 1 to Lecture 12
NOTE
No assignment will be accepted via email after the due date (whether it is load shedding, internet
malfunctioning, etc.). Hence, refrain from uploading assignments within the last hour of the deadline. It is
recommended that the solution be uploaded at least two days before its closing date.
If you find any mistakes or confusion in the assignment (Question statement), please consult your
instructor before the deadline. After the deadline, no queries will be entertained in this regard.
Question:
Execute the following program in GCC and find out what value of the Parent will be printed at Line A?
You are required to comment each line of the code as well as explain the program code also.
int main()
pid_tpid;
pid = fork();
if (pid == 0)
{ /* child process */
value += 15; }
{ /* parent process */
wait (NULL) ;
exit (0) ;
}
}