The Java Fork-Join Pool Framework Flashcards
The _ provides a high performance, parallel, fine-grained task execution framework for Java programs.
ForkJoinPool
A ForkJoinPool distinguishes itself from other types of ExecutorService primarily through its use of _: every thread in the pool seeks to locate and perform tasks that have been submitted to the pool or generated by other currently active tasks (ultimately blocking and waiting for work if none is available).
work-stealing
It provides a parallel computing engine for many higher-level frameworks.
ForkJoinPool
_ is a feature of Java 8 and higher, meant for utilizing multiple cores of the processor.
Java Parallel Streams
Java Parallel Streams is a feature of _ and higher, meant for utilizing multiple cores of the processor.
Java 8
Using the _, we can divide chunks of code into streams that execute in parallel on multiple cores. The final result is the grouping of the different results (outcomes).
parallel stream
A _ is a flow of objects that supports various functions and is intended to produce a reliable output.
parallel stream
_ in Java is simply a wrapper around a data source, allowing us to perform bulk operations on the data in a convenient way.
Stream
_ enable us to execute code in parallel on separate cores. The final result is the combination of each outcome. However, the order of execution is out of our control. It may change every time we run the program.
Parallel streams
Parallel streams enable us to execute code in parallel on _ cores. The final result is the combination of each outcome. However, the order of execution is out of our control. It may _ every time we run the program.
separate, change
Parallel streams make use of the _ and its common pool of worker threads.
fork-join framework
The fork-join framework was added to _ in Java 7 to handle task management between multiple threads.
java.util.concurrent
By using the parallel stream, we can divide chunks of code into streams that execute in parallel on multiple cores. It is advisable to use parallel streams in such a case where the sequence of execution does not matter and the result will not be affected. Also, notable that the state of one element does not affect the other as well as the source of the data remains unaffected.
Noted
_ is an Executor Service implementation.
Fork-Join Pool
_ is the basis for Java Executor framework sublasses.
Executor Service
The Java ExecutorService
* is a construct that allows you to pass a task to be executed by a thread asynchronously.
* creates and maintains a reusable pool of threads for executing submitted tasks.
* also manages a queue, which is used when there are more tasks than the number of threads in the pool and there is a need to queue up tasks until there is a free thread available to execute the task.
Noted
The Java ExecutorService is a _ that allows you to pass a task to be executed by a thread _.
construct, asynchronously
The Java ExecutorService creates and maintains a reusable _ for executing submitted tasks.
pool of threads
The Java ExecutorService manages a _, which is used when there are more tasks than the number of threads in the pool and there is a need to queue up tasks until there is a free thread available to execute the task.
queue
Other implementations Executor Service of execute runnables and callables.
AbstractExecutorService
_ defines methods that enable non-ForkJoinTask clients to process ForkJoinTasks.
ForkJoinPool
ForkJoinPool executes _.
fork/join tasks
ForkJoinPool
These methods insert new _ onto a shared queue used to feed _ queues managed by worker threads.
tasks, unshared