Skip to main content
CourseFlix

Concurrency, Multithreading and Parallel Computing in Java

8h 10m 34s
English
Paid

This course teaches you how to work with threads and shared data in Java. You learn why threads matter and how to use them in real programs. You also build small simulations to see how these ideas work. You do not need past multithreading experience.

Multithreading Basics

You start with core ideas of threads and how they run. You see why you may use threads and where they can cause problems. You also learn the life cycle of a thread.

  • The idea behind multithreading
  • Pros and cons of threads
  • Thread life cycle

Working With Threads

You learn how to start and stop threads. You also work with tools that help you control how they run.

  • Runnable and Thread
  • join keyword
  • Daemon threads

Inter-Thread Communication

You explore how threads share memory and how to protect shared data. You also learn ways to make threads wait and send signals.

  • How threads use memory
  • synchronized blocks
  • Locks
  • wait and notify
  • Producer–consumer pattern
  • Concurrent collections
  • Latches, cyclic barriers, blocking queues
  • Delay queues, priority queues, concurrent maps

Key Thread Concepts

You learn advanced ideas that help you build safe and clear concurrent programs.

  • volatile keyword
  • Deadlocks and livelocks
  • Semaphores and mutexes
  • Dining philosophers problem
  • Library simulation
  • Miner game

Executors

You use the Executor framework to run tasks without managing threads by hand.

  • Executors
  • ExecutorService

Concurrent Collections

You learn structures built for safe access by many threads.

  • Latches
  • Cyclic barriers
  • Delay and priority queues
  • Concurrent HashMaps

Simulations

You build simple programs that show how threads solve shared problems.

  • Dining philosophers
  • Library simulation

Parallel Algorithms

You see how to split work into smaller tasks that run at the same time.

  • What parallel computing means
  • Parallel merge sort
  • Other parallel patterns

Fork-Join Framework

You learn how Fork-Join uses many cores and helps with divide-and-conquer tasks.

  • Fork-Join basics
  • Finding a maximum in parallel

Stream API

You explore the Stream API and see how parallel streams work.

  • Stream API basics with examples
  • Sequential vs parallel streams

Big Data and MapReduce

You finish with the MapReduce pattern and how it relates to Fork-Join.

  • What MapReduce does
  • MapReduce vs Fork-Join

About the Author: udemy

udemy thumbnail
By connecting students all over the world to the best instructors, Udemy is helping individuals reach their goals and pursue their dreams. Udemy is the leading global marketplace for teaching and learning, connecting millions of students to the skills they need to succeed. Udemy helps organizations of all kinds prepare for the ever-evolving future of work. Our curated collection of top-rated business and technical courses gives companies, governments, and nonprofits the power to develop in-house expertise and satisfy employees’ hunger for learning and development.

Watch Online 86 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 86 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Introduction
All Course Lessons (86)
#Lesson TitleDurationAccess
1
Introduction Demo
01:37
2
Processes and threads introduction
06:13
3
What is time-slicing algorithm?
02:42
4
Benefits of multithreading
02:21
5
Downside of multithreading
02:47
6
Thread life cycle in Java
02:45
7
Sequential processing
04:23
8
Starting threads - Runnable
06:29
9
Starting threads - Thread class
05:28
10
Wait for threads to finish - join
04:39
11
Daemon threads and user threads
08:59
12
Memory management of threads
03:39
13
Synchronization
07:38
14
Problems with synchronization
09:44
15
Locking with custom objects
03:21
16
Wait and notify
08:39
17
Producer and consumer
11:10
18
Locks
06:15
19
Producer consumer with locks
06:24
20
Locks and synchronization
01:35
21
Volatile
06:04
22
Stopping a thread
01:19
23
Deadlock and livelock
04:38
24
Deadlock example
06:21
25
Livelock example
06:25
26
Atomic variables
05:56
27
What are semaphores?
03:52
28
Mutexes and semaphores
05:29
29
Semaphores example
07:20
30
Why to use thread pools?
04:49
31
Executors example - SingleThreadExecutor
05:22
32
Executors example - FixedThreadPools
04:12
33
Executors example - ScheduledExecutor
03:25
34
Stopping executors
04:56
35
What is a Callable interface and Future object?
03:25
36
Callable and future example
07:41
37
Latch
09:07
38
Cyclic barrier
09:17
39
Blocking queue
08:53
40
Delay queue
09:10
41
Priority queue
10:30
42
Concurrent maps
07:26
43
Exchanger
09:33
44
Dining philosophers problem I - the problem
02:31
45
Dining philosophers problems II - constants
03:56
46
Dining philosophers problems III - chopstick
08:04
47
Dining philosophers problems IV - philosopher
11:06
48
Dining philosophers problems V - starting the threads
10:21
49
Dining philosophers problems VI - running the simulation
03:30
50
Student library simulation I - the problem
01:25
51
Student library simulation II - constants
01:51
52
Student library simulation III - book
03:17
53
Student library simulation VI - student
02:58
54
Locking: locks () and tryLock()
02:41
55
Student library simulation V - running the simulation
04:13
56
Miner game implementation I
01:44
57
Miner game implementation II
03:56
58
Miner game implementation III
02:16
59
Miner game implementation IV
03:36
60
Miner game implementation V
05:57
61
Parallel methods versus multithreading
08:07
62
Merge sort introduction I
06:51
63
Merge sort introduction II
08:55
64
Sequential merge sort I
06:27
65
Parallel merge sort
06:48
66
Comparing sorting implementations
04:46
67
Sum problem introduction
02:45
68
Sum problem - sequential approach
04:29
69
Sum problem - parallel implementation
08:27
70
Comparing sum implementations
03:59
71
Fork-join framework introduction
05:45
72
Fork-join framework simple example - RecursiveAction
09:15
73
Fork-join framework simple example - RecursiveTask<T>
07:57
74
Maximum finding - the algorithm
08:18
75
Maximum finding - running the application
06:55
76
Fork-join merge sort I
08:32
77
Fork-join merge sort II
05:01
78
What is the Stream API?
02:46
79
Streams with numbers
08:55
80
Streams with strings
03:44
81
Processing files with streams
04:53
82
Streams with custom objects
09:41
83
Serial and parallel streams - counting prime numbers
07:59
84
MapReduce introduction - basics
06:02
85
MapReduce introduction - example
06:08
86
MapReduce and Fork-Join
01:49
Unlock unlimited learning

Get instant access to all 85 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription