Contents

Exam Logistics

The Midterm 2 ISA exam is a 3-hour in-person pencil-and paper exam that for most students will be held during the 3-hour scheduled lab time on Wed Apr 30. However, the lab room SCI L037 is too small to be comfortable for an exam, so the following rooms will be used instead:

  • Midterm 2 for the morning lab section (8:30-11:30) will be held in SCI L180.

  • Midterm 2 for the afternoon lab section (2:30-5:30) will be held in SCI H401.

If you are in the morning section but prefer to take Midterm 2 during the afternoon section, you can do this. Just email Lyn in advance about your plan to switch.

Students with accomodations and other issues might take the exam in a different room or have more time.

The exam is open book in the sense that you may bring any hardcopy materials (books, printed slides, handwritten notes).

  • You cannot bring any notes written by any other person.

  • You cannot use any electronic device during the exam.

You will be given a blue book for writing down scratch work during your exam. These blue books will be collected at the end of the exam.

Lyn will be proctoring the exam and will be near the exam room during most of the exam time. Feel free to ask him clarification questions about the exam.

If you wish to take a brief break to go to the bathroom or have a snack outside the testing room, you may do so. No eating is allowed in the exam room so as not to disturb other students.

Reference material

The exam does not focus on memorization and will include specific required information for certain sections (e.g., you do not need to memorize all x86-64 instructions, which would be an impossible task). However, you should know offhand, for example, how to read an x86 addressing mode, how structs are aligned in C programs, where C program constructs are laid on in memory, or how to deference a pointer.

In addition to the per-question reference material, the following reference pages will be provided: ISA reference pages

Topics

  • The exam focuses on topics under the Hardware-Software Interface part of the course, plus the process material on fork and waitpid as covered in Lab 11 and in the Process Model materials.
    • While the exam does not focus on topics from the earlier Computational Building Blocks part of the course, the ideas are connected, so facility with those ideas may still help, especially in terms of converting between decimal, binary, and hex representations of numbers and bit manipulation. But Midterm 2 will not cover any of the hardware details covered in Miderm 1 (e.g., gates, MUXes, encoders/decoders, ALUs, or the microarchitecture details of the HW ISA).
    • +Optional topics are excluded.
    • Later topics, starting with Memory Allocation, are excluded.
  • The exam assumes familiarity with the concepts used by assignments associated with the exam topics, in particular:
  • Midterm 2 will cover material from Representing Data Structures and Lab 9, even though you did not get much practice with these in your assignments. This includes the memory layout of (1) 1D and 2D arrays (2) C structs and (3) linked lists and how these layouts are manipulated in C code and in x86 code, especially involving the x86-64 addressing mode notation offset(base, index, scale), where: offset must be a decimal or hex constant; base and index must be register names; and scale must be one of 1, 2, 4, or 8.
    (See x86 Basics slides 13-21 to review this.)
  • Midterm 2 will also cover the lea x86 instruction (Load Effective Address, a.k.a. Lovely Efficient Arithmetic), which does not access or store elements in memory using the x86-64 addressing mode notation offset(base, index, scale), but instead uses it to calculate certain arithmetic expressions more efficiently than other combinations of x86 instructions (see x86 Basics slides 22-26 to review this).

Study Materials

In addition to reviewing relevant assignments, lecture, and lab materials, the following materials are recommended for studying for the exam:

Honor Code

The exam is subject to the Honor Code.

You may not give or receive help on the exam. You may not share details of the exam questions or what material is covered until exam grades have been released to everyone in the course. At that point, you can discuss the exam with other current CS240 students (you should not provide this information to any future CS240 students). You may not discuss the exam with past or future CS240 students.

You are encouraged to study with other students and can prepare your own paper notes with other students.