
Concurrency and Paralelism
Code
11158
Academic unit
Faculdade de Ciências e Tecnologia
Department
Departamento de Informática
Credits
6.0
Teacher in charge
João Manuel dos Santos Lourenço, Pedro Abílio Duarte de Medeiros
Weekly hours
4
Total hours
56
Teaching language
Português
Objectives
This course aims at providing the students with a solid background on concurrency. Namely, at the end of the course the students are expected to understand the problems related to concurrency and the execution of concurrent programs, to know the mechanisms available in the programming languages to specify concurrent programs, to know how to develop correct and efficient concurrent programs applying common programming techniques and patterns.
Knowledge:
- Understand the concepts of concurrency and parallelism, and how they are useful when designing software;
- To identify the models used for problem solving in multiprocessors and highly-parallel systems;
- To know the paradigms used in the development of algorithms for multiprocessors and highly-parallel systems;
- To know the languages, libraries and tools used in the development of concurrent and parallel programs;
- Be familiar with common concurrency problems, and how to mitigate or avoid them.
Application:
- Be able to identify and exploit opportunities for concurrency and parallelization within a software system;
- Be able to partition a problem into multiple tasks to be executed in parallel system;
- Be able to reason about the behavior of concurrent and parallel programs;
- Be able to build correct and efficient concurrent and parallel algorithms;
- Be able to use the Java/C-like programming languages and parallel libraries to develop parallel software systems;
- Be able to use programming tools in the development of concurrent and parallel applications, including the design, implementation, debugging and deployment stages;
- Be able to predict and measure the performance characteristics of a parallel system.
Subject matter
- Parallel programming
The spectrum of high-demanding computational problems; regular and irregular problems; strategies for problem decomposition and their mapping to programming patterns; the transactional and map-reduce models. - Parallel architectures
Flynn''''''''''''''''s taxonomy; performance theory (including Amdahl''''''''''''''''s and Gustafson''''''''''''''''s laws). - Concurrency control and synchronization
Competition and collaboration; atomicity; linearization; monitors; locks; semaphores; barriers; producer-consumer; multi-reader single-writer locks; futures; concurrency in practice in Java and C. - Safety and liveness
Safety vs. liveness; progress; deadlock; deadlock prevention, avoidance, detection, and recovery; livelock; livelock avoidance; priority inversion; priority inheritance. Lock-free algorithms. - The transactional model
Composite operations; transactions (serializability), optimistic concurrency control (OCC) and transactional memory. - Concurrency without shared data
Active objects; message passing; actors.
Bibliography
Main bibliographic references:
- McCool M., Arch M., Reinders J.; Structured Parallel Programming: Patterns for Efficient Computation; Morgan Kaufmann (2012); ISBN: 978-0-12-415993-8
- Raynal M.; Concurrent Programming: Algorithms, Principles, and Foundations; Springer-Verlag Berlin Heidelberg (2013); ISBN: 978-3-642-32026-2