Geometric Decomposition
This pattern is another use of divide and conquer, divide up the data structure and do computation at each unit. I did not find this pattern interesting. Although in the task schedule part, the author express a preference on static cyclic allocation, I think it is hard to keep the load balaced when the computation become sparse. And for the dynamic scheduling, overhead is a big problem. A combinition of the two might help, static first, then switch to dynamic when reaches some threshold.
I think the most challenging part of this pattern is the update operation, cautions and supervisions are necessary.
Data Parallelism
Alright, this is all? Shortest pattern that I've ever read. A pattern looks very likely to Geometric Decomposition, but view it in another dimension, which is keep the data chunk fixed and move the command sequence on them. I am not sure how to combine those data chunck during the processes though. I don't think it is anything like the MapReduce because I could not find in the description of how to combine those data sets. Maybe as it said "When the operations are for the most part uniformly applied to these elements, an effective solution is to treat the problem as a single stream of instructions applied to each element." it does not contain the combine part. Still, I could not see this pattern very in a useful way.
Pipeline
As its name tells us, this pattern is about dividing work into simple steps, set up multiple stations and each station works based on the production from previous one then send to the next. The biggest challenge is to divide the work in order to have a fairly similar runing time on each station to avoid bottleneck. I think the idea is much like the Data parallelism, but this pattern is described in a more understandable way and provides a lot more details. I actually read this pattern after the Data Parallelism and I think I'm wrong about no combination in Data Parallelism Pattern. The combination itself should be a station and the data to combine can be send as works or just messages.
Wednesday, November 04, 2009
Tuesday, November 03, 2009
Armstrong Chapter 5
This chapter describe a method in programming fault-tolerant system: the supervisor and hierachy of tasks. I think this kind of hierachy is very efficient in error handling in a way that the supervision processes are very important, especially in identify the errors.
Recently,we see a lot of this kind of "divide and conquer" ideas in patterns and parallel programming, I think the supervisor and the hierachical way of managing is a variant of this central idea.
Recently,we see a lot of this kind of "divide and conquer" ideas in patterns and parallel programming, I think the supervisor and the hierachical way of managing is a variant of this central idea.
Monday, November 02, 2009
Task Parallelism, Recursive Splitting and Discrete Event patterns
Task parallelism
I think this pattern is really straight forward by the name if you read the content first. This pattern should belongs to structural pattern because basically it describe a abstract structure. I think better run times can be get from software as well as from hardware. Sometimes a better implementation can save us some time. I believe this pattern is not platform relavant, but yes I think learn more about hardware platform can make a better implementation sometimes.
Recursive Splitting
I found this pattern somehow interesting, because there is nothing really new in this pattern, but it is described in a more computational way. And this pattern is able to add some other patterns to it.
Discrete Event Pattern
I like the message passing most, but under some circumstances, shared-memory can be easier to use, maybe abused a lot. I think the accurate deadlock detection can be hard but simply timeout can be misleading too. Sometimes we do want to know if it is the deadlock or other problems cause timeout.
I think this pattern is really straight forward by the name if you read the content first. This pattern should belongs to structural pattern because basically it describe a abstract structure. I think better run times can be get from software as well as from hardware. Sometimes a better implementation can save us some time. I believe this pattern is not platform relavant, but yes I think learn more about hardware platform can make a better implementation sometimes.
Recursive Splitting
I found this pattern somehow interesting, because there is nothing really new in this pattern, but it is described in a more computational way. And this pattern is able to add some other patterns to it.
Discrete Event Pattern
I like the message passing most, but under some circumstances, shared-memory can be easier to use, maybe abused a lot. I think the accurate deadlock detection can be hard but simply timeout can be misleading too. Sometimes we do want to know if it is the deadlock or other problems cause timeout.
Subscribe to:
Posts (Atom)