Tuesday, September 15, 2009

Pipes and Filters

Most of us are familiar with the Pipes & Filters architecture from previous experience with Unix and compiler programming. But it's great to read an article that explicitly states the advantages and disadvantages from using such an architecture with several variations that could be used in different contexts. The pipeline in computer architecture came to my mind quite frequently when I was reading this article but it made me realize how different it actually is. For one, the pipeline stages in computer architecture are not intended to be exchanged or recombined for future enhancements (at least I don't think so). Non-adjacent processing steps DO share information through feedback lines for branch prediction and other features. It doesn't allow different sources of input data (imagine a hacker being able to change the source of data at this level), and it always stores the final results in a single format. What are the similarities? The obvious is that you're moving data from one stage (filter) to another via intermediate hardware logic (pipes). But in both cases, you can also multi-process the steps in parallel. Pipelines in computer architecture are not just trying to process data streams from on step to another; they're also controlling the entire execution flow of a program which probably explains why it's more complex. Each step serves the sole purpose of processing its data as fast as possible (at the nanosecond level) for a very specific context. Filters, on the other hand, are designed to be used in different contexts.

Unfortunately, this is as close as I've been to developing an application that might make use of the Pipes & Filters architecture. But it wasn't even an application; it was a MIPS emulator that I implemented in Verilog.

No comments:

Post a Comment