Course Computer Systems for AI-programmers

"Computersystemen voor AI-programmeurs"

Week 5, February 2010

Description

A computer system consists of hardware and system software that cooperate to run applications. Applications are executable programs, generated from source files. To create programs, a good programmer has to understand the system.

After a short tour of the whole system, we peer directly beneath the layer of abstraction provided by a high-level language and get a view of the machine-level. By letting the compiler generate assembly code of very simple C-functions, we get insight of the instruction set a compiler is working with.

Assembly language is very different from C code. In assembly language, there is minimal distinction between data types. The program is expressed as a sequence of very simple operations. Still, part of the program state, such as registers and run-time stack, are directly visible to the programmer (and the user, after a programming error).

Only the mapping of C onto the Intel 32-bits instruction set is shown, but the same principles hold for other combinations of languages and machines.

In this class the following concepts are introduced:

  • compilation, assembly, machine language
  • processor, main memory, I/O devices, buses
  • operating system, processes, virtual memory space
  • micro-instructions, programming registers

Literature

The class is based on chapter 1 and 3 of the book Computer Systems: A programmer's perspective by R.E. Bryant and D.R. O'Hallaron.

Recommanded reading (29 pages, 1.5 hours):

Chapter 1    A Tour of Computer Systems
3.1  A Historical Perspective
3.2Program Encodings
3.3Data Formats


Schedule

On request of the Student's Counsel, these lectures were recorded with the Lecturtiny Studio. Download Lecturnity Player and listen to lecture, synchronized with the sheets. Note that this recordings are converted to the official version, and can now be played on Windows, Mac and Linux. The class is scheduled in three hours:

  1. Lecture (Recording): 'Computer system - Insight needed by AI-students'
    Prerequisite: 'Make gcc-2.95.3 your compiler' description.
  2. Lecture (Recording): 'Computer system - A guided tour'
    Exercise: 'Make a makefile for the source-file hello.c
    http://www.gnu.org/software/make/manual/ with implicit rules and following the general conventions.
  3. Lecture (Recording): 'Computer system - Instruction Set Architecture'
  4. Assignment: 'Determine the processor model and clock speed'
    Description, code
    Resources:

Last updated January 31, 2011.

o This web-page and the list of participants to this course is maintained by Arnoud Visser (arnoud@science.uva.nl)
Faculty of Science
University of Amsterdam

visitors in arnoud@science.uva.nl