Lab06: LRU and FIFO Simulation (revision 130911-r02)

Attention: This lab does not need forking. Please DO NOT include forking in your code.

  1. 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.
  2. 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
    $ UPCEK
  3. Get your token today in apps os.
  4. Create Lab06 directory in your KELAS/NPM's directory. All your work today must be saved into Lab04's directory.
    $ mkdir Lab06
    $ svn add Lab06
    $ svn commit -m "I will do Lab 06 in less than 1 hour!" 
    $ cd Lab06/
  5. Download, list, extract, and delete source document:
    $ wget --no-check-certificate https://projects.ui.ac.id/attachments/7315/Lab06.tar.bz2
    $ tar tfj Lab06.tar.bz2
    $ tar xfj Lab06.tar.bz2
    $ ls -al
    $ rm -f Lab06.tar.bz2
    
  6. Change TOKEN, KELAS, dan NPM by your token, class, and student ID for all c's document.
  7. Create and fill "catat-Lab06.txt" and "WHAT-IS-THIS.txt" with:
    ZCZC CLASS STUDENT_ID Lab06
    ZCZC TOKEN TEXT
    
  8. Please capture the output into "catat-Lab06.txt" and please do not forget to exit after finishing the lab!
    $ script -a catat-Lab06.txt
    
  9. Compile and run Lab06_FIFO.c
    $ gcc -o Lab06_FIFO Lab06_FIFO.c
    $ ./Lab06_FIFO
    
  10. Change Lab06_LRU.c so that you can implement LRU algorithm to input the page into memory.
  11. Please capture the output and total number of fault pages into "WHAT-IS-THIS.txt" for the following case:
    1. FIFO and LRU program, page size and frame size are default.
    2. FIFO dan LRU program, page size number is the last 3 digit of your NPM and frame size is following formula: 2 + (the last digit of your Student ID % 4).
      At the end of your task, in both programs, the page size of every documents is the last 3 digit of your NPM and the frame size is 2 + (the last digit of your Student ID % 4).
      Attention: For the students who have the last 3 digits of their NPM like 084, the page size is 84. For the students who have the last 3 digits of their NPM like 003, the page size is 3.
  12. Please explain LRU algorithm that you created in "WHAT-IS-THIS.txt".
  13. Please stop the Script by using command:
    $ exit
    
  14. Do MD5SUM.
  15. Please check and submit your work.
  16. Please do not forget to check repository.

Back to Wiki's Page