I/O Bound vs CPU Bound
Explore the distinctions between CPU bound and I/O bound programs to understand their resource demands. Learn how multithreading and concurrency improve performance by efficiently managing CPU and I/O operations. This lesson lays the foundation for optimizing Python programs in senior engineering interviews.
We'll cover the following...
I/O Bound vs CPU Bound
We write programs to solve problems. Programs utilize various resources of the computer systems on which they run. For instance a program running on your machine will broadly require:
CPU Time
Memory
Networking Resources
Disk Storage
Depending on what a program does, it can require heavier use of one or more resources. For instance, a program that loads gigabytes of data from storage into main memory would hog the main memory of the machine it runs on. Another can be writing several gigabytes to permanent storage, requiring abnormally high disk I/O.
CPU Bound
Programs which are ...