Home Backend Development PHP Tutorial 并行处理是什么?

并行处理是什么?

Jun 13, 2016 am 11:50 AM
parallel processing

并行处理是计算机系统中能同时执行两个或多个处理的一种计算方法;并行处理可同时工作于同一程序的不同方面;并行处理的主要目的是节省大型和复杂问题的解决时间。

并行处理是什么?

并行处理(Parallel Processing)是计算机系统中能同时执行两个或多个处理的一种计算方法。并行处理可同时工作于同一程序的不同方面。

并行处理的主要目的是节省大型和复杂问题的解决时间。

为使用并行处理,首先需要对程序进行并行化处理,也就是说将工作各部分分配到不同处理进程(线程)中。

并行处理由于存在相互关联的问题,因此不能自动实现。另外,并行也不能保证加速。从理论上讲,在 n 个并行处理的执行速度可能会是在单一处理机上执行的速度的 n 倍。

特点

只有部分应用程序在满足以下条件的情况下可利用并行处理:具有充足的能充分利用多处理机的应用程序; 并行化目标应用程序或用户需进行新的编码来利用并行程序。

传统上,多处理机专为“并行计算机”所设计,沿着这样的思路,当前 Linux 支持 SMP 奔腾系统,在该系统中多处理机共享单个计算机中的单个存储器和总线接口。每个运行 Linux 的机器组都有可能通过网络互相连接形成并行处理群。第三种选择是使用 Linux 系统作为“主机”,提供专门的相关并行处理机(attached parallel processor)。第四种新选择是寄存器内 SIMD 并行,应用于多媒体扩展(MMX)。

并行处理所需要提供的典型硬件环境有:

单处理机上的单个区;

多处理机(SMP)中的单个区;

多区配置

一个处理机(MPP)中的各区 ;

多处理机(SMP 群)中的各区;

逻辑数据库区(在 AIX 第1版的 DB2 并行版 - DB2 PE 中也称之为多逻辑代码或 MLN)

并行计算机具有代表性的应用领域有:天气预报建摸、VLSI电路的计算机辅助设计、大型数据库管理、人工智能、犯罪控制和国防战略研究等,而且它的应用范围还在不断地扩大。并行处理技术主要是以算法为核心,并行语言为描述,软硬件作为实现工具的相互联系而又相互制约的一种结构技术。

算法基本策略

在并行处理技术中所使用的算法主要遵循三种策略:

1、分而治之法:也就是把多个任务分解到多个处理器或多个计算机中,然后再按照一定的拓扑结构来进行求解。

2、重新排序法:分别采用静态或动态的指令词度方式。

3、显式/隐式并行性结合:显式指的是并行语言通过编译形成并行程序,隐式指的是串行语言通过编译形成并行程序,显式/隐式并行性结合的关键就在于并行编译,而并行编译涉及到语句、程序段、进程以及各级程序的并行性。

更多相关知识,请访问 PHP中文网!!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to implement parallel processing and asynchronous calls of requests in FastAPI How to implement parallel processing and asynchronous calls of requests in FastAPI Jul 29, 2023 am 10:09 AM

How to implement parallel processing and asynchronous calls of requests in FastAPI FastAPI is a high-performance Python Web framework that supports parallel processing and asynchronous calls, which can help us process requests more efficiently. This article will introduce how to implement parallel processing and asynchronous calls of requests in FastAPI, and provide relevant code examples. Parallel processing of requests To implement parallel processing of requests in FastAPI, we can use Python's concurrent.futures module to

How to handle task parallelism and polling processing in PHP development How to handle task parallelism and polling processing in PHP development Oct 10, 2023 pm 12:12 PM

Title: Task parallel processing and polling implementation in PHP development In actual PHP development, processing task parallelism and polling are very common and important operations. This article will introduce how to handle parallel execution of tasks and polling processing in PHP, while providing specific code examples. 1. Task parallel processing Task parallel processing means that multiple tasks are performed at the same time without blocking each other. In PHP, there are several common ways to implement parallel processing. Multi-threaded parallel processing can achieve parallel processing of tasks through multi-threading

Parallel processing optimization of PHP functions Parallel processing optimization of PHP functions May 05, 2024 am 10:30 AM

PHP's parallel processing capabilities are implemented through the Process class, which optimizes time-consuming tasks such as image processing, data analysis, and file conversion. It distributes tasks to multiple processors, reducing completion time and improving application performance.

Parallel processing in Python Parallel processing in Python Sep 11, 2023 pm 11:49 PM

Introduction In today's fast-paced digital environment, it is crucial for developers and data scientists to efficiently complete computationally difficult tasks. Fortunately, Python offers powerful parallel processing capabilities due to its adaptability and broad ecosystem. We can achieve substantial performance improvements by breaking down difficult problems into smaller, more manageable activities and working on them simultaneously. Python’s parallel processing capabilities allow us to utilize available computer resources to perform activities such as web scraping, scientific simulations, and data analysis faster and more efficiently. In this article, we will start a journey through parallel processing in Python. We will examine many methods, including multiprocessing, asynchronous programming, and multithreading, and learn how to use them effectively

How to implement parallel processing using Go coroutines? How to implement parallel processing using Go coroutines? Jun 05, 2024 pm 06:07 PM

How to use Go coroutines to implement parallel processing? Create a coroutine to calculate the Fibonacci sequence in parallel. Coroutines transfer data through channels to achieve parallel computing. The main coroutine receives and processes the results of parallel calculations.

Java Errors: Java Parallel Processing Errors, How to Handle and Avoid Java Errors: Java Parallel Processing Errors, How to Handle and Avoid Jun 25, 2023 am 11:44 AM

With the rapid development of computer technology, in order to meet the needs of large-scale data processing, Java parallel processing has become an increasingly popular programming method. However, with this comes the risk of Java parallel processing errors that can have a fatal impact on the performance and reliability of the program. This article will discuss the types of Java parallel processing errors, how to handle and avoid them. Java parallel processing errors generally fall into two categories: data races and deadlocks. Data competition refers to two or more threads accessing and modifying the same memory area at the same time.

Asynchronous programming in Java Asynchronous programming in Java Jun 09, 2023 am 11:33 AM

With the continuous development of Internet technology, the scale and complexity of Web applications are becoming higher and higher, and the requirements for program performance, scalability, and robustness are also getting higher and higher. Asynchronous programming is one of the programming modes that emerged to meet these requirements. As a very popular programming language, Java also has rich support for asynchronous programming. This article will briefly introduce asynchronous programming in Java. Introduction to asynchronous programming Asynchronous programming, in short, performs corresponding operations after an event occurs. Relative to synchronous editing

How to deal with multi-task scheduling and parallel processing problems and solutions in C# development How to deal with multi-task scheduling and parallel processing problems and solutions in C# development Oct 10, 2023 am 08:49 AM

How to deal with multi-task scheduling and parallel processing problems and solutions in C# development. In C# development, dealing with multi-task scheduling and parallel processing is a very common requirement. How to efficiently handle multitasking and parallel tasks can improve program performance and response speed. This article will introduce how to use C#'s multi-threading and task parallel libraries to implement multi-task scheduling and parallel processing, and provide specific code examples. 1. Multi-threading Multi-threading is a method of handling multi-tasking. In C#, you can use the Thread class to create and start threads. Below is a

See all articles