|
所在平台: Coursera |
课程主页: https://www.coursera.org/learn/concurrent-programming-in-java
课程评论:没有评论
课程名称:Java中的并发编程 课程概述: 本课程面向行业专业人士和学生,教授Java 8环境下并发编程的基本概念。并发编程使开发人员能够高效且正确地管理并行程序中对共享资源的使用。完成本课程后,您将掌握Java中的基本并发构造,如线程、锁、临界区、原子变量、隔离、演员模型、乐观并发和并发集合,以及它们的理论基础(如进展保证、死锁、活锁、饥饿、线性化)。 课程的必要性: - 认识并发的理论基础,以避免常见且微妙的编程错误。 - Java 8对早期线程和锁的并发构造进行了现代化改进。 - 学员在课程期间可在线与讲师和导师互动,获得个性化解答。 - 每个模块都有指定的小项目,使您在课程结束后能够运用所学概念进行实践。 学习成果: - 理解并发理论:进展保证、死锁、活锁、饥饿、线性化 - 在Java中使用线程和结构化/非结构化锁 - 原子变量和隔离 - Java中的乐观并发和并发集合(如并发队列、并发哈希表) - 在Java中的演员模型 掌握这些概念后,您将能立即在并发Java程序中应用它们,并为未来接触其他并发编程系统(如POSIX线程、.NET线程)打下基础。 课程大纲: 1. 欢迎来到课程! - 介绍并发编程的内容和学习方式。 2. 线程和锁 - 学习线程的创建、连接和使用结构化与非结构化锁的同步,并分析经典的“哲学家就餐”问题。 3. 临界区和隔离 - 了解如何协调对共享资源的访问,避免死锁和活锁,学习关键区域和对象级隔离。 4. 与Two Sigma交流 - 通过与位于休斯顿的工程师的对话,探讨并发编程的实际应用。 5. 演员模型 - 学习演员模型的高层次并发编程方法,理解如何消除数据竞争以及异步消息传递的影响。 6. 并发数据结构 - 研究乐观并发和常用的并发队列、并发哈希图,了解线性化的正确性要求及其在实际算法中的应用。 7. 继续学习:并行、并发和分布式编程 - 强调并行和分布式编程在Java中的重要性,以及相关课程的学习潜力和职业应用。 通过本课程的学习,您将系统化掌握Java中的并发编程,为将来的技术挑战做好准备。
Name:Welcome to the Course!
Description: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.
Name:Threads and Locks
Description: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.
Name:Critical Sections and Isolation
Description: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.
Name:Talking to Two Sigma: Using it in the Field
Description: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.
Name:Actors
Description: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.
Name:Concurrent Data Structures
Description: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.
Name:Continue Your Journey with the Specialization "Parallel, Concurrent, and Distributed Programming in Java"
Description: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.
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).