Documente Academic
Documente Profesional
Documente Cultură
A. Sterca
Serial Programming
traditional programming paradigm; an algorithm is a serial
sequence of instructions, each instruction being executed one
after another by a CPU;
execution is serial, at most with branches (if) and repetitions
(while, for); single thread of execution and control
appropriate for a Turing machine
has stable programming methodologies: structured
programming, data abstraction, object-oriented programming,
design by contract
strong methodologies for verifying correctness of sequential
programs: Petri nets, deterministic automata, labelled
transition systems
not that efficient with respect to concurrent and parallel
programming
A. Sterca Intro to Concurrency
Serial, Parallel and Concurrent Programming
The need for concurrent programming
Theoretical gain of concurrency
Taxonomy of parallel processor architectures
Communication Paradigms for Concurrent Processes
Parallel Programming
Concurrent Programming
Computer systems are used for modeling objects in the real world
=⇒ Object-oriented programming
Typical examples:
Limited number of seats on the same plane
Several booking agents active at the same time
Multiprocessing, Parallelism
Many of todays computations can take advantage of multiple
processing units (through multi-core processors):
Terminology:
Multiprocessing : the use of more than one processing unit in
a system
Parallel execution : processes running at the same time
Multitasking, Concurrency
Even on systems with a single processing unit we may give the
illusion of that several programs run at once.
The OS switches between executing different tasks.
Terminology:
Interleaving : several tasks active, only one running at a time
Multitasking : the OS runs interleaved executions
Concurrency : multiprocessing, multitasking, or any
combination
A. Sterca Intro to Concurrency
Serial, Parallel and Concurrent Programming
The need for concurrent programming
Theoretical gain of concurrency
Taxonomy of parallel processor architectures
Communication Paradigms for Concurrent Processes
Amdahl’s Law
We go from 1 processor to n. What gain may we expect?
MIMD variants
Client-Server Paradigm
Specific case of the Message Passing Paradigm.
Examples: Database-centered systems, World-Wide Web