IBM

THREADS – Program in Parallel!

THREADS – Program in Parallel!

#THREADS #Program #Parallel

“hoff._world”

We’re looking at multithreaded program architecture, threading across languages, synchronisation primitives, all that juicy stuff.

source

 

To see the full content, share this page by clicking one of the buttons below

Related Articles

8 Comments

  1. great video, i actually made a personal project around late march/early april where i had to utilize threading, and i wish i had been able to see this before i started. keep it up my g 🙂

  2. Examples are really good. I am still trying to get my Nim web crawler working, that has a main/GUI, a scheduler and two crawler threads. The scheduler reads the robot.txt file from the server to get the tick rate and lets the two crawler threads fill up its queue with HTTP requests it should make. Every tick, it sends of another request in its queue. The results are then handed back to the crawlers for parsing and saving to an SQL database.

  3. Good video, my only gripe being with the timings. I understand that videos take a lot of investement, time- and energy-wise, but it felt like you were rushing though things. Would there have been any chance to slow down and go through the examples more thoroughly? Maybe to split this video up into two parts?

    Or, if you only wanted the examples to serve as basic motivation for the use of threads (which it seemed like here), maybe more time could have been spent on the primitives, with some example code snippets alongside the explanation of semaphores/locks/mutexes (condvar would have been nice too). A sum total of ~8 minutes on parallel programming "theory and design" and its primitives seems a little criminal :^)

    Whenever python threads are brought up I feel like I should mention CPython's Global Interpreter Lock (GIL). It is a mutex around execution of the python interpreter, found until some upcoming version of python (maybe 3.14?), and serialises the execution of the interpreter. Thus, "Threads" only really allow you to parallelise IO operations (good in the networked use case you presented), and if one wants to parallelise compute they must use the "multiprocessing" module. Having an offhand mention of this would have been nice, but no biggie.

    However, overall content was good. I particularly like examples that give some context and help inform some of the design decisions and thinking behind the use of a particular coding style. Questioning whether using threads was a good fit is good. Would have liked to see more time spent on the primitives but it is what it is.

    Whats next? Or will that be a surprise? :^)

Leave a Reply