We may earn an affiliate commission when you visit our partners.
Course image
Vivek Sarkar

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).

Read more

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).

Enroll now

What's inside

Syllabus

Welcome to the Course!
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.
Read more
Threads and Locks
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.
Critical Sections and Isolation
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.
Talking to Two Sigma: Using it in the Field
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.
Actors
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.
Concurrent Data Structures
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.
Continue Your Journey with the Specialization "Parallel, Concurrent, and Distributed Programming in Java"
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.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Strengthens an existing foundation for intermediate learners in concurrent programming in Java
Based on discussions, this course could build a strong foundation for beginners in concurrent programming in Java
Taught by Vivek Sarkar, who is recognized for their work in concurrent programming
Examines progress guarantees, deadlock, livelock, starvation, and linearizability, which are highly relevant to concurrent programming
Teaches skills, knowledge, and tools that are highly relevant to industry
Develops professional skills or deep expertise in concurrent programming in Java

Save this course

Save Concurrent Programming in Java to your list so you can find it easily later:
Save

Reviews summary

Java concurrency concepts

Learners say this introductory course provides practical knowledge for concurrent programming in Java with good explanations, engaging assignments, and a helpful instructor. Despite some challenges with grading, difficulty inconsistencies, and inconsistent auto-grading, students found this course to be well-structured and worthwhile for beginners to the subject.
In-depth explanations of concepts
"Explanations are clear and well-presented."
"Concepts are explained well."
"Clear explanations of the concepts of locks"
Practical assignments and quizzes
"I found this course incredibly easy to understand yet the concepts themselves are complex and non trivial."
"Programming assignments quite helpful"
"Quizzes and the mini_projects were of great help"
Knowledgeable and supportive professor
"Professor Sarkar is brilliant!"
"Dr. Sarkar is a great teacher."
"Thanks and love to Prof. Sarkar"
Unclear grading system and auto-grader issues
"The grading system is terrible and not so clear about notation."
"The auto grader is very inconsistent"
"Grading could be a bit ore lenient with speed up."
Assignments vary widely in difficulty
"Difficulty of the mini-projects is not evenly distributed."
"Some are extremely easy while others seems to be too hard."
"I wish mini projects were more challenging"

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Concurrent Programming in Java with these activities:
Review multithreading concepts
Ensures a strong foundation in multithreading principles for better understanding of concurrent programming.
Browse courses on Multithreading
Show steps
  • Revisit textbooks or online resources on multithreading.
  • Practice writing simple multithreaded programs.
  • Review common multithreading pitfalls and debugging techniques.
Read the textbook
Begins building a strong foundation and understanding of the core concepts of Java concurrency.
Show steps
  • Read the book cover to cover.
  • Take notes and highlight important points.
  • Complete the practice exercises.
Follow online tutorials
Provides an interactive and hands-on approach for reinforcing theoretical concepts.
Browse courses on Java 8
Show steps
  • Identify reliable and reputable online tutorials.
  • Follow the tutorials step-by-step.
  • Experiment with the examples and practice the concepts.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Solve coding exercises
Enhances problem-solving skills and solidifies the understanding of concurrent programming principles.
Browse courses on Java 8
Show steps
  • Find online coding platforms or textbooks with practice exercises.
  • Attempt to solve the exercises independently.
  • Review your solutions and identify areas for improvement.
Join study groups
Fosters collaboration, knowledge sharing, and diverse perspectives.
Browse courses on Java 8
Show steps
  • Form study groups with classmates or peers.
  • Set regular meeting times and agendas.
  • Discuss course topics, share notes, and work on assignments together.
Develop a concurrent programming project
Provides practical experience in applying concurrent programming concepts to real-world scenarios.
Browse courses on Java 8
Show steps
  • Identify a problem or application that requires concurrent programming.
  • Design and implement a concurrent solution using Java 8 constructs.
  • Test and debug the solution thoroughly.
