Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

代码代写|CSC3150 Assignment 1

代码代写|CSC3150 Assignment 1



Homework Requirements


WARNING!!! Before starting on this assignment, make sure you have set up your VM properly. We would test all students’ homework using the following environment. You can type the following command in terminal on your VM to see if your configuration matches the test environment. If not, you are still good to go, but please try to test your program with the following environment for at least once. Because you may be able to run your program on your environment, but not on TAs’ environment, causng inconvenience or even grade deduction.

If you follow the tutorials then your VM setting should be fine, though verify your environment again is recommended.

Linux Version

Linux Kernel Version

original version:

downgraded version:

GCC Version

main@ubuntu:/$ cat /etc/issue

Ubuntu 16.04.5 LTS \n \l

main@ubuntu:/$ uname -r


main@ubuntu:/$ uname -r


main@ubuntu:/$ gcc –version

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

Copyright (C) 2015 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO


Please note that, teaching assistants may ask you to explain the meaning of your program, to ensure that the codes are indeed written by yourself. Please also note that we would check whether your program is too similar to your fellow students’ code using plagiarism detectors.

Violation against the format requirements will lead to grade deduction.

Here is the format guide. The project structure is illustrated as below. You can also use tree command to check if your structure is fine. Structure mismatch would cause grade deduction.

Please compress all files in the file structure root folder into a single zip file and name it using  your student id as the code showing below and above, for example, The report should be submitted in the format of pdf, together with your source code. Format mismatch would cause grade deduction. Here is the sample step for compress your code.

main@ubuntu:~/Desktop/Assignment_1_<student_id>$ tree.

├── report.pdf

└── source

├── bonus

│ ├── Makefile

│ ├── myfork.c

│ └── <other_files>

├── program1

│ ├── abort.c

│ ├── alarm.c

│ ├── bus.c

│ ├── floating.c

│ ├── hangup.c

│ ├── illegal_instr.c

│ ├── interrupt.c

│ ├── kill.c

│ ├── Makefile

│ ├── normal.c

│ ├── pipe.c

│ ├── program1.c

│ ├── quit.c

│ ├── segment_fault.c

│ ├── stop.c

│ ├── terminate.c

│ └── trap.c

└── program2

├── Makefile

├── program2.c

└── test.c

4 directories, <your_file_num> files

main@ubuntu:~/Desktop$ zip -q -r Assignment_1_<student_id>.zip


main@ubuntu:~/Desktop$ ls

Assignment_1_<student_id> Assignment_1_<student_id>.zipTask 1 (30 points)

In this task, you should write a program ( program1.c ) that implement the functions below:

In user mode, fork a child process to execute the test program. (10 points)

When child process finish execution, the parent process will receive the SIGCHLD signal by

wait() function. (5 points)

There are 15 test programs provided. 1 is for normal termination, and the rest are exception cases. Please use these test programs as your executing programs.

The termination information of child process should be print out. If normal termination, print normal termination and exit status. If not, print out how did the child process terminates and what signal was raised in child process. (15 points)