Compare commits
2 Commits
9ae3834c41
...
00bf4325b0
Author | SHA1 | Date | |
---|---|---|---|
00bf4325b0 | |||
60fd19d5e2 |
@@ -4,4 +4,35 @@ Handles devices that allow the computer system to:
|
||||
* Communicate and interact with the outside world
|
||||
- Screen, keyboard, printer
|
||||
|
||||
* Store information
|
||||
* Store information
|
||||
|
||||
![[io-subsystem.png]]
|
||||
|
||||
# The Control unit
|
||||
Program stored in memory. (machine language in binary)
|
||||
|
||||
Task of control unit is to execute programs by:
|
||||
* Fetch: from memory the next instruction
|
||||
* Decode: instruction to determine what to do
|
||||
* Execute: issuing signals to ALU, memory and IO systems.
|
||||
|
||||
Repeats until HALT instruction.
|
||||
|
||||
# Typical Machine Instructions
|
||||
MOV: move data from a to b
|
||||
ADD: add numbers
|
||||
SUB: subtract numbers
|
||||
JMP: transfers program control flow to the indicated instruction
|
||||
|
||||
![[example-machine-lang.png]]
|
||||
|
||||
# CPU Time vs IO Time
|
||||
Total time required to run program is: CPU Time + IO Time
|
||||
|
||||
Typical time to read from IO: 20ms
|
||||
Typical time to run instruction: 20ns
|
||||
CPU can execute up to 200 million instructions while a block is read from a hard disk.
|
||||
|
||||
Conclusion: While I/O is executed, CPU is idling.
|
||||
|
||||
![[cpu-vs-io.png]]
|
||||
|
BIN
cpu-vs-io.png
Normal file
BIN
cpu-vs-io.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 268 KiB |
BIN
example-machine-lang.png
Normal file
BIN
example-machine-lang.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 KiB |
BIN
io-subsystem.png
Normal file
BIN
io-subsystem.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 137 KiB |
Reference in New Issue
Block a user