I did pass an aptitude test for a job as a "programmer" in the 70's but decided to stay as a radio comms engineer with the post office. All of my coding has been self taught and I do enjoy a bit of code writing but not going beyond VB, Python and some scratch with my grandchildren. I always find your videos so interesting and learn a load of stuff which I'm unlikely to use in my 70+ year old life. I still dip into your videos on encryption as they are undoubtedly the best out there.
Although it may date me -- "Thorin...": The Hobbit. "time passes": Zork I I remember my first exposure to forking years ago when modifying some "C" code to prevent zombies which are orphan children processes. Thank you for your videos. Always a treat to watch.
I have seen so much drumming up about "async" and whatnot, but it always kept me thinking whether it is true multi-tasking or just one core switching too and fro between one execution context to the next. I've always felt that threads was always the way to go because you're not locking execution to specific cores, and the workload scales better the more available cores there are. Yeah, sure, it's harder when race conditions come into play, but, if you have the cores, best put them to work and not have them being couch potatoes. Great video, Gary!
Async is more akin to cooperative multitasking. For workloads that are not CPU intensive or are IO heavy, it can be more efficient. A threaded solution has a lot of overhead if it's spending the majority of its time blocking on IO. Many web applications scale quite well using async when the majority of the processing time is spent essentially stalled waiting for external cache, databases or other external resources. Async can also work well in conjunction with threading. Can await on multiple threaded tasks to complete on the main thread while servicing other requests that may not require an entire thread.
Before going much farther with threading, you should go over the synchronization primitives like semaphores and mutexes, and also cover thread scheduling priority.
I wish you can cover more educational topics in future as you have an extraordinary experience in Computer Science field this would help students like me, who wanna study higher level topis in much detail.
OK- I'll play the game: The Hobbit according to Jackson, Part 3. Maybe that's different to the book, which I haven't read. This is very interesting - I don't know anything about C and I'm not about to do any multi - core programming, but at least I now have a vague idea of what it's about
I am glad you found it useful. I cover multi core microcontroller programming here ruclips.net/video/w5YigjvSaF4/видео.html and in my video about programming the Pico in C, plus of course my videos about Piccolo OS
@@GaryExplains ah, sorry, I saw video you mentioned, in the end you mentioned to comment if we want to see more videos about multicore programming - so I commented of course) I just started browsing your other videos looking for it and ended up here. So sorry, I meant to comment on video you mentioned actually)
You might like my video "Multitasking vs Multithreading vs Multiprocessing" it should help answer that question - ruclips.net/video/Tn0u-IIBmtc/видео.html
Thanks @@GaryExplains ... that was enlightening. Only other thing in testing to figure out is how to intentionally run different tasks in one program, on different cores. I can't do this on embedded devices, but it's there a way to tell day and i5 to use a separate core for a specific task?
I did pass an aptitude test for a job as a "programmer" in the 70's but decided to stay as a radio comms engineer with the post office. All of my coding has been self taught and I do enjoy a bit of code writing but not going beyond VB, Python and some scratch with my grandchildren. I always find your videos so interesting and learn a load of stuff which I'm unlikely to use in my 70+ year old life. I still dip into your videos on encryption as they are undoubtedly the best out there.
so helpful for my operating systems class, thank you!
Glad it was helpful!
Although it may date me -- "Thorin...": The Hobbit. "time passes": Zork I
I remember my first exposure to forking years ago when modifying some "C" code to prevent zombies which are orphan children processes.
Thank you for your videos. Always a treat to watch.
I have seen so much drumming up about "async" and whatnot, but it always kept me thinking whether it is true multi-tasking or just one core switching too and fro between one execution context to the next.
I've always felt that threads was always the way to go because you're not locking execution to specific cores, and the workload scales better the more available cores there are. Yeah, sure, it's harder when race conditions come into play, but, if you have the cores, best put them to work and not have them being couch potatoes.
Great video, Gary!
Async is more akin to cooperative multitasking.
For workloads that are not CPU intensive or are IO heavy, it can be more efficient. A threaded solution has a lot of overhead if it's spending the majority of its time blocking on IO. Many web applications scale quite well using async when the majority of the processing time is spent essentially stalled waiting for external cache, databases or other external resources.
Async can also work well in conjunction with threading. Can await on multiple threaded tasks to complete on the main thread while servicing other requests that may not require an entire thread.
You might like my video on multitasking vs multiprocessing vs multithreading. It is linked in the description.
@@GaryExplains Ah, must have missed that one, thanks!
Go language implemented threads in an amazing way using channels, making race conditions a thing of the past!
@@justadude8716 Interesting comment because in my video on goroutines I show how you can easily create a race condition!
Great video. Thanks.
Glad you liked it!
Before going much farther with threading, you should go over the synchronization primitives like semaphores and mutexes, and also cover thread scheduling priority.
Of course. I have already covered that (in part) in my Arduino dual-core programming video. But I will do a specific video about it for this series.
I am going to type over that code. :)
Thanks so much!
Can you do a video on windows process creation and windows threads ?
It’s a bit different and most linux people don’t know how it functions.
Yes, if this video is well received then I will do more including looking at the Windows API.
Thanks!
I wish you can cover more educational topics in future as you have an extraordinary experience in Computer Science field this would help students like me, who wanna study higher level topis in much detail.
Thanks for the encouragement. Any particular topics you have in mind?
Topics realted to CUDA programming and High Performance Computing
Have you watched my "supercomputer" videos on this channel?
OK- I'll play the game: The Hobbit according to Jackson, Part 3. Maybe that's different to the book, which I haven't read. This is very interesting - I don't know anything about C and I'm not about to do any multi - core programming, but at least I now have a vague idea of what it's about
Good guess, but no! The quote is older than the movies.
Can you do a video on passing variables between processes/sharing variables(i.e. buffers) between threads? Some sort of interprocess communication
Indeed I will. I have also covered that in my Arduino dual-core programming video.
Thanks a lot! Would be great if you plan to make more multicore programming tutorials on actual mcu's like rp2040 or esp32!
I am glad you found it useful. I cover multi core microcontroller programming here ruclips.net/video/w5YigjvSaF4/видео.html and in my video about programming the Pico in C, plus of course my videos about Piccolo OS
@@GaryExplains ah, sorry, I saw video you mentioned, in the end you mentioned to comment if we want to see more videos about multicore programming - so I commented of course) I just started browsing your other videos looking for it and ended up here. So sorry, I meant to comment on video you mentioned actually)
Could you please suggest a book or any other resource to learn more about this topic? thanks :)
Gary, is it the game released 1982 for ZX Spectrum? Ported later to TRS-80, and others?
Yes!
Is there a correlation/connection with this and CPU cores and threads?
You might like my video "Multitasking vs Multithreading vs Multiprocessing" it should help answer that question - ruclips.net/video/Tn0u-IIBmtc/видео.html
Thanks @@GaryExplains ... that was enlightening. Only other thing in testing to figure out is how to intentionally run different tasks in one program, on different cores. I can't do this on embedded devices, but it's there a way to tell day and i5 to use a separate core for a specific task?
On line 48, why does i have to be casted with (* void)(long)?
Because the parameter to a thread is a void * pointer. Basically I convert the integer into a long and then pretend it is a pointer.
Hi Gary what happened to your speed test g channel, still hoping you could still test those new phones
Sadly it is on pause. It wasn't popular.
fork(2): call it once and it returns twice!
The Hobbit
👍😁
But not the book!
this is so boring
That's because you're not a real nerd. Get out of here!
🤣🤣🤣 twitter.com/garyexplains/status/1580196280361308160