Implementing Parallel Algorithms Swarm – Multithreaded Framework
Total Page:16
File Type:pdf, Size:1020Kb
Implementing Parallel Algorithms Julius Hrivnac, LAL Swarm – Multithreaded Framework continuation of Minerva project BasicBasic principles: principles: ➢➢multithreadingmultithreading should should not not obscure obscure the the implementation implementation of of algorithms algorithms TwoTwo levels levels of of parallelism: parallelism: ➢➢aa user user should should see see the the program program logic, logic, not not parallelisation parallelisation artifacts artifacts ➢➢parallelparallel Consumers/Producers Consumers/Producers ➢➢threadthread scheduling scheduling and and balancing balancing should should be be automatic automatic ➢➢Fork&JoinFork&Join algorithms algorithms on on parallel parallel containers containers Uses:Uses: ➢➢JavaJava 7 7 ➢ObjectBrowser Architecture:Architecture: ➢ObjectBrowser ➢➢Colt ➢➢basedbased on on the the classical classical Producer-Consumer Producer-Consumer InfoBus InfoBus pattern pattern Colt ➢➢JUNG ➢➢allall BusMember BusMemberss declare declare their their input/output input/output BusItem BusItem types, types, including including possible possible multiplicity multiplicity JUNG ➢➢BeanShell (one(one BusItem BusItem processed processed by by several several Consumers) Consumers) BeanShell ➢➢FreeHEP ➢➢pluggablepluggable Balancer Balancer orchestrates orchestrates Producer/Consumer Producer/Consumer threads threads to to optimize optimize performance performance FreeHEP ➢➢GenericGeneric Collections Collections ➢➢ConcurrentConcurrent ➢➢Log4JLog4J ➢➢GroovyGroovy ➢➢ScalaScala ➢Clojure Design:Design: ➢Clojure ➢➢basedbased on on advanced advanced multithreaded multithreaded architecture architecture of of Java Java 7 7 ➢➢allowsallows BusMembers BusMembers in in JVM-compatible JVM-compatible multithreaded multithreaded languages languages ( Groovy(Groovy, ,Scala Scala, ,Clojure Clojure)) ➢➢possibilitypossibility to to re-write re-write a a part part of of the the framework framework in in those those languages languages foreseen foreseen FutureFuture Evolution: Evolution: ➢ ➢➢completelycompletely interactive interactive with with the the graphical graphical interface interface (various (various Observers) Observers) ➢persistencypersistency (Parallel (Parallel IO) IO) ➢➢distributeddistributed operation operation support for multiple Bus Interactor AlgSupport support for multiple languageslanguages BusInterface Diversity Monitor BusDefaultImpl Collaboration SelfTest Balancer threadthread scheduling scheduling supportsupport for for Fork Fork & & andand balancing balancing JoinJoin Containers Containers MemoryMemory consumption consumption ProcessingProcessing Log Log ObjectObject Browser Browser DynamicalDynamical Graphical Graphical view view of of GlobalGlobal Operations Operations ➢➢Producers/Consumers/AlgorithmsProducers/Consumers/Algorithms ➢➢BusItemsBusItems CommandCommand Line Line ➢➢callscalls ➢➢fullfull Java Java available available.