- 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 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/
- 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
- Change TOKEN, KELAS, dan NPM by your token, class, and student ID for all c's document.
- Create and fill "catat-Lab06.txt" and "WHAT-IS-THIS.txt" with:
ZCZC CLASS STUDENT_ID Lab06
ZCZC TOKEN TEXT
- Please capture the output into "catat-Lab06.txt" and please do not forget to exit after finishing the lab!
$ script -a catat-Lab06.txt
- Compile and run Lab06_FIFO.c
$ gcc -o Lab06_FIFO Lab06_FIFO.c
- Change Lab06_LRU.c so that you can implement LRU algorithm to input the page into memory.
- Please capture the output and total number of fault pages into "WHAT-IS-THIS.txt" for the following case:
- FIFO and LRU program, page size and frame size are default.
- 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.
- Please explain LRU algorithm that you created in "WHAT-IS-THIS.txt".
- Please stop the Script by using command:
- Do MD5SUM.
- Please check and submit your work.
- Please do not forget to check repository.