Contribute to open-source concurrency projects
Provides exposure to industry-grade code and best practices.
Browse courses on Java 8
Show steps
  • Identify open-source projects that align with concurrent programming.
  • Review the project's documentation and codebase.
  • Identify and submit potential contributions, such as bug fixes or feature enhancements.

Career center

Learners who complete Concurrent Programming in Java will develop knowledge and skills that may be useful to these careers:
Computer Scientist
Computer Scientists research and develop new computing technologies and algorithms. This course can be a valuable resource for Computer Scientists interested in concurrent programming, as it provides a solid foundation in the theoretical and practical aspects of concurrency. By mastering these concepts, Computer Scientists can contribute to the advancement of concurrent programming theory and develop innovative solutions to real-world problems.
Concurrency Architect
For individuals interested in specializing in Concurrency Architecture, this course serves as a solid foundation. Concurrency Architects are responsible for designing and implementing software systems that can handle multiple tasks or processes concurrently, ensuring high performance and scalability. This course delves into the theoretical foundations of concurrency, including progress guarantees, deadlock, and livelock, providing a deep understanding of the challenges and solutions in concurrent programming. It also covers advanced concepts such as atomic variables, isolation, and actor models, equipping learners with the skills to design and build complex concurrent systems.
Distributed Systems Architect
This course serves as a stepping stone for individuals pursuing a career in Distributed Systems Architecture. Distributed Systems Architects design and implement software systems that are distributed across multiple computers or networks. The course provides a deep understanding of concurrency and synchronization concepts, which are critical for building reliable and efficient distributed systems. By mastering these concepts, Distributed Systems Architects can effectively manage the challenges of distributed computing, such as data consistency, fault tolerance, and network communication.
Software Architect
Software Architects design and oversee the development of complex software systems. This course can be beneficial for Software Architects who work on concurrent systems, as it provides a comprehensive understanding of concurrency and synchronization principles. By mastering these concepts, Software Architects can design scalable, fault-tolerant, and high-performance software systems that can handle multiple tasks and processes efficiently.
Parallel Programmer
This course provides a strong foundation for aspiring Parallel Programmers, who specialize in developing software that can leverage multiple processors or cores to execute tasks concurrently. The course covers fundamental concepts of concurrency, including threads, locks, and synchronization, as well as more advanced topics like optimistic concurrency and concurrent data structures. By understanding these concepts, Parallel Programmers can design and implement efficient and scalable software that can take advantage of modern multi-core architectures.
Performance Engineer
For professionals seeking to specialize in Performance Engineering, this course offers valuable insights into concurrent programming and its impact on software performance. Performance Engineers are responsible for optimizing and fine-tuning software systems to ensure efficient execution and scalability. By understanding the principles of concurrency, including thread management, synchronization, and deadlock prevention, Performance Engineers can identify and resolve performance bottlenecks, leading to faster and more responsive software applications.
Java Developer
This course would be a valuable resource for Java Developers seeking to enhance their skills in concurrent programming. Concurrent programming is a crucial aspect of modern Java development, as it enables the creation of applications that can handle multiple tasks or processes concurrently, maximizing performance and efficiency. The course provides a comprehensive understanding of Java's concurrency constructs, including threads, locks, and synchronization mechanisms, helping developers write robust and scalable concurrent Java applications.
Data Engineer
Data Engineers design and implement data pipelines and infrastructure for managing and processing large datasets. This course can be beneficial for aspiring Data Engineers, as it provides a strong foundation in concurrent programming, which is essential for handling the并发性 and scalability challenges in big data processing. By mastering these concepts, Data Engineers can develop efficient and reliable data pipelines that can process and transform data in real-time, enabling faster data-driven decision-making.
Cloud Architect
Cloud Architects are responsible for designing and managing cloud-based infrastructure and applications. This course would be beneficial for those aspiring to this role, as it provides a solid understanding of concurrent programming principles and their application in cloud computing environments. By mastering these concepts, Cloud Architects can design scalable, fault-tolerant, and high-performance cloud applications that can efficiently handle multiple tasks and processes.
Technical Lead
Technical Leads play a vital role in guiding software development teams, and this course can be a valuable asset for those aspiring to this position. The course provides a comprehensive understanding of concurrent programming principles and best practices, which are essential for leading teams that develop complex, scalable software systems. By mastering these concepts, Technical Leads can make informed decisions, guide their teams in implementing efficient concurrent solutions, and ensure the overall quality and performance of the software.
Quantitative Analyst
Quantitative Analysts use mathematical and statistical models to analyze financial data and make investment decisions. This course can be a valuable resource for those seeking a career in this field, as it provides a solid understanding of concurrency and synchronization, which are essential for developing efficient and scalable financial modeling and analysis software. By mastering these concepts, Quantitative Analysts can build robust and accurate models that can handle large datasets and complex calculations in a timely manner.
Information Security Analyst
Information Security Analysts play a crucial role in protecting organizations from cyber threats. This course can be a valuable resource for those interested in this field, as it covers fundamental concepts of concurrency and synchronization, which are essential for understanding the behavior and vulnerabilities of concurrent software systems. By mastering these concepts, Information Security Analysts can better assess and mitigate security risks associated with concurrent programming, ensuring the integrity and confidentiality of sensitive data.
Business Analyst
Business Analysts are responsible for bridging the gap between business and technology, understanding business requirements and translating them into technical specifications. This course can be beneficial for Business Analysts who work with software development teams, as it provides a foundation in concurrent programming principles and their applications in real-world scenarios. By understanding these concepts, Business Analysts can better communicate with developers, participate in technical discussions, and ensure that software systems align with business objectives.
Software Engineer
This course may be of interest to aspiring Software Engineers looking to build a foundation in concurrent programming using the Java programming language. Concurrent programming is critical in the design and implementation of many modern software applications, particularly those that must handle multiple tasks or processes simultaneously. The course covers fundamental concepts such as threads, locks, synchronization, and concurrency control, which are essential for developing reliable and efficient concurrent software.
Product Manager
Product Managers are responsible for defining, planning, and managing the development of software products. This course can be a valuable resource for Product Managers who work with software development teams, as it provides a foundation in concurrent programming principles and their impact on product design and development. By understanding these concepts, Product Managers can make informed decisions about product features, prioritize development efforts, and ensure that products meet the needs of users.

