Sie sind auf Seite 1von 4

Simulating and Evaluating Shared Cache Replacement

Algorithms for Multi-Core Processors


This is Advanced Computer Architecture project developed and implemented by
Alanoud Alslman / alanoud.alsalman@ucdenver.edu
Arwa Almalki / arwa.almalki@ucdenver.edu
Samaher Alghamdi / samaher.alghamdi@ucdenver.edu
Norah Almaayouf / norah.almaayouf@ucdenver.edu

This project utilize Sniper Multicore Simulator


A next generation parallel and high-speed and accurate x86 Simulator
An open source software which is licensed under the MIT and the Interval
Academic License.
The simulator development is made by the Performance Lab research group at
Ghent University, Belgium.

Sniper Multicore Simulator is implemented using C and C++ language. This simulator
supports parallel applications using pthreads, OpenMP, TBB, OpenCL. To monitor and control
the simulator's behavior at runtime, SimAPI and Python interfaces are used. Sniper Multicore
Simulator is supported on modern Linux-OS support, such as Redhat EL 5,6/Debian
Lenny+/Ubuntu 10.04-15.04+/etc.
Trevor E. Carlson, Wim Heirman, Stijn Eyerman, Ibrahim Hur, Lieven Eeckhout, "An Evaluation
of High-Level Mechanistic Core Models". In ACM Transactions on Architecture and Code
Optimization (TACO), Volume 11, Issue 3, October 2014, Article No. 28
http://dx.doi.org/10.1145/2629677

Three Shared Cache Replacement Algorithms were implemented


1. Evict Write Least Recently Used(EW-LRU)
Give the read blocks a high priority over write blocks during the Evict Decision.
Evict write strategy is introduced by M. Geanta, L. Ghica and N. Tapus in their
paper,Leverage Cache Replacement Policy In Multicore Processors.
The files required to implement this replacement algorithm are,
CacheCtrl.h and CacheCtrl.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\parametric_dram_directory_msi
Cache.h and Cache.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\cache
Cache_set.h and Cache_set.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\cache
Cache_set_ew_lru.h and Cache_set_ew_lru.cc Files path in
sniper folder
sniper-6.1\common\core\memory_subsystem\cache

2. Evict Write Static Re-Reference Interval Prediction (EW-SRRIP)


Give the read blocks a high priority over write blocks during the Evict Decision.
Evict write strategy is introduced by M. Geanta, L. Ghica and N. Tapus in their paper,Leverage
Cache Replacement Policy In Multicore Processors.
The files required to implement this replacement algorithm are,
CacheCtrl.h and CacheCtrl.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\parametric_dram_directory_msi
Cache.h and Cache.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\cache
Cache_set.h and Cache_set.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\cache
Cache_set__ew_srrip.h and Cache_set_ew_srrip.cc Files path in
sniper folder
sniper-6.1\common\core\memory_subsystem\cache

3. Most Recently Used- Tour (MRU-T)


Number of times a line occupies the MRU position during its lifetime in the cache.
MRU-Tour is introduced by A. Valero, J. Sahuquillo, S. Petit, P. Lopez, and J. Duato in their
paper,MRU-Tour-based Replacement Algorithms for Last-Level Caches.
The files required to implement this replacement algorithm are,
CacheCtrl.h and CacheCtrl.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\parametric_dram_directory_msi
Cache.h and Cache.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\cache
Cache_set.h and Cache_set.cc Files path in sniper folder sniper-
6.1\common\core\memory_subsystem\cache
Cache_set_mrut.h and Cache_set_mrut.cc Files path in sniper
folder
sniper-6.1\common\core\memory_subsystem\cache

To run Sniper Multicore Simulator on Dozer, and get the result plots, kindly refer to the Tutorial
document.
While running Sniper Multicore Simulator on Dozer, keep in mind these errors which might
appear while building and compiling Snipers file:
File_name.o (object file contains compiled object code) and File_name.d
(dependencies) might need to be deleted so that the new code works efficiently.
Due to the fact the Sniper commands are case sensitive, typing the command
with small misspelled in the configuration options, such as the input size, will not show
an error but rather it will run the default configuration options, giving the wrong results.

This part is for installing Sniper Multicore Simulator in your machine for
your reference and personal use.
These are the steps that we have done to install Sniper on Ubuntu 14.4. You might get
compatibility issues if run on higher Ubuntu versions. Thus, we would suggest installing Sniper
on an ubuntu 14.4 Virtual Machine.
Download Sniper source code from here then extract the files to any directory
you like.
Download a Pin kit from the Pin downloads page
Do not use any (new) version that uses PinCRT. Currently the
(older) revision 71313 is still available which is known to work with Sniper
Extract Pin into sniper-6.1/pin_kit
(Optional): Set target architecture:
Open terminal then go to the sniper-6.1 directory and type the next commands:
export SNIPER_TARGET_ARCH=ia32 # Change the arch if
needed: it depends on your system: for x86/32 architectures type 'ia32', or for
x64 type 'intel64'
sudo apt-get install libc6-dev-i386 # Here is errors
might occur, you needed to install the whole libraries, try these commands:
# use terminal as root
sudo apt-get update
sudo apt-get install ia32-libs ia32-
libs-multiarch lib32z1-dev zlib1g-dev libbz2-dev
libboost-dev libsqlite3-dev
if any errors occurred when installing the previous,
try installing them in separate steps: ia32-libs, ia32-libs-multiarch, lib32z1-
dev, .... etc
Now, after succession, install the following once again: sudo
apt-get install libc6-dev-i386
sudo apt-get install g++-4.4-multilib # g++ multilib
version (replace 4.4 with your version) depends on the g++ version that you are
using but it has to be newer than 3.4
If the previous step resulted in errors, it could be that you need to
install either the whole g++ and gcc compilers or just a newer version. so follow
the next steps:
sudo apt-get install g++ gcc g++-4.4
gcc-4.4 g++-4.4-multilib gcc-4.4-multilib # not all of
these installations are needed
if you installed a new version of gcc and/or g++,
then you might want to set them as your default compilers as follows:
alias gcc=gcc-4.4
alias g++=g++-4.4
To compile Sniper, some extra dependencies (a pre-compiled copy of the Python
interpreter environment) will be downloaded automatically, so make sure you have a
working internet connection when you make Sniper for the first time
make # or use 'make -j N' where N is the number of cores in
your machine to use parallel make
Running an application (to test if sniper is working)
cd test/fft
make
Files created after each simulation:
Sim.cfg: All the configuration options used to run the benchmarks.
Sim.out: The output file which shows the result of running the
benchmark , such as number of cycles and instruction per core. To get some
required statistics and measurements which is crucial to our study, we added
more information to help us in our study, such as number of miss and hits, and
number of reads and writes.
Sim.info:

Das könnte Ihnen auch gefallen