Lab 05 - Synchronization & Deadlock (revision 160319-r01)

Back to Wiki Page


  1. Have you joined SCELE Operating Systems?
  2. Have you joined SCELE Arsip?
  3. Report through SCELE Technical Problem should you find any problems!
  4. Remember, Uncle G is your friend!


  1. Boot your PC through ltsp (don't press any key during boot)
  2. Login using your account
  3. Open terminal and ssh with your username on os1xx machine (Change xx with your assigned VM number).
    $ ssh
  4. Create KELAS/NPM/Lab05 directory. For example my KELAS is TESTING and my NPM is 1202000818, replace it with your class (A160, B160, C160, D160, E160, EXT160, MTX160) and student ID.
    $ mkdir -p TESTING/1202000818/Lab05
    $ cd TESTING/1202000818/Lab05/
  5. Do the following to prepare the examination:
    $ wget
    $ chmod +x UPDATE.x
    $ ./UPDATE.x
    $ rm -f UPDATE.x


  1. Please create "catat-Lab05.txt" file with contents:

    Change [KELAS] with your class, [TANGGAL] with today's date with format DD-MM-YY, [NPM] with your NPM, and [KETERANGAN] with short explanation.
    ZCZC TESTING TGS LAB05 10-03-23
    ZCZC 1202000818 LOG Hore sebentar lagi UTS!
  2. Record all output in your tutorial.
    $ script -a catat-Lab05.txt

    PS: If you haven't finished your work in one go and continue the work in a different time, you must do this command again.
  3. Do the Synchronization & Deadlock Problem.
  4. Stop recording output.
    $ exit
  5. Optional: ask your teaching assistant about Synchronization & Deadlock problems.


  1. Within your group, discuss and write a pdf contains solution for Synchronization & Deadlock problems:
    1. Minimum 2 problems for the topic Synchronization & Deadlock on Arsip Ujian(183.pdf page 19-24, 184.pdf page 10-13, 94.pdf page 15-24)
      Note: Do this OUTSIDE the VM machine. Do NOT wait until the lab session to do this task, do it as soon as possible so that you can focus on doing tutorial tasks instead on the lab session.
      Give the solution pdf named lab05.pdf.
  2. Copy the solution lab05.pdf to your VM. Put it in Lab05 directory. Hint: Use scp but put the origin and destination in reverse to copy it to your VM home directory. Then move the file to your Lab05 directory.
  3. Execute genbio script
    $ genbio
  4. Do md5sum Tutorial.
  5. Do Examination Tutorial.
  6. Put all your files and documents in KELAS-NPM-Lab05.tar.bz2 archive. Replace KELAS with your class (A160, B160, C160, D160, E160, EXT160, MTX160), NPM with your student ID.
    $ cd ..
    $ tar cvjf TESTING-1202000818-Lab05.tar.bz2 Lab05/
  7. Copy the tar.bz2 file to your ltsp. For example using filename before and change username to your username used to login into ltsp. Enter password when prompted.
    $ scp TESTING-1202000818-Lab05.tar.bz2
  8. Submit your document to Scele. Each person should submit:
    1. myself.txt
    2. lab05.pdf
    3. catat-Lab05.txt
    4. main1.c
    5. main1
    6. main1.o
    7. main2.c
    8. main2
    9. main2.o
    10. main3.c
    11. main3
    12. main3.o
    13. main4.c
    14. main4
    15. main4.o
    16. main5.c
    17. main5
    18. main5.o
    19. main6.c
    20. main6
    21. main6.o
    22. myutils.c
    23. myutils.h
    24. myutils.o
    25. Makefile
    26. MD5SUM
    27. MD5SUM.asc
    28. .periksa
  9. That's it, folks. Have fun for the rest of the week.

Back to Wiki Page