- Concurrent Patterns and Best Practices
- Atul S. Khot
- 204字
- 2021-07-16 17:32:27
Two models for concurrent programming
Concurrency implies that multiple tasks are happening in parallel to achieve a common goal. Just like communication with a group, we need to communicate and coordinate with the concurrently executing entities.
For example, let us say that we present the previously mentioned word frequency counter via a UI functionality. A user uploads a huge file and clicks the start button, resulting in a long-running MapReduce job. We need to distribute the work among the slaves. To send the workload, we need a way to communicate with them. The following diagram shows the various streams of communications that are required in this system:
If the user changes their mind and aborts the job, we need to communicate the stop message to each concurrent entity, as any further processing is futile.
There are two prominent models for concurrent communications: message passing and shared memory. The preceding diagram shows a message passing model.
We will first discuss the message passing model, using the celebrated UNIX shell pipeline as an example. Next, we will see the shared memory approach in depth and the problems that are associated with it.
- Linux設備驅動開發詳解(第2版)
- Mastering vRealize Operations Manager(Second Edition)
- 大學計算機應用基礎實踐教程(Windows 7+Office 2013)
- Arch Linux Environment Setup How-to
- Hands-On DevOps with Vagrant
- 網絡操作系統教程:Windows Server 2016管理與配置
- 嵌入式實時操作系統μC/OS原理與實踐
- Windows 7案例教程
- Delphi Programming Projects
- VMware Horizon View Essentials
- 新編電腦辦公(Windows 10+ Office 2013版)從入門到精通
- Kali Linux高級滲透測試(原書第3版)
- 精解Windows 10
- Linux操作系統
- Multi-Cloud for Architects