Vault sync: 2022-01-26 13:54:31
This commit is contained in:
parent
33d63a1a45
commit
0c3af947ec
@ -42,5 +42,19 @@ Were waiting a lot on IO time to finish, very inefficient. We can solve this usi
|
|||||||
# Multitasking
|
# Multitasking
|
||||||
To speed up computers we overlap CPU time and IO Time.
|
To speed up computers we overlap CPU time and IO Time.
|
||||||
|
|
||||||
While a program waits for IO, o
|
While a program waits for IO, other programs can use CPU. This solution requires multiple programs to be loaded into memory, hence the name multitasking.
|
||||||
|
|
||||||
|
Multitasking overlaps IO time of a program with CPU time of other program.
|
||||||
|
|
||||||
|
## Multitasking with multiple processors
|
||||||
|
If computer has a single CPU, programs should take turns in using it.
|
||||||
|
|
||||||
|
If computer has multiple CPUS, each task can be given a different CPU.
|
||||||
|
- If the number of tasks is more than available cpu's, we still take turns.
|
||||||
|
|
||||||
|
when program issues IO command, cpu is granted to the next program.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user