The goal of this course is to introduce students to the fundamental theoretic and practical principals of concurrency, with emphasis on the correctness, design and implementation of models of concurrent computation using shared memory architectures.
- The 1st part of the course is more fundamental and is given by Nelma Moreira. More information here.
- This 2nd part of the course will focus on the programming aspect, using the Scala language to study several concurrency patterns and libraries in Java Virtual Machines.
- Summaries and assignments are placed in the associated Moodle website.
- The official plan of this course is hosted in FCUP here.
Lectures
- 4 Apr 24: [T] Introduction to the second module (1-intro.pdf). Overview of Scala (2-scala.pdf).
- 11 Apr 24: [P] Exercises on Scala (ex-scala.pdf). [T] Introduction to the Java Memory Model (3-javamemory.pdf, slides 1-27).
- 18 Apr 24: [P] Exercises on the Java Memory Model (ex-javamemory.pdf). [T] Waiting and notifying; Graceful shutdown (3-javamemory.pdf, slides 28-end). Executors and ExecutionContext; atomic variables (4-concblocks.pdf, slides 1-9).
- 2 May 24: [P] Continuation of exercises on the Java Memory Model with waiting states (ex-javamemory.pdf); Execution contexts (ex-concblocks.pdf). [T] Using compare-and-swap; the ABA problem; lazy values and hidden locks (4-concblocks.pdf, slides 8-33).
- 9 May 24:[P] Continuation of exercises on concurrency building blocks, using atomic variables and lazy concepts (ex-concblocks.pdf). [T] Processes outside the JVM (4-concblocks.pdf, slides 34-36); Actor in Akka: creation, execution, and behaviour, hierarchy and lifecycle (5-actors.pdf, slides 1-19).
- 23 May 24:[P] Recalling atomic variables (ex-concblocks.pdf); deploying actors in Akka (ex-actors.pdf]); support for the practical assignment. [T] Actors in Akka: relation with CCS, handling exceptions, termination, remote actors (5-actors.pdf, slides 20-32), support for the practical assignment.
Literature and Material
Slides
- Introduction to the second module
- Scala primer
- Java Memory Model
- Basic building blocks of concurrency
- Actor model
Exercises
- Exercises on Scala
- Exercises on Java Memory
- Exercises on Java Memory
- Exercises on building blocks of concurrency
- Exercises on the actor model
Examples of exams and tests
- 2023-2024 - Test for this second module (at época normal)
- 2018-2019 - Test for the first module (authentication needed - during the semester)
Assignment
- Practical assignment on Concurrent Programming 2023/24
- Submit your assignment via moodle (only one of the group members needs to submit it, and the latest submission is used)
- Book your presentation using this shared spreadsheet (you must login with your google account from the faculty, e.g., “up202000000@g.uporto.pt”)
Main book
- Learning Concurrent Programming in Scala, Aleksandar Prokopec; ISBN: 1786466899
Previous years
Teaching methods and learning activities
Lectures; intermediate test (mandatory) and final test or final exam.
The lectures mix the presentation of new material (introducing concepts, main algorithms and some results) with interactive discussion of their application when solving real problems.
The homework focus is on practical application of algorithmic concepts, consolidating the learned material.
The final exam and intermediate tests (closed book), globally evaluates the knowledge acquired by the students.
Evaluation Type
Distributed evaluation with final exam
Assessment Components
designation | Weight (%) |
---|---|
Exam | 70,00 |
Assignment | 30,00 |
Eligibility for exams
Students must attend at least 75% of the practical classes to be admitted to the exams.
Calculation formula of final grade
Distributed evaluation will include both modelling (EM) and program implementation (EI). The final grade (FG) is obtained by weighting the distributed assessment scores and final exam (FE) as follows:
- FG = 3 * EM + 3 * EI + 14 * FE.
Lecturers
-
-
- Nelma Moreira
-
- DCC 1.20
- nelma.moreira(at)fc.up.pt
- meet: thu afternoon (email before)
-
-
-
- José Proença
-
- DCC 1.69
- jose.proenca(at)fc.up.pt
- meet: thu afternoon (email before)
-
Edit the content of this page here.