1 / 18

Assignment 3

Assignment 3. Form a group of 2 Find processors with two different architectures Intel Alpha (cs26) SPARC PowerPC (Mac) … Write a program to measure the characteristics of the TLB in the two processors Size Others (refer to cache lectures) Write a report Your results

Télécharger la présentation

Assignment 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assignment 3 • Form a group of 2 • Find processors with two different architectures • Intel • Alpha (cs26) • SPARC • PowerPC (Mac) • … • Write a program to measure the characteristics of the TLB in the two processors • Size • Others (refer to cache lectures) • Write a report • Your results • How you measured them John Morris

  2. Assignment 3 • Warnings • Cache and TLB measurement programs are available on the Internet • Use of somebody else’s program is forbidden • Breaking this rule is plagiarism! • Penalty can be more than loss of marks for this assignment • Don’t risk it! • You must be able to tell us HOW your program works! • You may be required to give an oral explanation • This is a scientific experiment • Good scientific experiments have some basic characteristics • Next set of slides give some of these • Failing to follow good experimental practice loses marks • Key check points • Hypothesis • Reasonable error estimates John Morris

  3. Assignment 3 • Warnings • Don’t forget that your processor has a cache too! • Your experimental design should allow for it also! • As with the TLB, some research to form an initial hypothesis will save time and improve your final result • You may like to break your hypothesis down in several hypotheses • L1 cache has x bytes and will affect my measurements in … • TLB has x and y characteristics and will … • … John Morris

  4. Computer Architecture 363Experimental Design John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL: http:/www.cs.auckland.ac.nz/~jmor159 Reference:Patterson & Hennessy, Chapter 2 John Morris

  5. Experimental Design • Good design • Saves Time • Gets better results! • Hypothesis - essential starting point • Form one before doing the experiment • Use theory to predict results • Examples • Time for this program will be proportional to the size of the problem • O (n) running time John Morris

  6. Theoretical Prediction • Example • Time is linear in size of problem Time (sec) Time Complexity O(n) Size of problem - n John Morris

  7. Theoretical Prediction • but ... • Time will increase sharply when cache is full Time (sec) Running time jumps! Data fits in cache Cache overflows Size of problem - n John Morris

  8. Refine the prediction! • Time will increase sharply when cache is full • How sharply? More likely! You can probably estimate the shape of this curve Time (sec) Data fits in cache Cache overflows Size of problem - n John Morris

  9. Why not just do some measurements? • Experiments are always subject to errors Expectation Sharp jump here Time (sec) Experiment Measure up to here Data fits in cache Cache overflows Size of problem - n John Morris

  10. Why not just do some measurements? • Experiments are always subject to errors Actual measurements No clear trend, so fit a straight line No sharp jump? \No cache! Time (sec) Data fits in cache Cache overflows Size of problem - n John Morris

  11. Why not just do some measurements? • Make sure to carry the experiment far enough! but .. Measure as far as here and it’s clear! Time (sec) Measure up to here No sharp jump but sharp increase in slope as predicted! Data fits in cache Cache overflows Size of problem - n John Morris

  12. Cache Problem Real Shape! From simple model L1 Cache Size John Morris

  13. Errors • Random errors • Repeat a measurement • Deviations from mean are random errors • Limited clock resolution can produce these dt = 0.8*(timer resolution) randomly reported as 0 or 1 John Morris

  14. Errors • Systematic errors • Results are perturbed in one direction • OS will interrupt • All times are lengthened • Error Reduction • Reduce quantisation effects • Ensure dt >> timer resolution • Make several measurements • Use minimum? • Still likely to have OS contribution! • Use mean? • Includes average amount of OS overhead John Morris

  15. Generating conclusions • Estimate errors first • Add error bars before fitting curves • Same data - different errors Only a curve fits! A linear relation is possible! John Morris

  16. Generating conclusions • If your original hypothesis suggested a linear relation, failure to adequately allow for error would have sent you off on a fruitless search for a new hypothesis! Only a curve fits! A linear relation is possible! John Morris

  17. Transform Data • Use your hypothesis • Usually transform data to linear form • O(n2) algorithm • Running time for problem size n, • t(n) = c n2 • Divide experimental times, t(n) by n2 • constant, c • Use the computer to generate a table of normalised data • It’s very good at these simple, boring tasks! • It’ll also print out a neat table for your report! John Morris

  18. Presenting data • Trap - • Computer calculates result to 6 significant figures • Put these numbers directly in your report • Average time = 4.53456 s implies 4.53456 +/- 0.000005 s Obviously ridiculous! • Accuracy of 1% would be excellent here • Average time = 4.5 s implies 4.5 +/- 0.05 s • Present a realistic number of significant figures in your report! Too many significant figures will lose marks! John Morris

More Related