When you enroll in this course, you'll also be enrolled in this Specialization.
Learn new concepts from industry experts
Gain a foundational understanding of a subject or tool
Develop job-relevant skills with hands-on projects
Earn a shareable career certificate
There are 7 modules in this course
This course teaches learners (industry professionals and students) the fundamental concepts of concurrent programming in the context of Java 8. Concurrent programming enables developers to efficiently and correctly mediate the use of shared resources in parallel programs. By the end of this course, you will learn how to use basic concurrency constructs in Java such as threads, locks, critical sections, atomic variables, isolation, actors, optimistic concurrency and concurrent collections, as well as their theoretical foundations (e.g., progress guarantees, deadlock, livelock, starvation, linearizability).
Why take this course?
• It is important for you to be aware of the theoretical foundations of concurrency to avoid common but subtle programming errors.
• Java 8 has modernized many of the concurrency constructs since the early days of threads and locks.
• During the course, you will have online access to the instructor and mentors to get individualized answers to your questions posted on the forums.
• Each of the four modules in the course includes an assigned mini-project that will provide you with the necessary hands-on experience to use the concepts learned in the course on your own, after the course ends.
The desired learning outcomes of this course are as follows:
• Concurrency theory: progress guarantees, deadlock, livelock, starvation, linearizability
• Use of threads and structured/unstructured locks in Java
• Atomic variables and isolation
• Optimistic concurrency and concurrent collections in Java (e.g., concurrent queues, concurrent hashmaps)
• Actor model in Java
Mastery of these concepts will enable you to immediately apply them in the context of concurrent Java programs, and will also help you master other concurrent programming system that you may encounter in the future (e.g., POSIX threads, .NET threads).
Welcome to Concurrent Programming in Java! This course is designed as a three-part series and covers a theme or body of knowledge through various video lectures, demonstrations, and coding projects.
In this module, we will learn about threads and locks, which have served as primitive building blocks for concurrent programming for over five decades. All computing platforms today include some form of support for threads and locks, and make them available for use by developers in a wide range of programming languages. We will learn how threads can be created, joined, and synchronized using structured (e.g., synchronized statements/methods) and unstructured (e.g., java.util.concurrent libraries) locks in Java. We will also learn about new classes of bugs that can arise when concurrent programs need to access shared resources. These bugs are referred to as violations of liveness/progress guarantees, and include deadlock, livelock, and starvation. We will conclude this module by studying different solutions to the classical "Dining Philosophers" problem, and use these solutions to illustrate instances of deadlock, livelock and starvation.
Demonstration: Locking and Synchronization•5 minutes
6 readings•Total 35 minutes
1.1 Lecture Summary•5 minutes
1.2 Lecture Summary•5 minutes
1.3 Lecture Summary•5 minutes
1.4 Lecture Summary•5 minutes
1.5 Lecture Summary•5 minutes
Mini Project 1: Locking and Synchronization•10 minutes
1 assignment•Total 30 minutes
Module 1 Quiz•30 minutes
1 programming assignment•Total 180 minutes
Mini Project 1 Submission•180 minutes
Critical Sections and Isolation
Module 3•4 hours to complete
Module details
In this module, we will learn different approaches to coordinating accesses to shared resources without encountering the deadlock or livelock bugs studied earlier. Critical/isolated sections are higher-level concurrent programming constructs (relative to locks) that simplify the implementation of mutual exclusion by guaranteeing the absence of deadlocks and livelocks. Object-based isolation relaxes the constraints imposed by critical sections by allowing mutual exclusion to be specified on a per-object basis, as illustrated in the Spanning Tree example. Java's atomic variables represent an important, but restricted, case of object-based isolation that is implemented efficiently on all hardware platforms. Finally, we will learn how object-based isolation can be further relaxed with read/write access modes.
Demonstration: Global and Object-Based Isolation•3 minutes
6 readings•Total 60 minutes
2.1 Lecture Summary•10 minutes
2.2 Lecture Summary•10 minutes
2.3 Lecture Summary•10 minutes
2.4 Lecture Summary•10 minutes
2.5 Lecture Summary•10 minutes
Mini Project 2: Global and Object-Based Isolation•10 minutes
1 assignment•Total 33 minutes
Module 2 Quiz•33 minutes
1 programming assignment•Total 120 minutes
Mini Project 2 Submission•120 minutes
Talking to Two Sigma: Using it in the Field
Module 4•20 minutes to complete
Module details
Join Professor Vivek Sarkar as he talks with Software Engineer, Dr. Shams Imam, at their downtown Houston, Texas office about threads, locks, deadlocks, high-level and low-level constructs, and the importance of concurrent programming.
What's included
2 videos1 reading
Show info about module content
2 videos•Total 10 minutes
Industry Professional on Parallel, Concurrent, and Distributed Programming in Java - Jim Ward, Managing Director•7 minutes
Industry Professional on Concurrency - Dr. Shams Imam, Software Engineer•4 minutes
1 reading•Total 10 minutes
About these Talks•10 minutes
Actors
Module 5•4 hours to complete
Module details
In this module, we will learn another high-level approach to concurrent programming called the "Actor" model. A major difference between the Actor model and the Isolated Sections model is that there are no data races possible in the Actor model because it does not allow for any form of shared variables. However, as in all concurrent programming models, higher-level forms of nondeterminism are still possible in the Actor model due to an inherent asynchrony in the order in which messages may be delivered. We will study multiple examples of concurrency using the Actor model, including the classical Sieve of Eratosthenes algorithm to generate prime numbers, as well as producer-consumer patterns with both unbounded and bounded buffers.
Demonstration: Sieve of Eratosthenes Using Actor Parallelism•4 minutes
6 readings•Total 60 minutes
3.1 Lecture Summary•10 minutes
3.2 Lecture Summary•10 minutes
3.3 Lecture Summary•10 minutes
3.4 Lecture Summary•10 minutes
3.5 Lecture Summary•10 minutes
Mini Project 3: Sieve of Eratosthenes Using Actor Parallelism•10 minutes
1 assignment•Total 30 minutes
Module 3 Quiz•30 minutes
1 programming assignment•Total 120 minutes
Mini Project 3 Submission•120 minutes
Concurrent Data Structures
Module 6•4 hours to complete
Module details
In this module, we will study Concurrent Data Structures, which form an essential software layer in all multithreaded programming systems. First, we will learn about Optimistic Concurrency, an important multithreaded pattern in which two threads can "optimistically" make progress on their assigned work without worrying about mutual conflicts, and only checking for conflicts before "committing" the results of their work. We will then study the widely-used Concurrent Queue data structure. Even though the APIs for using concurrent queues are very simple, their implementations using the Optimistic Concurrency model can be complex and error-prone. To that end, we will also learn the formal notion of Linearizability to better understand correctness requirements for concurrent data structures. We will then study Concurrent Hash Maps, another widely-used concurrent data structure. Finally, we discuss a concurrent algorithm for finding a Minimum Spanning Tree of an undirected graph, an algorithm that relies on the use of Concurrent Data Structures under the covers.
4.5 Concurrent Minimum Spanning Tree Algorithm•7 minutes
Demonstration: Parallelization of Boruvka's Minimum Spanning Tree Algorithm•7 minutes
7 readings•Total 70 minutes
4.1 Lecture Summary•10 minutes
4.2 Lecture Summary•10 minutes
4.3 Lecture Summary•10 minutes
4.4 Lecture Summary•10 minutes
4.5 Lecture Summary•10 minutes
Mini Project 4: Parallelization of Boruvka's Minimum Spanning Tree Algorithm•10 minutes
Exit Survey•10 minutes
1 assignment•Total 30 minutes
Module 4 Quiz•30 minutes
1 programming assignment•Total 120 minutes
Mini Project 4 Submission•120 minutes
Continue Your Journey with the Specialization "Parallel, Concurrent, and Distributed Programming in Java"
Module 7•15 minutes to complete
Module details
The next two videos will showcase the importance of learning about Parallel Programming and Distributed Programming in Java. Professor Vivek Sarkar will speak with industry professionals at Two Sigma about how the topics of our other two courses are utilized in the field.
What's included
2 videos1 reading
Show info about module content
2 videos•Total 13 minutes
Industry Professionals on Parallelism - Jake Kornblau and Margaret Kelley, Software Engineers, Two Sigma•7 minutes
Industry Professional on Distribution - Dr. Eric Allen, Senior Vice President, Two Sigma•7 minutes
1 reading•Total 2 minutes
Our Other Course Offerings•2 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructor
Instructor ratings
Instructor ratings
We asked all learners to give feedback on our instructors based on the quality of their teaching style.
Rice University is consistently ranked among the top 20 universities in the U.S. and the top 100 in the world. Rice has highly respected schools of Architecture, Business, Continuing Studies, Engineering, Humanities, Music, Natural Sciences and Social Sciences and is home to the Baker Institute for Public Policy.
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Learner reviews
4.5
664 reviews
5 stars
66.86%
4 stars
24.69%
3 stars
5.87%
2 stars
1.05%
1 star
1.50%
Showing 3 of 664
G
GA
5·
Reviewed on Sep 19, 2020
Very good explanation of the concepts of locks, and how important data-structures example HashMap are optimized to improve performance
F
FH
4·
Reviewed on Nov 26, 2020
It could have been better. Course content is very basic and just scratches the surface of concurrent programming. However, fully recommend it for beginners.
S
SS
4·
Reviewed on Apr 30, 2020
It was a really interesting course where the things were presented in a very simplified manner in which I could learn the topics in a short span of time.
When will I have access to the lectures and assignments?
To access the course materials, assignments and to earn a Certificate, you will need to purchase the Certificate experience when you enroll in a course. You can try a Free Trial instead, or apply for Financial Aid. The course may offer 'Full Course, No Certificate' instead. This option lets you see all course materials, submit required assessments, and get a final grade. This also means that you will not be able to purchase a Certificate experience.
What will I get if I subscribe to this Specialization?
When you enroll in the course, you get access to all of the courses in the Specialization, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
Is financial aid available?
Yes. In select learning programs, you can apply for financial aid or a scholarship if you can’t afford the enrollment fee. If fin aid or scholarship is available for your learning program selection, you’ll find a link to apply on the description page.