I never usually comment on videos for whatever reason but, I felt the need to say thank you for what you are doing. I find that you explain things very well and are easy to listen and pay attention to, at least for me. also I like the way you explain a lot of the important building blocks to bigger ideas that all to often get left out. anyway, pay no attention to the trolls, you're doing great.
Repeating the comment from James Rollins: I never usually comment on videos for whatever reason but, I felt the need to say thank you for what you are doing. I find that you explain things very well and are easy to listen and pay attention to, at least for me. also I like the way you explain a lot of the important building blocks to bigger ideas that all to often get left out. anyway, pay no attention to the trolls, you're doing great.
this is an awesome video, thank you! I’m writing a simple article about what asynchronous programming is, your work helped a lot. things have become clearer!
The chef is actually a really good analogy as i’m actually a Teppanyaki chef part time and it makes perfect sense. IO bound is sort of like the server and customer. Even with the most efficient method of cooking / prep there is a set limit to the amount of time that a customer takes to order. The only efficient method is to have one server for multiple tables or multiple servers for multiple tables. So using threading in which the overhead time it takes the customer to order is not relevant. CPU bound is sort of like the speed of the chef and the table once everything is prepared. The chefs then use multiprocessing to cook food for multiple tables at the same time as we know what every customer has already ordered and the only way to increase the speed at which we serve everyone is the skill of the chef or the number of chefs.
Thank you! I'm currently taking introductory e-commerce and the only explanation in the textbook for " I/O intensive means it requires input/ output (I/O) operations rather than heavy-duty processing power. " which left me scratching my head
My answers as per my understanding. I am new to this concept. I would appreciate if you could respond. 1. It depends on what is more important at any given time. Let's say there is a CPU bound program which has a dependency on an I/O bound program then I/O bound should get the higher priority. However, if the programs have no dependency then i belive the priority should be given to CPU bound tasks because chef would prefer finishing up things at first that are in his control. 2. All 4 threads 3. I am not sure about this one. If by assigning one more thread to a process, the process becomes faster then it is scheduler knows that it is CPU boud otherwise it is not 4. Process that takes lot of RAM 5.All 8 threads should work on solving the math (CPU bound task) one after the other and then once all math is done then focus on IO bound task that is storing on disk Not sure how correct I am but would to hear from everyone and Dave
Awesome video Dave, THANK YOU i love the analogy of the chef, and i think analogies and practical examples from the real world are mental tools that not alot of educators or students use
Thanks Dave! Below is my answer to the questions. If anyone find a mistaken part or want to discuss, please just comment: 1. Combine to run I/O bound and CPU bound together. 2. I can run thousands of threads on the system, but only 4 simultaneously. 3. checking CPU usage, DISK usage 4. a situation in which the time to complete a give computational problem is decided primarily by the amount of memory required to hold that data. 5. I don't have a good answer. Looks like can run 2 objects in parallel, and it is better if I match the implementation time.
Very clear and well explanation of the subject. Thank you so much. I understand the different between CPU bound and IO bound much better now. Can you give some examples of the network routers and switches CPU bound traffic? I am thinking some traffic like tcp, protocols, etc that the CPU has to process but not sure. Thanks for providing the video again.
Actually kernel can do task per thread in a time, so for example if you have 4 cores, it means simultaneously it handles 4 operation in a time, switching between threads via scheduler is the story of concurrency, but if you have only single core then it would be true, it has no chance to perform in other way than do one task in a time hence if you have 1500 threads running it gonna constantly switch between them
So basically... I/O Bound = Social Media Sites/Stock Websites (APIs) CPU Bound = Entertainment (Video Games, Downloaded Software) Just wanted to make sure...
My answers to the questions. Would love for you to comment your own answers as well. 1. Start with io bound and once they get idle switch to cpu bound to try and do work while the io threads are waiting 2. Just 4 threads - avoiding context switching and using 100% of cpu. 3. If it's a self controlled schedueler like in go - a dependency graph with pre compiled decisions can help. But usually it's the os conteolling the threads so it would probably prioritise according to the threads state and how much idle time the cpu has qhwn the thread is executed. If 50% of the time the thread gets the cpu it just waits for other instrutions like disk/network, it is io bound. 4. When you need to process large amounts of data you can rarely load it all in memory. The solution is usually to read the file in chunks, calculate some of the data, and keep going until all chunks are done. Thw more memory you have, the less chunks you need, ao the the program is faster. If you have less memory, you'll have to load data in more chunks, so the program is usually slower. 5. Take 7 threads to compute the math problem and 1 to write the results of each object. You can't write to a file in parallel anyway, so do what you can fast and then just pass the data to the writing thread. The other 7 threads will be released back to the os when they are done and the writing thread would eventually finish the work last. If you were to use 8 threads to do everyrhing, they would all compete with each other on the shared resource (the disk). Of course modern drives havw the ability to do concurrent writes but that's regardless of the question right now and very tricky to write a program for
I think it was probably semi-offensive to some people. I didn't mean to get too political, but I think that's what happened. If you wanna chat about it, hit me up davex.inc@gmail.com
I was too late to check it out, but was very curious what Dave's perspective was on the issue. As long as a person can spell their ideas out, I never get offended... But most people aren't that way, so I see why the video probably needed to come down so as not to have people make arguments based upon how they feel. Great content on this video too.
Do you think Javascript has the possibility to become a universal programming language? Its already used in the front-end intensively. Node.js is rising in popularity as months go by for the backend. Meteor and Native Script allow you to build iOS and Android apps with Javascript or any of its frameworks like angular. Thoughts?
I think it will stay as the most popular, but I don't think any language (not knocking JS) can become "universal". Just because it's possible doesn't mean people will adopt it. You can write a web app in C++, but no one does it. In the end, everyone's gonna have their opinion, their favorite language, their favorite tools and frameworks and I doubt any 1 thing can be universal. I do think JS will dominate though just because of the Internet. Also, thanks for building Tesla
Hello dave i just wanted to ask a question I am in grade 11 and I want to be a software engineer what classes should I take and is software engineering hard or any tips because I signed up for programming class but its all full idk what to do now
Now with this, understood very well.I didn't know the acronym. I liked the way you explained (chef example). I assumed that abbrevation's will be explained since it was mentioned for beginner's in the title. Good job! Im new to this stuff.
ok cool, thanks. Yea "I/O" can mean a lot in this case. I'm almost using it as any kind of processing that doesn't depend on the CPU. So input could be a process waiting for a user to type in keys, output could be writing to disk. Even more abstractly, input could be waiting for "getting" a network response or output could be even be "posting" a network response.
Don't - do not - not ever, ever, ever - do a presentation by putting your document on the screen. You're reading for yourself, not for us. This is a no-no in presentations.