- Open your Core Plus in Virtual Box and open Terminal. If you forgot to bring your Tiny Core ova, do Oh No! I Forgot My Ova! Procedure.
- Update your work directory in KELAS/NPM/ with your revision. For example, KELAS is TESTING and your NPM is 1202000818. Please change with your class and NPM.
$ cd TESTING/1202000818/
$ svn update
- Get your token today in apps os.
- Create Lab04 directory in your KELAS/NPM's directory. All your work today must be saved into Lab04's directory.
$ mkdir Lab04
$ svn add Lab04
$ svn commit -m "Lab 04 is super easy!"
$ cd Lab04/
- Take the today task with command:
$ wget --no-check-certificate https://projects.ui.ac.id/attachments/7276/Lab04-SRC.tar.bz2
- Look for the compressed file content with command:
$ tar tjf Lab04-SRC.tar.bz2
- Extract the compressed file with command:
$ tar xjf Lab04-SRC.tar.bz2
- Delete Lab04-SRC.tar.bz2 with command:
$ rm Lab04-SRC.tar.bz2
- Please edit all documents with vi
ZCZC [TOKEN] [NPM]
Please change [TOKEN] with your token and NPM with your student ID. For example, ZCZC 0O9GAG 1202000818.
- Please study all .c documents.
- Please compile all documents and give the same name with the .c file (ex: fork01.c becomes fork01). Hint: compile the file by using the procedures in the previous lab.
- Make "catat-Lab04.txt" with content:
ZCZC [CLASS] TGS LAB04 [DATE]
ZCZC [TOKEN] LOG [REMARKS]
Change [CLASS] with your class, [DATE] with today's date (dd-mm-yyyy), [TOKEN] with your token, [REMARKS] with your short explanation, for example "I am confused.".
- Please capture the output in the screen while do fork's tutorial with command:
$ script -a catat-Lab04.txt
- Please execute all programs one by one.
- Please make a tree as follows by modified "fork04.c".
The process sequence must be: P1,P2,P3,P4,P5,P6
- The example of modified "fork04.c" is:
PID P1 (Induk Proses) = 5000
PID P2 = 5001 Lahir - PID Induk = 5000
PID P3 = 5002 Lahir - PID Induk = 5000
PID P4 = 5003 Lahir - PID Induk = 5002
PID P5 = 5004 Lahir - PID Induk = 5002
PID P6 = 5005 Lahir - PID Induk = 5003
- Download Fork_B210 and use as source for complete the task.
- Use sleep() to manage the output.
- Compile again "fork04.c"
- Execute "fork04" program and put the output into fork04.txt
$ ./fork04 > fork04.txt
- After all programs are executed, please stop the "script" program with command:
- Do MD5SUM.
- Please check and submit your work.