Parallelism A new way of thinking about solving problems for your generation.
WE HAVE BEEN LIVING IN SERIAL WORLD WITH SERIAL THINKING
Help Bill Gates get dressed
What else: an algorithm Start = Mr. Gates in pajama gown End = Mr. Gates dressed for work Fasten belt Put on shirt Put on left sock Put on right sock Put on underpants Put on right shoe Remove pajama gown Put on undershirt Put on left shoe Tuck shirt into pants Put on pants
A serial algorithm Start = Mr. Gates in pajama gown End = Mr. Gates dressed for work Fasten belt Put on shirt Put on left sock Put on right sock Put on underpants Put on right shoe Remove pajama gown Put on undershirt Put on left shoe Tuck shirt into pants Put on pants
A parallel algorithm – with the least # of steps Start = Mr. Gates in pajama gown End = Mr. Gates dressed for work Fasten belt Put on shirt Put on left sock Put on right sock Put on underpants Put on right shoe Remove pajama gown Put on undershirt Put on left shoe Tuck shirt into pants Put on pants
A more programming related example: Exchange A & B Variable A in memoryVariable B in memory Start End
A more programming related example Exchange A & B Variable A in memoryVariable B in memoryVariable X in memory Start End 5 Steps A = 2 B = 5 X = B B = A A = X
Can you create a parallel solution? You can use more memory Some things cannot be done in same step Count the number of steps
A more programming related example Exchange A & B Variable A in memory Variable B in memory Variable X in memory Variable Y in memory Start End 3 Steps but more memory A = 2 B = 5 X = A Y = B A = Y B = X