Multitasking vs Multithreading vs Multiprocessing

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 186

  • @leixun
    @leixun 4 ปีที่แล้ว +131

    *My takeaways:*
    1. Multitasking on a single-core CPU - CPU time is divided for different programs, and program executions are switched instead of being executed one after another, but there is no real speed improvement 0:36
    2. Multithreading on a single-core CPU - Codes in the same program were executed in "parallel", and threads are switched instead of being executed one after another, but there is no real speed improvement 2:59
    3. Multiprocessing - this is when we have more than one CPU core, and we can do real multitasking and multithreading (i.e. executing programs and threads on different cores at the same time) 4:18
    4. An experiment on Raspberry Pi with a single-core CPU 4:55
    5. An experiment on Raspberry Pi with a quad-core CPU 7:23

    • @ironcladruffian1490
      @ironcladruffian1490 3 ปีที่แล้ว +7

      Thanks for the time stamps. There is an important concept of Io bound and cpu programs that are not mentioned here. If your program is Io bound, running multi threading can help make it run faster.

    • @leixun
      @leixun 3 ปีที่แล้ว +3

      @@ironcladruffian1490 that’s right and important!

    • @UnknownSend3r
      @UnknownSend3r 3 ปีที่แล้ว +1

      @@leixun when a multi-threaded programme on a multi-processing CPU is taking up 100% of all cores, how are other programmes that are essential to running the computer functioning ?

    • @CARPB147
      @CARPB147 3 ปีที่แล้ว

      @@UnknownSend3r - They get a slice of time as they need. That is why your multithreaded programme does not run 100% of all cores continuously *all the time* it is running.

    • @UnknownSend3r
      @UnknownSend3r 3 ปีที่แล้ว

      @@CARPB147 thanks for the answer, as it's been a while.but another quick question i have is, if that happens like I described earlier does that drastically slow the computer down.

  • @nimrodlevy
    @nimrodlevy 6 ปีที่แล้ว +63

    Please do video on multitasking!!! Many Many thanks in advance!!

    • @achakraborti
      @achakraborti 6 ปีที่แล้ว +3

      I'd love to see such a video.

  • @TheSar
    @TheSar 6 ปีที่แล้ว +33

    Another fabulous representation of a complex concept.
    The lab test you used to explains this was superb - well done Sir!

  • @galenblack6921
    @galenblack6921 6 ปีที่แล้ว +3

    Gary, I have been trying to explain this, for years, to people that know nothing of multitasking. You explained it perfectly. Thankyou.

  • @SamerTabbal
    @SamerTabbal 6 ปีที่แล้ว +136

    So a CPU can have Multi-Cores, each Core can Multi-Task, and each Task can Multi-Thread.

    • @sarhadchoudhary848
      @sarhadchoudhary848 3 ปีที่แล้ว +2

      Processception.

    • @rohankandi9900
      @rohankandi9900 2 ปีที่แล้ว +8

      Not exactly. Each core CAN ONLY RUN A SINGLE TASK at any given point of time; however it gives the illusion of MULTITASKING BY SWITCHING between threads after certain amount of time.

    • @greatwavefan397
      @greatwavefan397 2 ปีที่แล้ว +1

      @@rohankandi9900 Just like people

    • @agmg3059
      @agmg3059 ปีที่แล้ว

      @@rohankandi9900 not exactly right i had disabled cores on my ryzen and used to launch chrome youtube while opening windows music player and playing music so i was doing 2 programs 2 task only one one core without other cores and smt it was slow tho but still was doing the job fine

    • @GumbieUsaGames
      @GumbieUsaGames ปีที่แล้ว

      @@agmg3059 try dong the same with a heavy program... the above listed will context switch very fast and give an illusion of multitasking. IMO

  • @fuzz33594
    @fuzz33594 6 ปีที่แล้ว +1

    Professor Sims - brilliant clarity as one comes to expect from the Chair of the Department.

  • @bkdev886
    @bkdev886 6 ปีที่แล้ว

    I like how Gary will try to explain with practical example , it needs dedication.

  • @senthilanantha1
    @senthilanantha1 3 ปีที่แล้ว +1

    Your explanation was simple, straight forward, practical and very effective. 👍

  • @VeselinMarkovic
    @VeselinMarkovic 6 ปีที่แล้ว +35

    Excellent as always - clear, short and simple. Hyperthreading next? I reckon most people think that a processor with hyperthreading is twice as fast as one without it, which isn't true; it's more efficient, yes - but not twice as much. A video on RT systems would be quite interesting. Keep making excellent vids, Mr Sims! 👍

  • @alvaroj9509
    @alvaroj9509 3 ปีที่แล้ว +1

    This was so good Gary bro, especially the visual explanation with raspberry pi. Thank you so much!

  • @sarenodev
    @sarenodev 2 ปีที่แล้ว

    This video alone asnswers a lot of my years old question. The explanation is excellent.

  • @venkataravieluri9625
    @venkataravieluri9625 6 ปีที่แล้ว +3

    Really looking forward for your dedicated video on multitasking.

  • @BrendanGeels
    @BrendanGeels 6 ปีที่แล้ว +3

    Excellent video!
    I agree with Mr. Marković below, a video on RT systems or just RT OS's would be great!

  • @subhoghosal7
    @subhoghosal7 4 ปีที่แล้ว

    Waiting for a multitasking video. It seem interesting. OS remain always a nightmare to me, but you explain so clearly. Looking for the above mentioned video.

  • @tudorhategan3770
    @tudorhategan3770 ปีที่แล้ว

    Can't find a better explanation.
    GREAT ONE!!

  • @SivicIsntFat
    @SivicIsntFat 3 ปีที่แล้ว

    Gary you are exactly why the internet is so awesome and important!

  • @Shrisamarth2601
    @Shrisamarth2601 6 ปีที่แล้ว +8

    Gary The guru of technology 👍🏻

    • @1MarkKeller
      @1MarkKeller 6 ปีที่แล้ว +1

      Guru of Tech. Hmmm ... not bad!

  • @jayde744
    @jayde744 4 ปีที่แล้ว

    Thanks for let us understand Multithreading. Because we had a little twist there.

  • @mockingjayu2210
    @mockingjayu2210 2 ปีที่แล้ว

    Thanks gary for that super neat demo :)

  • @moy2549
    @moy2549 5 ปีที่แล้ว +3

    Ive literally been trying to wrap my head around this concept for 2 weeks now and you managed to clear things up int 10min. Thanks for this great video!!!!

  • @saurabhjha575
    @saurabhjha575 4 ปีที่แล้ว

    thanks for making it understand in a simpler way

  • @ashfaqrahman2795
    @ashfaqrahman2795 6 ปีที่แล้ว +1

    You can't be so good at explaining things with such cute looks. God bless Gary.

  • @swadhikarc7858
    @swadhikarc7858 5 ปีที่แล้ว

    Excellent explanation. Finally gotto understand this obscure topic

  • @danielc4267
    @danielc4267 2 ปีที่แล้ว

    This is awesome! I love the demo at the end. Thank you

  • @tanmoypaul1362
    @tanmoypaul1362 5 ปีที่แล้ว

    A video discussing multitasking in detail would be most welcome!

  • @MuhammadAhmed-wh5kv
    @MuhammadAhmed-wh5kv 6 ปีที่แล้ว +2

    What a great demo Gary ..

  • @DavidDeLuge
    @DavidDeLuge 6 ปีที่แล้ว +2

    Beautifully demonstrated.

  • @gakwayadavid1558
    @gakwayadavid1558 6 ปีที่แล้ว +1

    Explicitly explained!👐

  • @harshdevmurari007
    @harshdevmurari007 2 ปีที่แล้ว

    Beautifully explained 🙌🏻🙌🏻

  • @darthvader5300
    @darthvader5300 5 ปีที่แล้ว

    I am going to take a refresher course to remember what I have learned in the past. Now I remember again what multithreading is all about. Old age can make one forgetful from time to time. Especially at age 93!

  • @alenkruth
    @alenkruth 6 ปีที่แล้ว +5

    Nice video Sir! Keep'em coming 😀😀😀

  • @Benny3939
    @Benny3939 4 ปีที่แล้ว

    Really great video for explaining multithreading vs multiprocessing. Thank you!

  • @ankit_aanand
    @ankit_aanand 6 ปีที่แล้ว +2

    Thank you 😊 sir for making video on this topic !!!

  • @TheSulross
    @TheSulross 4 ปีที่แล้ว +1

    In Linux, threads are treated like processes - the distinction being that threads belonging to a given process share the same page mapping tables and permissions on the same set of kernel resources, such as file handles. In some OS, like Windows, the kernel has a more pronounced different treatment (in respect to the data structures associated to these) between a process and a thread - but a process inherently has a least one thread associated to it.

  • @cw5948
    @cw5948 4 ปีที่แล้ว

    Best video I’ve seen on the subject!

  • @momenmostfa8298
    @momenmostfa8298 4 ปีที่แล้ว

    thank you for your videos it help me a lot with my study as i'm in computer science faculty and i'm studying right now subject calles operating system and your videos are helping a lot so thank you for you effort

  • @tonifasth
    @tonifasth 6 ปีที่แล้ว

    Very well explained and demonstrated.

  • @warkingiv1199
    @warkingiv1199 2 ปีที่แล้ว

    Thank you master, good explanation. You helped me a lot.

  • @suyashneelambugg
    @suyashneelambugg 4 ปีที่แล้ว +1

    I think you inferred in summary that when the shared resource is a single core it's multi-tasking as it's time-slicing two appear as multi-processing. Whereas when there are 4 cores, the resources are more and it is actually dividing the resources to run the process and therefore it is multi processing. If i'm wrong then you can explain if there can be a multi-tasking example for quad core using two windows.

  • @tetonicsheldor
    @tetonicsheldor 4 ปีที่แล้ว

    Thank you so much for speaking clear English.

  • @Shuvooa
    @Shuvooa 4 ปีที่แล้ว +1

    Very Informative video

  • @KingEbolt
    @KingEbolt 6 ปีที่แล้ว

    Really Interesting video from you today Professor! Coincidentally when you released this video I was working on learning multithreading in Java with the Thread class. I didn't know it could have such a large effect on performance.

  • @chrisshyi8999
    @chrisshyi8999 6 ปีที่แล้ว +1

    Brilliant video!

  • @sydneysights8697
    @sydneysights8697 2 ปีที่แล้ว +1

    Very clear

  • @jagardina
    @jagardina 6 ปีที่แล้ว

    That was good. When I learned about Unix internals, they didn't talk about multi-threaded much. It was not really a thing at the time. Well done.
    Would be interested in a tutorial about how Linux does multi-tasking and multi-processing. How does the processor assign tasks to cores, which process is next to run, etc... I know Unix/Linux has a concept of priorities, round-robin fairness algorithms, etc.. Handling the threads on a multi-core processor must be tricky.

  • @supersu6138
    @supersu6138 6 ปีที่แล้ว +1

    Well Explained sir !!

  • @gilong1311
    @gilong1311 3 ปีที่แล้ว

    Raspberry pi example helped a lot, thanks!

  • @aayushmanmishra1425
    @aayushmanmishra1425 ปีที่แล้ว

    Great explanation!!

  • @TheCreative1798
    @TheCreative1798 4 ปีที่แล้ว

    It is sooo good to hear non-hindu guy explaining things in English. THANK YOU SO MUCH!

  • @1MarkKeller
    @1MarkKeller 6 ปีที่แล้ว +3

    *GARY!!!*
    *Good Morning Professor!!!*
    *I got a video on/for my birthday!*

    • @GaryExplains
      @GaryExplains  6 ปีที่แล้ว +4

      MARK!!!
      Happy Birthday

    • @ZamanSiddiqui
      @ZamanSiddiqui 6 ปีที่แล้ว +2

      Mark Keller Happy Birthday, Mark. 🎉

    • @uttamchandra9726
      @uttamchandra9726 6 ปีที่แล้ว +2

      Very happy birthday mark!!!! Have a great one!!!!

    • @1MarkKeller
      @1MarkKeller 4 ปีที่แล้ว +1

      @@ZamanSiddiqui *ZAMAN SIDDIQUI!* Thanks!

    • @1MarkKeller
      @1MarkKeller 4 ปีที่แล้ว

      @@uttamchandra9726 *ROBBY CHANDRA!* Thanks!

  • @bazoo513
    @bazoo513 2 ปีที่แล้ว

    0:45 - The difference between people and processors doing "multitasking" is that the latter do context switch much faster 😀

  • @SameerKhan-ht4mx
    @SameerKhan-ht4mx 6 ปีที่แล้ว

    Really nice demo

  • @suvetar
    @suvetar 5 ปีที่แล้ว

    Great video Gary, I for one would love to see another video drilling into multitasking, the difference between pre-emptive and co-operative multitasking - but more specifically *how* it happens, I know the task-scheduler runs in a lower ring in modern CPUs, but how did this manage this on old CPUs, how does it stop the operation of one task, save it's state and continue with another? What impact does this have on complicated computations that for example might be in the middle of a complex branch prediction stage? The task scheduler has to save state and presumably do something to the Cpu to stall or complete its instruction pipeline. I think I understand it in a technical fashion but I couldn't explain it to someone, so I'd love your delicate touch on this complex subject!
    Thanks again for sharing this video :)

  • @seyedmohammadhosseini5793
    @seyedmohammadhosseini5793 3 ปีที่แล้ว

    Great example! Thank U!!!

  • @akaappleboy
    @akaappleboy 6 ปีที่แล้ว +1

    Great Video Sir!!!!!

  • @lilmsgs
    @lilmsgs 3 ปีที่แล้ว +1

    When I was young in the computer industry, multi-threading was called, parallel processing (multiple processors vs multi-core). Did that term just fade away?
    AND on a slightly different note:
    Coding programs for a parallel processing machine was a real chore.
    How did multi-threading enter into the multi-core world (ostensibly, parallel processing) with apparent, relative ease?

    • @KatharsasOfficial
      @KatharsasOfficial 3 ปีที่แล้ว

      I can only draw a picture of the software side of things.
      Multi-threading specifically refers to using OS-threads inside a single process. And generally it implies using the exact same programming languages that you would use for single-threaded programs, but requires using some additional language features and libraries. I think part of the answer is that writing correct multithreaded code at the lowest possible abstraction level (and even at higher levels) is still really hard.
      However, quite a bit of abstractions have been created above the actual CPU instructions, memory fences and differences between kernel and user space calls. These low-level things are hidden, but they are the basis of the synchronisation primitives needed by a normal developer writing multi-threaded code. Some examples for the provided abstractions:
      - Mutexes as an API to effectively lock/unlock sections of code to a single thread at a time, effecitley synchronising access to memory shared by multiple threads
      - Atomic data types that automatically synchronize any mutation so that data races cannot happen on them
      - Multithreading-aware datastructures (Hashmaps etc.) that can be used from multiple threads concurrently without issue and hide the necessary synchronization in their implementation
      - Library functions for creating thread-pools that automatically spin up/down threads as needed based on the amount of load put onto the pool
      - Ways of easily passing functions and retrieving results to those thread-pools
      - Various APIs for making error handling easier in the context of concurrent code execution
      - Frameworks that itself are implemented with multiple threads, but the entry-point for the developer is inside a single threaded context, so the framework user does not have to deal with the underlying multi-threadedness
      - Libraries hiding parallel execution happening in called library functions from the developer
      - APIs that allow developers to send data between threads without relying on directly sharing memory between threads (see channels in Go)
      - The Future/Promise/Async abstraction which allows you to replace direct function results with a promise of a future result in a large-scale way all across any code you write, allowing any called code to actually defer long-running tasks to other threads and then returning immediately to the caller with a promise instead of a result. The caller can then decide to add further code to be executed once the promise is fulfilled, and return with a promise of its own (which includes the additional code having been exexuted). So you can easily define that parts of your code are dependent on the result of a computation without defining the details of when and in which thread your code will actually run. Instead, a library providing an "async executor" runs your code concurrently.
      And last but not least, there is still simply a lot single-threaded code. Any Javascript or Python program is very likely single-threaded. But a lot of work has gone into making it easier for the developer into actually and correctly writing multi-threaded code, and it is still ongoing.

  • @shubhamc183
    @shubhamc183 4 ปีที่แล้ว

    Best explanation ever!!

  • @taher9358
    @taher9358 4 ปีที่แล้ว

    Hi Gary thanks for breaking tthese down for lay men like me. Very educationl and a top lad cheers

  • @pepaokurka3892
    @pepaokurka3892 4 ปีที่แล้ว +1

    Really helpful! Thank you :)

  • @AtomFreeFaller
    @AtomFreeFaller ปีที่แล้ว

    Incredible Scenes

  • @buddhimachamaranga1203
    @buddhimachamaranga1203 6 ปีที่แล้ว +1

    good video.

  • @raphaelcazenave-leveque7991
    @raphaelcazenave-leveque7991 2 หลายเดือนก่อน

    Good explanation

  • @natekwezi9242
    @natekwezi9242 3 ปีที่แล้ว

    Garry is the 🐐

  • @crossthreadaeroindustries8554
    @crossthreadaeroindustries8554 5 ปีที่แล้ว

    Great share, good examples.

  • @alirezamiri929
    @alirezamiri929 6 ปีที่แล้ว +1

    Very good video

  • @prathamovalekar
    @prathamovalekar 6 ปีที่แล้ว +2

    Real Time Operating Systems please!

  • @denisela3403
    @denisela3403 6 ปีที่แล้ว +1

    THANK YOU!!!

  • @aryangurung1557
    @aryangurung1557 3 ปีที่แล้ว

    God bless you sir and Thank you

  • @albinmaccarthy7367
    @albinmaccarthy7367 6 ปีที่แล้ว

    Gary please do a video on multitasking

  • @リンゴ酢-b8g
    @リンゴ酢-b8g 2 ปีที่แล้ว

    note to self: adding more threads plays heck with the idea of performance gain

  • @wadehelquist3182
    @wadehelquist3182 ปีที่แล้ว

    AI explains it simply:
    Imagine you have a big project to work on, like building a Lego city. There are different ways you can approach it to get things done faster and more efficiently.
    One way is multitasking. It's like doing multiple tasks at the same time. For example, while building the Lego houses, you can also be painting the streets or adding trees. You're working on different parts of the project simultaneously, which saves you time and makes the whole process more efficient.
    Another way is multithreading. Imagine you have a team of friends helping you build the Lego city. Each friend can focus on a specific task, like one friend building houses, another friend working on the roads, and so on. This way, everyone is working on their own part simultaneously, and the project progresses faster because different tasks are being done at the same time.
    Lastly, we have multiprocessing. It's like having multiple teams of friends building different parts of the Lego city at the same time. Each team can work on their own section independently, like one team building the houses, another team working on the parks, and so on. This way, the entire city is getting built faster because multiple groups are working on different parts simultaneously.
    So, to summarize, multitasking is doing multiple tasks at the same time, like working on different parts of a project simultaneously. Multithreading is having a team of friends each focusing on a specific task, making progress faster. Lastly, multiprocessing is like having multiple teams working on different parts of a project simultaneously, speeding up the overall progress.

  • @the-real-i9
    @the-real-i9 3 ปีที่แล้ว

    I love this!

  • @DonckIT
    @DonckIT 6 ปีที่แล้ว +7

    Can you make a video about memory page algorithme ( eg : working set, LRU, FIFO ... )?

  • @MarkBekooy
    @MarkBekooy 6 ปีที่แล้ว

    Nicely explained! Still wondering what music is played

  • @NewsSphereNetwork
    @NewsSphereNetwork 4 ปีที่แล้ว

    Helpful, thank you

  • @mimischly2547
    @mimischly2547 2 ปีที่แล้ว

    Real nice sir thank you

  • @mohammedk.h.f3016
    @mohammedk.h.f3016 2 ปีที่แล้ว

    Thank you

  • @gabrielmaguire
    @gabrielmaguire 4 ปีที่แล้ว

    Beautiful thank you!

  • @basantapoudel4695
    @basantapoudel4695 6 ปีที่แล้ว

    Nice explation. Could you please also explain how these three terms can be viewed in multiple processor computer scenário ? Thank you.

  • @OleksiiGVS
    @OleksiiGVS 6 ปีที่แล้ว +1

    What is better: 6 cores/12 threads? or 8 cores/8 threads?

  • @uttamchandra9726
    @uttamchandra9726 6 ปีที่แล้ว

    Hiiii hello !!!!! A very good afternoon professor !!!!!! Sorry for the late wishes !!!!!

  • @arinoba492
    @arinoba492 2 ปีที่แล้ว

    So a quad core actually does multiprocessing when you ask for threading, if it can?

  • @aravindraj5792
    @aravindraj5792 6 ปีที่แล้ว +1

    Nice video sir. Can you explain hyper-threading? Is it same as multi- threading?

    • @GaryExplains
      @GaryExplains  6 ปีที่แล้ว +3

      Hyper-threading is a hardware technology to try to improve overall performance by making a CPU look like it has more CPU cores than it really does. If you think it is worth while I can add that to my TODO list.

    • @aravindraj5792
      @aravindraj5792 6 ปีที่แล้ว +2

      Gary Explains Make a video on it if possible. Thanks for the reply.

    • @gr3473
      @gr3473 6 ปีที่แล้ว

      It will be interesting to see if it really works and how much faster is i7 compared to i5 with the same number of cores but more threats.

  • @_Digitalguy
    @_Digitalguy 6 ปีที่แล้ว

    One more vote for a multitasking video!!

  • @suryaajha5953
    @suryaajha5953 5 ปีที่แล้ว

    This was tooooooooooo goood

  • @ADITISHASTRI-i5h
    @ADITISHASTRI-i5h หลายเดือนก่อน

    thanks

  • @arminharper510
    @arminharper510 4 ปีที่แล้ว

    Now it seems like the new version of C++ is going to be all about asynchronous functions and multi tasking/threading/Processing and it makes sense since now even Smartphones and smartwatches are switching to multicore CPUs.

  • @toumakoushik31416
    @toumakoushik31416 6 ปีที่แล้ว

    Need a video about multitasking

  • @gandamrx
    @gandamrx 5 ปีที่แล้ว

    Will you have any plan of doing Gary Explains on GPU processing and parallelization.
    Thank you.

  • @dipendrainfo
    @dipendrainfo 6 ปีที่แล้ว

    Please tell us about LPDDR5 ram, and whats the different??

  • @muhammedadiljahfar5512
    @muhammedadiljahfar5512 6 ปีที่แล้ว +1

    Oh Yeah!! 260th view
    Prof.Gary is there a particular direction in which the channel is heading bcos I feel it is random but great videos at times

    • @GaryExplains
      @GaryExplains  6 ปีที่แล้ว +2

      What you say random, I say wide. It is all tech based, I won't be being fashion videos or skateboarding videos. It is just tech and tech is big.

    • @muhammedadiljahfar5512
      @muhammedadiljahfar5512 6 ปีที่แล้ว +1

      Gary Explains Prof.Gary I didn't mean to insult you or the channel or anything ...I was just wondering...I wholeheartedly love your videos... please don't misunderstand for that was not my intention

    • @GaryExplains
      @GaryExplains  6 ปีที่แล้ว +1

      LOL, no problem, I wasn't insulted. Do you like the "wide" approach, with me covering lots of areas?

    • @muhammedadiljahfar5512
      @muhammedadiljahfar5512 6 ปีที่แล้ว +2

      Gary Explains of course...as long there is a Gary Explains video I always watch it

  • @hukeskypotter5149
    @hukeskypotter5149 6 ปีที่แล้ว

    ✅ I am surprised how I didn’t find your channel till yesterday

  • @Jay-sq3ge
    @Jay-sq3ge 5 ปีที่แล้ว

    Prof I want your vids on os

  • @BasavarajuBV
    @BasavarajuBV 6 ปีที่แล้ว

    Denotation is good. 👍🏽

  • @arkadianriver
    @arkadianriver 6 ปีที่แล้ว +2

    This was a great comparison except I feel sad for the single core multi-thread, because you were showing a CPU-intensive process. Multi-threading can be very beneficial even on a single core if your threads are waiting for other things besides time to share the single core, such as sending out 10 requests to download different files is much better than sending out 1 request at a time, since you're having to wait for the network.

  • @paullawrence7275
    @paullawrence7275 10 หลายเดือนก่อน

    How is it that a program has multiple processes, each process executing the same program, if the program has to be executed sequentially? And the same question for multi-threading?

    • @GaryExplains
      @GaryExplains  10 หลายเดือนก่อน

      Programs can be written so that they aren't executed sequentially. Think of a web server, it can start a new thread for each request that it receives.

  • @abhishekgupta-yh2vn
    @abhishekgupta-yh2vn 6 ปีที่แล้ว

    Hi Gary.Thanks for such a great video. Also,it would be great if you could share the multi-threading code

    • @GaryExplains
      @GaryExplains  6 ปีที่แล้ว

      I have already, it is up on my GitHub: github.com/garyexplains/examples

  • @tsmupdatertsm7633
    @tsmupdatertsm7633 5 ปีที่แล้ว

    What is the difference between a Application(Programm) and a Process ? What defines a Process ?

    • @ashishjha9262
      @ashishjha9262 5 ปีที่แล้ว

      Application resides on hard disk. When you execute an application by double clicking on application shortcut icon, you direct your OS to bring that application from hard disk to RAM and execute it. Now your program/ application is process.
      In short, program in execution is process.

  • @shashankshekhar8970
    @shashankshekhar8970 4 ปีที่แล้ว

    In case of threading on a 4core machine, shouldn't GIL have restricted the execution to only one thread at a time since these are CPU intensive operations?

    • @GaryExplains
      @GaryExplains  4 ปีที่แล้ว

      Are you referring to Python's GIL?

    • @shashankshekhar8970
      @shashankshekhar8970 4 ปีที่แล้ว

      @@GaryExplains yes, I meant the Python GIL. Since GIL restricts only one CPU based thread to execute at a time how was the program able to make use of all the 4cores?
      Am i missing something here

    • @GaryExplains
      @GaryExplains  4 ปีที่แล้ว

      @@shashankshekhar8970 The test programs that I used aren't written in Python.

  • @xeonrafi
    @xeonrafi 3 ปีที่แล้ว

    Hi Gary, can you please share the demo code (prime number calculation) of the video? I want to test the same benchmark for pi-4. Thanks.

    • @GaryExplains
      @GaryExplains  3 ปีที่แล้ว

      It is in my GitHub repo. Just Google "garyexplains GitHub"