#copy this directory # scp -r esc09-master:/home/innocente/ExercisesMT . cp -r /nfsmaster/innocente/ExercisesMT . #copy tcmalloc # scp esc09-master:/home/innocente/tcmalloc.tgz cp -r /nfsmaster/innocente/tcmalloc.tgz . tar -zxf tcmalloc.tgz export LD_PRELOAD=$HOME/tcmalloc/lib/libtcmalloc.so export LD_PRELOAD= echo $LD_PRELOAD # --------------------------------- setCXX : set c++ flags RealTime.h: a precise measurement of wall clock time (actually clock cycles...) future.h: gcc header file missing in 4.4.1 future.cc: library component of the above to compile and run: cd ExercisesMT source setCXX g++441 $CXXFLAGS exFuture.cpp future.cc ./a.out ----------------------------------------- exAtomics.cpp: example of use of atomics exFuture.cpp : examples of use of future exRandom.cpp : example of use of exercises: look in these files, "play" with code constructs and syntax to solve you own preferred "code-puzzle" helloWordMT.cpp : example of thread fork, join and concurrency exercises introduce an atomic, a lock to solve the concurrency problem (and transform it in a trivial sequential program :-( ----------------------------------------- DistributedLocks.cpp: examples of shared memory access patterns exercises: try various memory access pattern, global lock, distributed locks, atomics, local memory why it aborts? ----------------------------------------- SharedQueue.h: simple lock free implementation of a FIFO exQueue.cpp: example of use od the above exercises: modify it to use condition variables, try it in multiple "pushers" ----------------------------------------- ParallelSort.cpp: Divide&Conquer implementation of sorting exercises: use futures, use OpenMP ----------------------------------------- exSharedList.cpp: minimal implementation of lock free linked-list (mainly a malloc exercise use tcmalloc use a memory pool ----------------------------------------- HistoMapReduce.cpp Map/Reduce, Master/Worker, pull-mode implementation of parallel histogramming HistoFuture.cpp Map/Reduce, Master/Worker, round-robin push-mode implementation of parallel histogramming using futures profile observe thread scheduling, starvation parallelize the generation of the image ----------------------------------------- ClusterizerPart1.cpp some components to implelement the kmean clusterizer using Histograming as example, implement the iterative kmean clusterizer -----------------------------------------