Concurrent Programming Fundamentals - Ankur
Concurrent Programming Fundamentals - Ankur
Fundamentals
• Concurrency
• Concurrency means multiple computations are
happening at the same time. Concurrency is
everywhere in modern programming, whether
we like it or not:
– Multiple computers in a network
– Multiple applications running on one computer
– Multiple processors in a computer (today, often
multiple processor cores on a single chip)
• In fact, concurrency is essential in modern
programming:
– Web sites must handle multiple simultaneous users.
– Mobile apps need to do some of their processing on servers (“in the
cloud”).
Two Models for Concurrent Programming
Threads exist within a process — every process has at least one. Threads share
the process's resources, including memory and open files. This makes for
efficient, but potentially problematic, communication.