/Teaching/System Level Programming/Assignments/A3

Task: Memory Layout and Demand Paging


In this assignment we want to analyze memory layout and behavior of 32bit and 64bit programs (if in doubt: gcc/ g++  8 on a recent (default configured) 64bit Ubuntu Linux, binary compiled with -m32/-m64). All questions refer to 64bit systems, not 32bit systems.

We will examine differences in the behavior of the following groups of variables:

  1. Global variables (variables allocated in a global scope)
  2. Local variables (variables allocated in different threads)
  3. Static variables (variables allocated in with the static keyword)
  4. “Malloc variables” (variables allocated in with malloc)
  5. “Shared memory variables” (variables allocated in shared memory)

In order to get points on this assignment you have to answer questions and participate in one of the discussion rounds.

Your tasks:

  • Log in to SNP Test System and go to the Questionnaire Page
  • Write short programs to answer the questions.
    • Add these programs/notes/bash commands to your repo in folder A3.
    • We will not check these programs/notes/bash commands, if they are not there we do not care, BUT in the exercise interview you will have to demonstrate how to run one of the experiments. Worst case: you have to live-implement it within the short exercise interview. Also, if we suspect plagiarism these files can be your defense.
    • The questions are unrestricted multiple choice. That is, any number of choices from zero to all can be correct.
  • Register and participate in one of the discussion rounds
    • We will discuss the questions and solutions from the Questionnaire
  • Points: Questionnaire +/- points from the discussion round

Assignment Tutor

If you have any questions regarding this assignment, try Discord and newsgroup first, and bs-helpline@iaik.tugraz.at second. If you have a more direct question regarding your specific solution, you can also ask the tutor who organizes this assignment:

Mathias Oberhuber mathias.oberhuber@student.tugraz.at