Reading list

We've selected eight books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Concurrent Programming in Java.
A comprehensive guide to Java concurrency, covering topics such as threads, locks, and synchronization. is an excellent reference for Java developers who want to learn more about concurrency.
A classic book on Java programming, this book covers a wide range of topics, including concurrency. It valuable resource for Java developers of all levels.
A book that covers Java performance tuning, including tips and techniques for improving the performance of concurrent applications.
A book that provides a theoretical foundation for concurrency. It covers topics such as lock-free programming, transactional memory, and distributed systems.
A book that provides a comprehensive overview of concurrent programming in Java. It covers topics such as thread safety, lock-free programming, and transactional memory.
A book that covers domain-driven design, which software design approach that focuses on the business domain of an application. It can be helpful for developers who want to design concurrent applications that are easy to maintain and evolve.
A book that covers the design of data-intensive applications. It can be helpful for developers who want to design concurrent applications that can handle large amounts of data.
A book that covers concurrency control and recovery in database systems. It can be helpful for developers who want to design concurrent applications that can handle large amounts of data.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Concurrent Programming in Java.
Concurrent Programming in Java with Virtual Threads
Most relevant
Implementing Concurrency in Rust
Most relevant
Java Multithreading, Concurrency & Performance...
Most relevant
Complete Guide to Python Multithreading and...
Most relevant
Functional Programming with Java and Threads
Most relevant
Modern C++ Concurrency in Depth ( C++17/20)
Most relevant
Advanced Java 8 Concurrent Patterns
Most relevant
Learn Parallel Computing in Python
Most relevant
Implementing Concurrency in Java (Java SE 11 Developer...
Most relevant
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser