General information

Course description

The course objectives can be found on the University course catalog:

The notes, references and material covered by the theoretical lessons can be found on Prof. Wolper's pages.


The course takes place every Tuesday during the first quarter at the Math Institute (B37), room O2. The theoretical lessons are programmed from 14:00 to 16:00 and the practical sessions from 16:00 to 18:00.

The students are advised to come with their theoretical lessons material at each practice sessions.


  • Written exam: Open book for the material covered in the four first lectures (up to and including virtual memory), and closed book for the rest of the material covered.
  • Two programming assignments: These have to be completed during the course period (more details in due time).


Date Information and files.
Tutorial 18 Sept. 2018

Tutorial 1: μ-code (ULG01)

Additional material: ULG01 μ-code reference (coloured), support slides

Tutorial 25 Sept. 2018

Tutorial 2: μ-code (ULG01) and β-assembly

Additional material:

Tutorial 2 Oct. 2018

Tutorial 3: μ-code (ULG02) - User and supervisor modes, support slides

Tutorial 9 Oct. 2018

Tutorial 4: μ-code (ULG03) - Virtual memory, support slides

Tutorial 16 Oct. 2018

Tutorial 5: parallel programming, solution, source code

Tutorial 23 Oct. 2018

Tutorial 6: parallel programming, solution

No course 30 Oct. 2018 No course.
Deadline 5 Nov. 2018, 23:59

Project 1: β-allocator: dynamic memory allocation for β-assembler programs

Project statement

Provided files

Project presentation slides

Update 05 Nov. 2018, 18:16 - The issue has been fixed, you can submit until tomorrow at 23:59.

Update 05 Nov. 2018, 15:39 - Working on a fix for a bug in the tests (see FAQ below for more information).

Update 31 Oct. 2018, 10:41 - Update boolean condition for stack overwrite check in malloc.c.

Update 24 Oct. 2018, 14:48 - Figure 2 from statement has also been updated in slides.

Update 23 Oct. 2018, 14:31 - Figure 2 in statement has been updated.

Update 14 Oct. 2018, 01:33 - File main.asm has been updated to call beta_alloc_init instead of malloc_init.

Tutorial 6 Nov. 2018

Tutorial 7: parallel programming, solution

Tutorial 13 Nov. 2018

Tutorial 8: parallel programming, solution

Tutorial 20 Nov. 2018

Tutorial 9: parallel programming, solution, Philosophers.c

Tutorial 10: cache memory, support slides

No tutorial 27 Nov. 2018

Pr. Wolper will give two lessons.

Tutorial 4 Dec. 2018

Tutorial 11: performance-oriented β-machine, support slides

Tutorial 12: pipelined β-machine, support slides

Tutorial 11 Dec. 2018

Tutorial 13: solving exam questions

Deadline 14 Dec. 2018, 23:59

Project 2: parallel radix sort

Project statement

System V IPC: documentation

Starting file: radix_sort.c

Complement of information

Project 2 - complement of information

Some students find weird that a process that is assigned a value di works on the (di +1)th line. This is just a linguistic trick. Indeed, the process that is assigned the value 0 works on the 1st line, not the « 0th » line

You are allowed to develop on whatever system you prefer, but be sure that your program is tested and fully functional on the students machines (ms8**). In that perspective, I strongly recommand that you develop on these machines as well. FYI, they have ssh and sftp enabled for remote access.

FAQ - Project 1

Is it normal that my program works on the simulator but fails on the submission platform ?

It might not be caused by a bug in your code: I found a bug in the tests. I am currently working on fixing the issue and I will update this page as soon as it is done. In any case, the submission deadline will be postponed to tomorrow evening so that you can benefit the corrected tests.
Update The issue has been fixed, you can now resubmit your file(s) to check if you pass the tests.

βSim simulator

βSim is a simulator for the β-assembly language written in Java. It features:

  • An assembler to generate machine code.
  • A debugger featuring instruction per instruction execution, registers, stack and memory visualization.
  • A minimal code editor with error highlighting (when the code is assembled).

The simulator comes as a .jar package you can run in several ways:

  • On modern systems with UI (Windows,...), you can simply double-click on the file.
  • If you prefer using a console, you can run: java -jar bsim-vram.jar [file1 file2 ...].

Because the built-in code editor is minimal, I don't recommend using it for developing programs. For instance, there is no "Undo" nor "Redo" option, so you might lose some work by performing some non-deliberate deletions. It is better to first write your code in another text editor such as NotePad++ or Sublime Text (β-assembly syntax highlighting and snippets, check this forum for installation location), and then load it into the simulator for testing.

Loading and launching code

To execute some code you have written in the simulator, you first have to load this piece of code in the editor. This can be done by clicking on in the upper toolbar and walking through your filesystem for getting the .asm file.

When your code is ready to be executed, the execution can be triggered by clicking on in the upper toolbar. If your code does not contain any syntax error, you will be redirected to the execution window. Otherwise, the syntax error will be described in the bottom of the editor window.


You can indicate to the β-machine you want to pause the execution of your code at a specific instruction by writing the keyword .breakpoint:

    |; Do something
    LD(R1, 0, R5)
    .breakpoint         |; The machine will pause its execution at this step
    ADDC(R5, R2, R6)
    |; ...