Multithreading vs Multiprocessing | System Design
Video Overview & Insights
https://systemdesignschool.io/ ๐ Best place to learn and practice system design
Useful!
Thank you!
In this video, we dive into the key differences between multithreading and multiprocessing, two powerful approaches to achieving concurrency in programming. Whether you're building applications that handle multiple tasks at once or you need to maximize CPU performance, understanding when to use multithreading versus multiprocessing is critical for optimizing your code.
You'll learn:
Thank you!
What multithreading is and how it allows multiple threads to run within the same process.
The benefits of multithreading for I/O-bound tasks and the challenges like synchronization complexity and the Global Interpreter Lock (GIL) in Python.
Awesome video!!!
What multiprocessing is and how it runs multiple processes with separate memory spaces, enabling true parallelism.
The pros and cons of multiprocessing for CPU-bound tasks, including higher memory overhead and complex interprocess communication.
Real-world examples of multithreading in web servers and multiprocessing in data analysis applications.
By the end, you'll know exactly which approach to choose depending on whether your application is I/O-bound or CPU-bound. If you want to write efficient, scalable code that maximizes your system's resources, this video is for you
Good explanation. Please avoid background music so it is clear to listen
๐ If you found this video helpful, make sure to like, subscribe, and hit the notification bell for more in-depth tech explainers!
#Multithreading #Multiprocessing #Concurrency #Python #Programming #TechExplainer #CPU #IO
that background music is super annoying
More User Perspectives
Am I crazy or does his accent change from American to Australian at 1:07?
@4ltFFourthanks for simplifying multithreading concepts!
@ArrenGavrielHoly AI video... So sad.
The way the voice-over switches between an American accent and Australian accent...
Was interesting until I saw python
@kaihusravnajmiddinov5413That's a very to the point explanation!
@sarthaksharma3188great stuff, only feed back is no need for background music
@CMT-p6qWhy did it go from American to Australian at 1:15 ๐๐๐
@josephsands7938Hello good video so which one I should use
I don't want my apps to be CPU & RAM eaters bound
which one to go with according your opinion in this ?
Thank you for the video, good.
@Mohamed-MaghrebiDude, dont use thread for i/o bound task. This is shit instructions. You use asynchronous operations instead.
@IamAWESOME3980I would say that stating multi threading is best for I/O bound is skipping over the fact that you gain MOST of the benefit from just releasing your threads using async patterns, for example you can use asyncio library with one thread and still go and kick off 3 separate I/O calls to get data at basically the same time, so if that was the main benefit you were after multi threading isn't giving you much more. Great video though!
@touc1996Today
crete like this I have found these videos about CPUs to be suitable for a competent beginner yet also detailed. I have been spending some time recently trying to learn about CPUs/computers, and so it is helpful to have a beginner video which gets me going far enough to understand the concepts at a basic level but without leaving out details, so that I can know what to learn next at a higher level. I have also found your explanations to be quite clear. Your videos have been very helpful for me. Thank you!
Itโs fantastic to see your enthusiasm for learning about CPUs and computers! While I donโt create videos myself, Iโm thrilled to hear youโve found resources that balance beginner-friendly explanations with enough depth to inspire further exploration. It sounds like youโre already on an excellent learning path.
Music is nice ๐
@chaudarysuleman4018I watching for crack interview only ๐
@rewakamushafirIntroducing #Golang (Goroutines) ๐
@AchwaqKhalidtruly interesting. thanks for sharing.
anyway, I found asyncio is a more lightweight solution to handle heavy I/O bound concurrent processes.
could you later make a comparison just like this multithreading VS multiprocessing?
These are good and simple explanations, and the BGM is relaxing!
@tru2thastylegood work, but please remove the BGM
@notKnown9cool videos
@demostraneAnnoying music ๐ฎ
@i_youtube_In fact you can use shared memory in IPC and run threads in different cores in C using pthreads. I thinks this exposition is very biased towards modern software technologies and not towards the fundamentals of operating system concepts.
@pubdigitalixGreat work! While I agree with most of it, I think you might have missed something. And that is, the benefit of multiprocessing is not really 'true' parallelism. This is because you get 'true' parallelism with multithreading as well. In fact, multithreading will often be the right way to go as opposed to multiprocessing because of how resource intensive it tends to be.
Especially with CPU-bound tasks as you mentioned, multithreading can be extremely beneficial in that respect. Even more beneficial than multiprocessing.
Sumarizing, don't use python.
@sc5shoutIf this video was released just a few days ago, i would have passed my OS exam :)
Nice explanation!
Lets go๐
@init_yeah