We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Programming in Parallel with Threads

00:00

Formal Metadata

Title
Programming in Parallel with Threads
Title of Series
Number of Parts
160
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Programming in Parallel with Threads [EuroPython 2017 - Talk - 2017-07-11 - PyCharm Room] [Rimini, Italy] Threads are typically not the way to take advantage of multiple CPUs for CPU-bound problems. The Global Interpreter Lock (GIL) allows the use of only one CPU at the time when using threads. However, the GIL is released for IO task The use case is a scientific simulation model that has to run 18,000 different simulations. The input data for these simulations need to be extracted from a common database, re-assembled and translated into several input files per simulation. After each simulation that is run with an external, standalone executable, the output data needs to be gathered and rearranged in a output database. The implementation scaled up to 50 threads. On a eight-core machine more than 90 % usage of all CPUs could be achieved, bringing the total run time down to about two hours from about 15 hours. Depending on the use case, threading can help to speedup a program and even take advantage of multiple CPUs. This talk presents such a use case. The approach can be translated to problems from other domains if the sub-tasks can be turned into IO tasks. Asynchronous programming could have been used here. However using a thread per task and using class that represents a task, is likely conceptually simpler for programmers not used to asynchronous programming
Thread (computing)SoftwareComa BerenicesCASE <Informatik>Ultraviolet photoelectron spectroscopySound effectDiffusionPoint (geometry)Source codeBuildingAreaLengthAverageStatisticsInsertion lossSeries (mathematics)CASE <Informatik>BitImage resolutionParallel portVideo projectorMathematicsSlide ruleComputer programmingArithmetic progressionConnected spaceProper mapTouchscreenPhysical lawAreaDiffuser (automotive)Source codeInstance (computer science)Sound effectSimulationMultiplication signPersonal digital assistantState of matterOffice suiteCombinational logicBuildingRight angleDifferent (Kate Ryan album)Presentation of a groupMoment (mathematics)Self-organizationPhysical systemConcentricEmbargoForm (programming)QuicksortBit rateWeb pageCartesian coordinate systemMoment <Mathematik>Server (computing)Goodness of fitNumberStress (mechanics)Function (mathematics)Direction (geometry)Insertion lossFocus (optics)DataflowSpacetimeReverse engineeringWater vaporSquare numberSpeech synthesisMetreError messageStatisticsPoint (geometry)outputEndliche ModelltheorieTime seriesPopulation densityControl flowIntegrated development environmentMereologyFood energyArtificial neural networkStaff (military)Gene clusterGraph coloringArithmetic meanSurfaceCubic graphComputer animationLecture/Conference
Structural loadSeries (mathematics)Revision controlComputer fileoutputField (computer science)InformationLogical constantInsertion lossParameter (computer programming)Multiplication signCalculationProcess (computing)CASE <Informatik>Thread (computing)Interpreter (computing)BefehlsprozessorTask (computing)CASE <Informatik>Function (mathematics)NumberInterpreter (computing)Bit rateoutputComputer fileEndliche ModelltheorieMultiplication signStructural loadInsertion lossInformationConnected spaceConcentricRow (database)Office suiteFood energyResultantStaff (military)DistanceWater vaporTheoryTask (computing)Degree (graph theory)Execution unitTimestampPresentation of a groupPolar coordinate systemTime seriesSubsetBefehlsprozessorFiber (mathematics)Software developerProgrammer (hardware)RadiusProjective planeProcess (computing)Overhead (computing)1 (number)Physical systemTerm (mathematics)Social classForm (programming)Electric generatorTable (information)Reading (process)Template (C++)Data storage deviceComputer programmingConstraint (mathematics)File formatLocal ringSupremumCuboidCalculationConcurrency (computer science)Arithmetic meanStress (mechanics)Right anglePhysical lawPunched cardWritingSummierbarkeitThread (computing)Core dumpLoginBit
outputQueue (abstract data type)Different (Kate Ryan album)Right angleCalculationCASE <Informatik>State of matterQueue (abstract data type)ResultantComputer animation
Overhead (computing)Thread (computing)Software testingTotal S.A.Run time (program lifecycle phase)Perspective (visual)ResultantThread (computing)CASE <Informatik>CodeTerm (mathematics)Computer programmingQueue (abstract data type)Run time (program lifecycle phase)Software testingMultiplication signStress (mechanics)Total S.A.Right angleRadical (chemistry)Thermal conductivityLecture/ConferenceComputer animation
outputParameter (computer programming)Data modelFunction (mathematics)Reading (process)Computer fileThread (computing)Local GroupComputer simulationTemplate (C++)Open setTable (information)Exception handlingWritingThread (computing)Task (computing)output1 (number)Source codeDirectory serviceMereologySocial classNormal (geometry)Parameter (computer programming)Template (C++)Multiplication signModule (mathematics)Computer programmingStandard deviationFunction (mathematics)Computer fileCASE <Informatik>Message passingStress (mechanics)Object (grammar)Type theoryVector spaceGroup actionEndliche ModelltheorieCalculationResultantService-oriented architectureLibrary (computing)Right angleXML
Boss CorporationTask (computing)Thread (computing)Reading (process)outputFunction (mathematics)Parameter (computer programming)Instance (computer science)Data model12 (number)Thread (computing)ResultantVideo gameData structureBefehlsprozessorCodeCue sportsEndliche ModelltheorieTelecommunicationMultilaterationQueue (abstract data type)DivisorParsingCalculationWritingParameter (computer programming)Hard disk driveBinary fileCASE <Informatik>Boss CorporationMereologyRevision controlRight angleReading (process)Arithmetic meanService-oriented architectureMetreFunction (mathematics)Strategy game
Thread (computing)Data modelParameter (computer programming)outputFunction (mathematics)File formatInheritance (object-oriented programming)Reading (process)Price indexCone penetration testBoss CorporationComputer simulationException handlingQueue (abstract data type)IterationAdditionLattice (order)IntelBefehlsprozessorScale (map)Process (computing)Thread (computing)Computer simulationTelecommunicationQueue (abstract data type)Operating systemGraphical user interfaceWindow functionMaxima and minimaComputabilityParallel portBitPhysical systemCore dumpFunction (mathematics)CASE <Informatik>Computer programmingResultantCalculationProcess (computing)Loop (music)BefehlsprozessorMultiplication signScaling (geometry)Intrusion detection systemMereologyLine (geometry)Exception handlingInstance (computer science)IterationCountingStudent's t-testLogicTerm (mathematics)CausalityForcing (mathematics)Sheaf (mathematics)GodRight angleVector spaceAngleState of matterFood energyDegree (graph theory)NumberSimulationStress (mechanics)Computer animation
Direction (geometry)CodeThread (computing)Queue (abstract data type)TelecommunicationData modelThread (computing)BitMehrprozessorsystemDataflowProcess (computing)TelecommunicationLevel (video gaming)Video gameMultiplication signMereologyGoodness of fitMessage passingProjective planeComputabilityoutputStress (mechanics)Function (mathematics)Domain nameCASE <Informatik>Insertion lossStudent's t-testRight angleResultantData structureSkeleton (computer programming)System call
Line (geometry)CodeThread (computing)CASE <Informatik>DeadlockMultiplication signTerm (mathematics)Exception handlingCalculationBlock (periodic table)Flag1 (number)Right angleWeightError messageService-oriented architectureResultantMathematicsLecture/Conference
MultiplicationThread (computing)Data structureMultiplication signVector potentialParallel portMereologyOrder of magnitudeInstance (computer science)Process (computing)Operator (mathematics)Open setForcing (mathematics)Right angleLevel (video gaming)Complex (psychology)Bit rateCuboidComputabilityPerturbation theoryForm (programming)Computer animationLecture/ConferenceMeeting/Interview
DatabaseOrder (biology)BitProcess (computing)CASE <Informatik>Multiplication signBenchmarkLevel (video gaming)Right angleWritingReading (process)Moment (mathematics)MathematicsDivisorNP-hardParallel portMeeting/InterviewLecture/Conference
Multiplication signFunction (mathematics)Thread (computing)Computer programmingComputer fileFrame problemoutputLine (geometry)Subject indexingMathematicsStructural loadService-oriented architectureSemiconductor memoryQuicksortRight angleVector spaceLecture/ConferenceMeeting/Interview
Thread (computing)CodeBitComputer programmingDifferent (Kate Ryan album)Stress (mechanics)ComputabilityTask (computing)outputMultiplication signLibrary (computing)Queue (abstract data type)Meeting/InterviewLecture/Conference
Transcript: English(auto-generated)