Teaching page replacement algorithms with a Java-based VM simulator

  • Authors:
  • Fadi N. Sibai;Maria Ma;David A. Lill

  • Affiliations:
  • UAE University, Al Ain, UAE;Fidelity Investments, Toronto, Canada;Motorola Inc., Schaumburg, IL

  • Venue:
  • Proceedings of the 14th Western Canadian Conference on Computing Education
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Computer system courses have long benefited from simulators in conveying important concepts to students. We have modified the Java source code of the MOSS virtual memory simulator to allow users to easily switch between different page replacement algorithms including FIFO, LRU, and Optimal replacement algorithms. The simulator clearly demonstrates the behavior of the page replacement algorithms in a virtual memory system, and provides a convenient way to illustrate page faults and their corresponding page fault costs. Equipped with a GUI for control and page table visualization, it allows the student to visually see how page tables operate and which pages page replacement algorithms evict in case of a page fault. Moreover, class projects may be assigned requiring operating system students to code new page replacement algorithms which they want to simulate and integrate them into the MOSS VM simulator code files thus enhancing the students' Java coding skills. By running various simulations, students can collect page replacement statistics thus comparing the performance of various replacement algorithms.