Waiting tasks in fork/join do not actually block threads.
fork/join 中处于等待中的任务实际上不阻止线程。
We already showed the decision/merge mapping in the MultiMethod project, so this part will concentrate on the fork/join mapping.
我们在 MultiMethod项目中已经介绍了decision/merge映射,因此该部分将集中讨论一下fork/join 映射。
Revisiting the example from Listing 6, notice that max() is a method already provided on parallel collections, so there is no need to define and invoke a fork/join task directly, as in Listing 7
再看一下清单6中的示例,注意到,max()是一个已经在并行集合中提供的方法,因此没有必要直接定义和调用fork/join任务,如清单 7 所示
Review: fork-join decomposition.
回顾:fork - join分解。
In this regard, JPFF can be viewed as an extended, distributed fork-join framework.
从这个角度来讲,我们可以把JPPF看作一个扩展的、分布式的fork - join框架。
It's easy to express such problems using fork-join, as you saw in the previous installment.
用fork - join可以很容易地表示这类问题,正如您在上一期中看到的那样。
You then use the description to actually execute the array operations (which USES the fork-join framework under the hood) in parallel.
然后用该描述并行地执行数组操作(幕后使用的是fork - join框架)。
To assess the effectiveness of ParallelArray, I wrote a simple, unscientific program that runs the query for various sizes of array and fork-join pools.
为了评估ParallelArray的效率,我编写了一个简单的程序,针对各种大小的数组和fork-join池运行查询。
The fork-join approach offers a portable means of expressing a parallelizable algorithm without knowing in advance how much parallelism the target system will offer.
fork-join方法提供了一种表示可并行化算法的简单方式,而不用提前了解目标系统将提供多大程度的并行性。
For most runs, the number of threads in the fork-join pool was equal to the number of hardware threads (cores times threads-per-core) available.
对于大多数运行,fork - join池中的线程数量与可用的硬件线程(内核数乘以每个内核中的线程数)相等。
This kind of parallel decomposition is often called fork-join because executing a task forks (starts) multiple subtasks and then joins (waits for completion) with them.
这种并行分解方法常常称作fork-join,因为执行一个任务将首先分解(fork)为多个子任务,然后再合并(join)(完成后)。
This is typical of fork-join problem implementations because the process of recursively dividing the problem will create a potentially large number of new Problem objects.
这在fork-join问题实现中很常见,因为递归分解问题的过程将会创建大量的新Problem对象。
The principal benefit of using the fork-join technique is that it affords a portable means of coding algorithms for parallel execution.
使用fork-join技术的主要好处是,它提供了一种编写并行执行的算法的简便方法。
The fork-join framework reduces contention for the work queue by using a technique known as work stealing.
fork - join框架通过一种称作工作窃取(work stealing)的技术减少了工作队列的争用情况。
The pattern in Figure 14 presents the correct way to model parallel branching by using a matching fork-join pair.
图14中的模式展示了使用匹配的 fork-join 对建立并行分支模型的正确方法。
Listing 1. Merge-sort using the fork-join library.
清单1.使用fork - join库进行合并排序。
The fork-join framework supports several styles of ForkJoinTasks, including those that require explicit completions and those executing cyclically.
fork - join框架支持几种风格的ForkJoinTasks,包括那些需要显式完成的,以及需要循环执行的。
Listing 2 shows an example of a problem that is suitable to a fork-join solution: searching a large array for its maximal element.
清单2显示了一个适合使用fork - join解决方案的问题示例:在大型数组中搜索其中的最大元素。
Of course, this is a very simple example, but the fork-join technique is suitable for a wide variety of searching, sorting, and data analysis problems.
虽然这个示例非常简单,但是fork - join技术可用于各种各样的搜索、排序和数据分析问题。
Of course, this is a very simple example, but the fork-join technique is suitable for a wide variety of searching, sorting, and data analysis problems.
虽然这个示例非常简单,但是fork - join技术可用于各种各样的搜索、排序和数据分析问题。
应用推荐