Lecture | Title | Date | Time exercise/lecture | Room |
---|---|---|---|---|
1 | Introduction, integers | 10:15-12:00/12:30-14:15 | Aud. 4 | |
2 | Integers, floats | 10:15-12:00/12:30-14:15 | Aud. 4 | |
3 | Program and data encoding | 10:15-12:00/12:30-14:15 | Aud. 4 | |
4 | Control and procedure | 12:30-14:15/14:30-16:15 | Aud. 4 | |
5 | Data allocation | 8:15-10:00/10:15-12:00 | Aud. 1 | |
6 | Introduction to Y86 | 8:15-10:10/10:15-12:00 | Aud. 1 | |
7 | Implementing Y86 | 10:15-12:00/12:30-14:15 | Aud. 4 | |
8 | Y86 cont. | 8:15-10:10/10:15-12:00 | Aud. 4 | |
9 | RAM, Memory hierarchy | 8:15-10:10/10:15-12:00 | Aud. 1 | |
10 | Cache Memory, Virtual memory | 8:15-10:10/10:15-12:00 | Aud. 4 | |
11 | Virtual memory | 8:15-10:10/10:15-12:00 | Aud. 4 | |
12 | Closing, exam | 8:15-10:10/10:15-12:00 | Aud. 3 | |
- | Re-exam | 9:00-13:00 | KFUM-hallen |
The schedule is preliminary and can be changed.
Lectures are divided into 3 sessions of 30 minutes with a short break in-between. The first part is a summary where I sort out the important concepts to remember from your self-reading (see syllabus). We may also do some quiz so always bring pen and paper just in case. The two remaining sessions are lectures on the topics of the day.
The reading directions on this page are for after the lecture. You are expected to read your self-read sections before the upcoming lectures. You are expected to have a quick look at the topics of the day before the lecture (see reading), typically 10 min, and then read the sections in detail after the lecture. You are invited to bring the book to take notes in it and mark what is important and/or take notes.
Exercise session:
Lecture:
Reading: Sections 2.1 and 2.2.
Slides: Introduction, Chapter 1 summary, Integers.
Exercise session:
!!x
).Lecture:
Reading: Sections 2.3 and 2.4.
Slides: Integers, Summary self-reading, Floats.
Exercise session:
Lecture:
Reading: Sections 3.1, 3.2, 3.3, 3.4, and 3.5.
Slides: Summary self-reading, Machine level programming I.
Note: For those who had problems with the Debian image, I have made a new image with Ubuntu with proper kernel modules installed. Unfortunately I couldn't do it for the Debian image, it was not working. I used 7-zip to compress it.
Exercise session: Use this manual to implement inline-assembly functions.
int rot_left(int number, unsigned int count);
int rot_right(int number, unsigned int
count);
pos(1)->0
and pos(12)->2
. Return -1 if 0 is used as
the argument. Hint: use bsf.asm_test_bit
in the
solution. Recompile with -O2 and -O3, test and
compare the binaries. Explain.Notes:
kdbg
as a
debugger.objdump
-dC
.More explanations and examples can be found here.
[name] "register constraint" (expression)
Lecture:
Reading: Sections 3.6 and 3.7.
Slides: Summary self-reading, Machine level programming II, Machine level programming III.
Exercise session:
Lecture:
Reading: Sections 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13.
Slides: Summary self-reading, Machine level programming IV, Machine level programming V.
Exercise session:
kdbg
with the register
view open. Click on the + to see the assembly in the code
window. You can replace the rand() call by some constant
interesting values, e.g., 0xffffffff or 0x11111111, etc. What
is the function doing? How does it work?Lecture:
Reading: Sections 4.1, and 4.2.
Slides: Summary self-reading, Processor architecture I.
Exercise session:
Edit the Makefile in the root and set
sudo apt-get install tklib tk-dev flex bison
and run
TKLIBS=-ltk -ltcl
TKINC=-I/usr/include/tk
make
.
Lecture:
Reading: Sections 4.3 and 4.4.
Slides: Summary self-reading, Processor architecture II, Processor architecture III.
Exercise session:
Lecture:
Reading: Section 4.5.
Slides: Processor architecture III, Processor architecture IV, Wrap-up.
Exercise session:
cmov
to encode:
Here
if (*a < *b) {
int t = *a;
*a = *b;
*b = t;
}
a
and b
are pointers to int
.
Be careful that cmov
is quite restricted for its arguments as is the
real one on x86.Lecture:
Reading: Chapter 5 (check the syllabus for the sections), Sections 6.1, 6.2, 6.3, 6.4, and 6.5.
Slides: Chapter 5 summary, memory hierarchy, and cache memories.
Exercise session: Section 6.6. Experiment with the different matrix multiplications and generate the memory mountain for your laptop (see source code on the student site). You are also invited to try the ect tool.
Lecture:
Reading: Chapters 7. Sections 9.1, 9.2, 9.3, 9.4, and 9.5.
Slides: cache memories, Chapter 7 summary, VM concepts.
Exercise session:
Lecture:
Reading: Sections 9.5, 9.6, and 9.7.
Slides: VM concepts, VM systems.
Exercise session:
Lecture:
Reading: Chapter 8.
Slides: Processes.
Information on the re-exam can be found here. You are advised to study the master copy of the exam here.