Advanced and Parallel Programming

[270SM]
a.a. 2025/2026

3° Year of course - Second semester

Frequency Not mandatory

  • 9 CFU
  • 72 hours
  • ITALIANO
  • Trieste
  • Opzionale
  • Standard teaching
  • Oral Exam
  • SSD ING-INF/05
Curricula: Curr. Didattico
Syllabus

[Knowledge and understanding] The student will be able to recognize the main factors that influence the performance of computer modern architectures. The student will also be able to understand the principles of the object oriented programming paradigm.
[Applying knowledge and understanding] The student will be able to and write code and evaluate its efficiency on modern architectures. The student will also be able to structure complex programs following the object paradigm.
[Making judgments] The student will be able to choose between several approaches in terms of structuring the code, evaluating both the advantages and the disadvantages in the choice.
[Communication skills] The student will be able to explain and motivate his implementation choices in terms of readability, structure and performance.
[Learning skills] The student will be able to independently explore the topics covered and keep up to date with developments in terms of programming languages and the efficiency of the various implementation choices

Knowledge of C and Python languages, thread and lock concepts, common data structures (stacks, queues, binary trees, hash tables) and their implementations is required.
C language: functions, pointers, arrays, dynamic memory allocation, pthreads (including locks)
Python language: basic knowledge of a non-object-oriented use, therefore with only the use of functions
Architectures: instruction execution cycle, Von Neumann architecture and basic components of an electronic computer
Algorithms and data structures: basic data structures (stacks, queues, stacks, binary trees, hash tables), notion of algorithm complexity.

The course will deal with the topics concerning the programming techniques necessary for writing high-performance code and the features of languages that allow you to write well-structured and maintainable code.
In particular, the following topics will be covered:
How modern computer architecture affects performance, with references to the notions of cache, memory locality, branch prediction and their effects on code execution speed.
Efficient algorithms and data structures on modern architectures and how to evaluate their performance
Mechanisms for parallel programming, in particular OpenMP.
Using high performance libraries in Python, especially the numpy library.
Recall of the notions of object oriented programming paradigm in Python. You will also see language-specific features such as decorators.
Outline of other existing programming paradigms, e.g., the functional paradigm.

Given the wide range of topics covered by the course, indications will be provided to follow individual chapters or scientific articles, paying attention that these are freely available for students to use.

Memory hierarchies and how modern processor caches work, as examples of existing processors
Concept of memory locality and its influence on performances
Pipelines and branch predictions. Performance effect of branch misprediction
Measurement of program performances
Data structures and algorithms that make use of the concepts of memory locality, with examples and comparisons
Parallelism and performances: OpenMP
Performance measurement of multithreaded parallel programs
Design of data structures and locking mechanisms
Using external code in Python: motivations and examples of libraries
The numpy library in Python
Object oriented programming in Python (review)
Decorators in Python
Introduction to functional programming concepts and their application in Python

The course will consist of a part of frontal lessons consisting of about 50% of the total number of hours. A component of about 25% will be used for implementation and commenting of examples. The remaining part (25%) will consist of guided exercises in the classroom in which students will put into practice what they have learned in the frontal lessons.

The teaching material and other information will be made available through Teams

The exam will consist of three parts: a project (50% of the final grade), a written test, and an oral examination (together 50% of the final grade).
1. The project consists of two parts, requiring the use of both C and Python to implement them.
2. The requirements of the project are the same for all students.
3. The project must be performed individually. Copying a project o a significant part of it from other students or from other sources has as a consequence a failing grade for the student.
4. The requirements of the project include how the project needs to be submitted and a strict deadline for the submission.
5. The grade of the project is valid for one year.
6. The written test consists of questions about all topics of the course.
7. To access the oral examination it is necessary to have a positive evaluation on both the written test and the project.
8. The oral examination will contain both questions about the project and about all the topics of the course.
The maximum grade is 30. Honors will be given for students demonstrating exceptional quality in both the presented project and in the oral examination.
The following are assessed for the final grade:
- Quality, structure, clarity, efficiency, and comments of the code in the project.
- Knowledge and understanding of the different topics studied during the course



icona 9