Assignment 3

When you try to understand why certain applications behave in a certain way and why they cause particular performance effects on the system, it is very useful to "peek inside" an application, for instance to understand how it accesses memory. Hardware counters can help you look inside, but to a certain degree. In this assignment you will learn how to use another powerful tool for analyzing application behaviour: Pin.

In addition, this assignment deliberately provides very few instructions on how to use Pin. It points you to documentation and references, but it is up to you to study these documents.

Experimental platforms:

You can run Pin on any x86 platform, under either Linux or Windows. So if you want, you can use your own machine. If you prefer to use lab machines, use one of the following systems. You DO NOT need an exclusive reservation for this assignment.

You will perform experiments on one or more of these machines.
  • quad.cs.sfu.ca – this is a Solaris/x86 quad-core system from Intel, running Solaris 11. Quad has two physical chips (or CPU packages), each with  two cores. The two cores share an L2 cache.  L2 cache is shared among processors on the same chip: processors 0 and 1, and  processors 2 and 3.  Lock synchronization will be lower between cores located on the same chip than between cores on different chips.

  • octavia.cs.sfu.ca - this is a Solaris/x86 system similar to quad, but instead of four cores it has eight. There are four pairs of cores, each pair shares an L2 cache.

  • trocadero.cs.sfu.ca -this is a Solaris/x86 system from AMD, running Solaris 11. It has two chips. Each chip has four cores. Each core has private L1 instruction and data caches and a private L2 cache. The L3 cache is shared among the cores on the same chip.

  • montmartre.cs.sfu.ca -this system is just like trocadero. It is a Solaris/x86 system from AMD, running Solaris 11. It has two chips. Each chip has four cores. Each core has private L1 instruction and data caches and a private L2 cache. The L3 cache is shared among the cores on the same chip.

Learning how to run Pin:

This wiki page tells you how to run the version of Pin installed on our systems, or how to install your own. The first step is to run Pin and to make sure that it runs properly and produces some meaningful analysis.

Understanding Pin tools:

Pin comes with several tools. Each tool performs a different kind of analysis. You goal is to study Pin documentation in order to understand what tools are available. Don't forget to read about MICA -- a whole suite of tools available for Pin.

Program analysis with Pin:

Pick two of the four programs that you analyzed for Assignment 1. Use one memory-intensive and one CPU-intensive program. Your goal is to try to shed more light on their behavior using Pin. For instance, you need to try to better understand why the memory-intensive program suffered more from contention than the CPU-intensive program. Can you use a Pin tool to enhance your understanding?

Of all the Pin tools that you read about, pick the most appropriate ones for the analysis, collect the data, analyze it and write your conclusions.

What to submit

Submit a well-written report of your analysis. At this point you have already read a few good systems papers, so model your report after your favourite paper. Begin with a brief(!) description of goals and motivation, describe your experimental set-up, present the results and conclude with a thorough analysis.

Your report will be judged on the quality of the results and on how well you understood, analyzed and presented your data. Make sure your paper looks professional (like the papers you have read) and take care to think how to best visualize your data. Do your best to ensure that your paper offers a new insight to the reader.

Your report must not exceed 5 pages in 10-point Times New Roman font with 1-inch margins (so make your figures small and pretty -- but not too small, so they are still readable). I will deduct points if your report does not comply with the formating specifications. Do not play with line spacing or other formatting tricks to fit more text. I highly recommend using latex for formatting. A latex template will be provided to you as a starting point.

The hard-copy of the final report is due in class.
© Copyright 2007 Simon Fraser University www.sfu.ca