1. MPS queue/filter style:
Features: Components in the system are loosely coupled through data streams. That is to say, the dependencies between components are only data streams, rather than interface function calls or message passing.
Typical applications: Linux operating system pipeline mechanism, in the compiler, signal processing field. For example, the compiler generally consists of lexical analysis, semantic analysis, syntax analysis,CodeMultiple processing links are generated and optimized. If each link is considered as a component, the interaction between them is a predefined data stream.
Other Instructions:This mode can be implemented in many different ways, including:
(1) active and passive: in the Linux example, the pipeline is designed to be passive, and the filter is designed to be active. There may be many changes in the actual implementation. For example, a filter can also be designed as a passive filter, waiting for the pipeline to actively send read and write interactions.
(2) Multi-exit pipelines: pipelines are generally designed in the form of single-entry and single-exit pipelines. The system topology is generally a linear structure. You can also design multi-exit pipelines, A pipeline provides data for several filters at the same time, and the corresponding system topology is directed graph.