Тёмный

CPU Bound vs. I/O Bound | Computer Basics 

Dave Xiang
Подписаться 67 тыс.
Просмотров 25 тыс.
50% 1

Наука

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 73   
@jamesrollins5597
@jamesrollins5597 7 лет назад
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.
@DaveXiang
@DaveXiang 7 лет назад
Thank you for this comment, means a lot. Take care
@faisalsaddique3323
@faisalsaddique3323 Год назад
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.
@igor_roslyakov
@igor_roslyakov 3 месяца назад
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!
@jennwng
@jennwng Год назад
Great video! And I love how you used analogy, and linked the analogy back to the technical concepts. Very helpful video. Thanks :)
@Sugarcane712
@Sugarcane712 6 лет назад
Thank you for this! The chef analogy helped me better understand this!
@Kyle906-Q8
@Kyle906-Q8 7 лет назад
you don't know how much i appreciate your vids❤❤
@orion-n
@orion-n 2 года назад
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.
@ישראליעקובוביץ
@ישראליעקובוביץ 2 года назад
not many talented people are also good teachers and thats a shame. but you are really good man
@lewisw.1766
@lewisw.1766 5 лет назад
Very well done Dave. Thank you. It did help with you laying down the foundation before getting to the important things.
@TheAngelina79
@TheAngelina79 5 лет назад
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
@Zerobit13
@Zerobit13 7 лет назад
Your videos are pretty interesting!!! Keep the good work. I like the way you do things, reading your notes with you is quite nice.
@danielfrendmonkey
@danielfrendmonkey 3 года назад
I love your explanation regarding IO bound & CPU bound, by any chance do you have the answers for the questions u created.
@nikhilsahni8006
@nikhilsahni8006 2 года назад
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
@davidmares6053
@davidmares6053 7 лет назад
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
@Cheveuxes
@Cheveuxes Год назад
Merci pour tes explications !!!
@doremon2611
@doremon2611 4 года назад
You are an excellent teacher! Thanks!
@rohitmittal5372
@rohitmittal5372 7 лет назад
You are always too good with your videos Dave!!
@char7605
@char7605 5 лет назад
I love your chef analogy so much lol. Thank you for these amazing vids!!
@felipersa3809
@felipersa3809 2 года назад
what a great explanation! thanks
@eleonoravasylenko7094
@eleonoravasylenko7094 3 года назад
Thank you for your video! Great explanation! You helped me understand the concept, thanks a lot!
@yuanyuan7005
@yuanyuan7005 3 года назад
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.
@conintava514
@conintava514 5 лет назад
Your explanations are so clear. Keep it up!
@justinlang1205
@justinlang1205 2 года назад
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.
@TheTechnicalman
@TheTechnicalman 4 года назад
13:58 ---> correlate to memory subsystem.
@aniltheblogger
@aniltheblogger 7 лет назад
An very important concept explained very clearly. Thanks for this video
@vidsclips8358
@vidsclips8358 4 года назад
thank you so much ...you are awesome
@nonthpatwongkham9775
@nonthpatwongkham9775 3 года назад
Good explaination and example.
@irakli.asatiani
@irakli.asatiani 2 года назад
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
@ameynaik2743
@ameynaik2743 2 года назад
Great video, could you please share Why did you move from low level SW stack (Qualcomm) to more distributed systems SW job?
@emmanueltorty4402
@emmanueltorty4402 3 года назад
Beefy Chef w/ Multiple Arms makes me think of Goro ( Mortal Kombat ) dressed as a chef cooking in the kitchen for Shao Khan ...lol
@WakeupTribe
@WakeupTribe 5 лет назад
This is awesome, thank you sooo much!
@faycalsaid702
@faycalsaid702 3 года назад
Thank's bro ! super clear
@bouabdellahlamani7986
@bouabdellahlamani7986 2 года назад
Great !
@chilldude1337
@chilldude1337 3 года назад
Thanks for explanation!
@Rhyto
@Rhyto 3 года назад
So basically... I/O Bound = Social Media Sites/Stock Websites (APIs) CPU Bound = Entertainment (Video Games, Downloaded Software) Just wanted to make sure...
@damon09273
@damon09273 6 лет назад
It's super helpful, thank you very much.
@dorkstarx
@dorkstarx 7 лет назад
Thanks keep it up man!
@ahmedboutaraa8771
@ahmedboutaraa8771 4 года назад
the best at all times
@gouthaml895
@gouthaml895 6 лет назад
Answers to that questions ?
@cinquain0
@cinquain0 5 лет назад
That was a great tutorial
@MikiMichaeli
@MikiMichaeli 7 месяцев назад
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
@bestmodels1959
@bestmodels1959 7 лет назад
I have a question. Can you become a good software engineer being self taught vs being at collage?
@zhoualias5481
@zhoualias5481 2 года назад
Why python need compile
@ImagineAIChannel24
@ImagineAIChannel24 3 года назад
Still looking forward for the answeres of last 5 questions. especially nr 1 and nr 5 thanks in advance
@tonionyinloye7424
@tonionyinloye7424 7 лет назад
Why did you delete your last video about your feelings on government? I found it really interesting.
@DaveXiang
@DaveXiang 7 лет назад
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
@BladeAurora
@BladeAurora 7 лет назад
Why not make it unlisted and put it in a playlist? I'm interested in hearing your thoughts.
@busyrand
@busyrand 7 лет назад
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.
@bestmodels1959
@bestmodels1959 7 лет назад
Do you think C# is a good language to learn? Can you please give me your opinion on C#?
@DaveXiang
@DaveXiang 7 лет назад
I think C# is a good language to learn.
@elonmusk3581
@elonmusk3581 7 лет назад
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?
@DaveXiang
@DaveXiang 7 лет назад
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
@elonmusk3581
@elonmusk3581 7 лет назад
No problem, Tesla will always have an job opening for you!
@tuananhlam90
@tuananhlam90 7 лет назад
Can you post solutions to your discussion questions at the end so we can compare our answers?
@DaveXiang
@DaveXiang 7 лет назад
Hey! Thanks for watching the video that far. Can you post your answers first then I'll post mine?
@abrarahmed7549
@abrarahmed7549 4 года назад
thankyou
@devenadajania1518
@devenadajania1518 7 лет назад
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
@MewMew811
@MewMew811 Год назад
the constant clicking is driving me crazy
@mrnarason
@mrnarason 7 лет назад
Quantum computers would achieve that parallelism in truth #2.
@DaveXiang
@DaveXiang 7 лет назад
things will get crazy
@DancePartyAttack
@DancePartyAttack 5 лет назад
Took me 13 min to realize he was saying io/cpu limited and not "headed for the" io/cpu
@quocboy159
@quocboy159 6 лет назад
so, when read file, this operation belong to I/O bound, right?
@DaveXiang
@DaveXiang 6 лет назад
Yes
@prasannasilva5519
@prasannasilva5519 6 лет назад
Pls use slides.
@SuperLiyanaarachchi
@SuperLiyanaarachchi 6 лет назад
you save me ..!
@vasishta6665
@vasishta6665 7 лет назад
I/O means "Input/Output". I didn't get that in the video.
@DaveXiang
@DaveXiang 7 лет назад
You didn't understand what Input/Output means? Or you didn't understand the acronym?
@vasishta6665
@vasishta6665 7 лет назад
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.
@DaveXiang
@DaveXiang 7 лет назад
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.
@ahmedsehic9019
@ahmedsehic9019 6 лет назад
Stop clicking so much it annoys the viewer, other wise good vid
@henrylenzi4225
@henrylenzi4225 3 года назад
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.
@bibekkoirala2517
@bibekkoirala2517 4 года назад
Too long video for such simple topic.
Далее
Numbers Everyone Should Know
15:00
Просмотров 6 тыс.
Your CPU May be FASTER than You Think
12:00
Просмотров 135 тыс.
КОГДА НАКРОШИЛ НА ПОЛ #shorts
00:19
Просмотров 855 тыс.
What Is Virtual Memory?
8:03
Просмотров 21 тыс.
The Value of Source Code
17:46
Просмотров 52 тыс.
How Branch Prediction Works in CPUs - Computerphile
25:57
Web Architecture Basics
15:23
Просмотров 232 тыс.
Operating System Basics
23:16
Просмотров 665 тыс.
Here's what Bottlenecking REALLY looks like!
15:10
Просмотров 3,2 млн