所谓的 "Fine-Grained Parallelism" 在本书的上下文中到底是什么意思?
What does the so-called "Fine-Grained Parallelism" exactly mean in the context of this book?
我正在阅读操作系统:内部结构和设计原则。在Section 10.1 Multiprocessor Scheduling中,作者介绍了一个table的同步粒度如下:
- Fine: Parallelism inherent in a single instruction stream
- Medium: Parallelism processing or multitasking within a single application
- Coarse: Multiprocessing of concurrent processes in multiprogramming environment
- Very Coarse: Distributed processing across network nodes to form a single computing environment
- Independent: Multiple unrelated processes
他这样解释细粒度并行性:
Fine-grained parallelism represents a much more
complex use of parallelism than is found in the use of threads. Although much
work has been done on highly parallel applications, this is so far a specialized and
fragmented area, with many different approaches.
我能理解中粒度是关于线程和除所谓的细粒度并行之外的其他粒度。而我在网上搜索也没有得到多少信息。那么你能为我澄清一下吗?一些例子真的很有帮助。
提前致谢!
它引用了所谓的指令级并行性,即可以从同一线程并行执行的指令。
例如,如果您有两条指令,例如
a = b*2
c = d+5
这些指令可以由处理器并行执行,没有任何问题,因为它们不以任何方式相互依赖。
另一方面,如果您有像
这样的说明
a = b*2
c = a+5
在这种情况下,第二条指令依赖于第一条指令,并且在第一条结果可用之前无法处理。这是指令级并行性的限制因素,因为大多数指令都依赖于其他指令。
Fine-grained parallelism represents a much more complex use of
parallelism than is found in the use of threads.
这是因为为了识别同一线程中的独立指令,您必须能够查看指令流水线,这不是一件容易的事,需要特殊的硬件和编译器优化。
另一方面,线程级并行很容易,因为您知道来自两个不同线程的两条指令不可能相互依赖。
我正在阅读操作系统:内部结构和设计原则。在Section 10.1 Multiprocessor Scheduling中,作者介绍了一个table的同步粒度如下:
- Fine: Parallelism inherent in a single instruction stream
- Medium: Parallelism processing or multitasking within a single application
- Coarse: Multiprocessing of concurrent processes in multiprogramming environment
- Very Coarse: Distributed processing across network nodes to form a single computing environment
- Independent: Multiple unrelated processes
他这样解释细粒度并行性:
Fine-grained parallelism represents a much more complex use of parallelism than is found in the use of threads. Although much work has been done on highly parallel applications, this is so far a specialized and fragmented area, with many different approaches.
我能理解中粒度是关于线程和除所谓的细粒度并行之外的其他粒度。而我在网上搜索也没有得到多少信息。那么你能为我澄清一下吗?一些例子真的很有帮助。
提前致谢!
它引用了所谓的指令级并行性,即可以从同一线程并行执行的指令。
例如,如果您有两条指令,例如
a = b*2
c = d+5
这些指令可以由处理器并行执行,没有任何问题,因为它们不以任何方式相互依赖。
另一方面,如果您有像
这样的说明a = b*2
c = a+5
在这种情况下,第二条指令依赖于第一条指令,并且在第一条结果可用之前无法处理。这是指令级并行性的限制因素,因为大多数指令都依赖于其他指令。
Fine-grained parallelism represents a much more complex use of parallelism than is found in the use of threads.
这是因为为了识别同一线程中的独立指令,您必须能够查看指令流水线,这不是一件容易的事,需要特殊的硬件和编译器优化。
另一方面,线程级并行很容易,因为您知道来自两个不同线程的两条指令不可能相互依赖。