CSL862: Assignment 1 on Binary Translation

Background reading

  1. QEMU, a Fast and Portable Dynamic Translator, Fabrice Bellard.
  2. QEMU Emulator User Documentation
  3. Intel Reference Manuals

Running a Guest Operating System on QEMU

  1. Run the pintos kernel on QEMU

Counting the number of Instructions Executed

  1. Read the QEMU paper and understand how the dynamic translator inside QEMU works
  2. Change the dynamic translator to count the number of instructions executed in one execution of pintos, and print this value at the end of the execution.
  3. Change the dynamic translator to count the number of increment ('inc') instructions executed in one execution of pintos, and print this value at the end of the execution.
  4. Count the number of 'call' instructions and the number of 'ret' instructions. Report, how many call instructions you see, and how many ret instructions you see. Why is there a mismatch between the two counts?

Note:

  1. To be done in groups of two.
  2. The last date of submission is Aug 14