Click here for the Final Writeup
Click here for the Project Update
Summary
We are going to make a cache simulator to test the performance of various snooping cache coherence protocols on various programs. We will be implementing the MSI, MESI, MOESI, and Dragon cache coherence protocols, and by using Intel Pin, test our cache simulator with various memory traces from real applications.
Background
Maintaining coherency among caches in a system is problem that has been worked on for many years. In class, we learned about different snooping-based cache coherency protocols such as MSI and Dragon, as well as directory-based systems. As cache coherence is necessary for modern computing, their performance is paramount for maximizing computing and minimizing additional overhead.
The Challenge
The challenging part will be to correctly implement a cache emulator that accepts the memory traces produced by Pin, and then models the program's actions by adhering to whichever protocol the user selects. As the simulator itself will be a serial program, we will not have problems such as race conditions, poor work distribution, or divergent execution.
For the emulator, not only will it be difficult to design and create a system that handles the memory traces for the different protocols to interpret, but implementing the protocols themselves will be difficult to do in an exact manner, as well as tracking key performance parameters while simulating the cache.
Resources
We will be using Intel Pin tool to generate the memory traces of parallel programs. We will refer to lecture slides for the details about the MSI and MESI protocols, as well as for any other additional information needed. We will also be using the paper by Archibald and Baer for specification of the Dragon protocol. We will program our simulator using C++, and will use either our own computers or any Gates machines.
Goals and Deliverables
Plan to achieve
- Create a cache simulator that successfully takes in a memory trace generated by Pin and simulates how the caches would act according to the MSI, MESI, and MOESI protocols.
- Generate statistics regarding cache misses, cache hits, and communication overhead. Plot with respect to traced application and which protocol used.
Hope to achieve
- Implement the dragon protocol.
- Implement a directory-based cache coherence protocol.
- Create a graphical application of our own, measure its performance, and then run it in our simulator to determine which cache protocol gives the best performance.
Platform Choice
We will use C++ to write our simulator, as this will enable us to roughly model how the simulation translates to hardware, while providing us the ability to use classes for better organization.
Initial Schedule
- By April 9th: Understand how to use Intel Pin. Break the simulator into components and map out their interactions in a generalized fashion.
- By April 16th: Have the ability to Pin a program and parse the resulting data. Begin implementing the MSI protocol to the point it can accept the Pin trace data.
- By April 23rd: Finish the MSI protocol.
- By April 30th: Finish the MESI, work on the MOESI protocol, and begin implementing the Dragon Protocol.
- By May 7th: Finish the MOESI and Dragon Protocols. Generate the graphs showing the differences in performance for the different protocols.