Zani's webpage

Click here to edit subtitle

More
  • Home
  • Resume
  • Academic Works
  • Knowledge Sharing
  • Personal Interests
  • Contact Me

Academic Works

[Operating Systems]  Cache memory simulator

This simulator can only be compiled and executed in a Linux environment. 

Once you have all the files in the same folder, you must compile it in the command prompt (terminal) using the command "make".
If it doesn't work, the following instructions will guide you through the manual compilation and execution of the program:

1. Using command prompt, run the following two commands:

1) gcc -o simulador simulador.c

2) gcc -o gerador gerador.c

The file named "gerador.c" is responsible for creating the input file for the simulator. It's not necessary to execute the file "gerador.c" before the simulator though. There is an input file as an example among the files. 

The execution instructions come up once you run the program using the command "./gerador" in the command prompt.

To run the simulator, use the command "./simulador" in the Linux command prompt. 

You will see a menu with 4 options, as well as the values of the cache memory initialized by the input file and the information about the simulation mode you choose.

In the configuration menu, it's possible to select the step-by-step mode, in which each instruction is executed after the user presses the "Enter" key. When the step-by-step mode is not activated, the simulator will execute the memory access instructions automatically, according to the execution speed that the user has previously chosen in the configuration menu.

After choosing the type of mapping you wish, the simulator will show some statistics on "hits" and "misses" in memory, as well as the initialized values in every line and block of available cache levels.

After executing, it's possible to select another type of mapping without the need of reseting the simulator.

Download simulator
Create your own free website today
Webs
Better Websites Made Simple