Week 5 Flashcards
(27 cards)
What does the CPU do with I/O devices?
The CPU sends/receives data to/from I/O devices.
What are input devices used for?
Set sensitivity, calibrate, switch on/off.
What are output devices used for? (examples)
Check readiness, verify success.
Where are I/O registers located?
Inside I/O devices, not the CPU.
How does the CPU access I/O registers?
Via memory-mapped I/O and port-mapped I/O.
What is memory-mapped I/O?
I/O registers mapped to special memory addresses.
What are the advantages of memory-mapped I/O?
- Simple; no new CPU instructions needed.
What are the disadvantages of memory-mapped I/O?
- Reduces addressable memory
- Risk of accidental access (program bugs).
What is port-mapped I/O?
Uses dedicated I/O instructions (e.g., Input, Output).
What is the difference between early and modern PC I/O methods?
Early PCs mixed both methods; modern systems prefer memory-mapped I/O.
What is the definition of a program?
A sequence of instructions.
What is the definition of a process?
A running program.
What is the lifespan of a program?
Long (stored until deleted).
What is the lifespan of a process?
Limited (ends when execution stops).
What is programmed (polling) I/O?
CPU periodically checks I/O device status.
What is the main disadvantage of programmed I/O?
CPU constantly busy (inefficient, high power usage).
What is interrupt-based I/O?
I/O device notifies CPU when ready (via hardware signal).
What happens during an interrupt in the CPU?
CPU pauses current task, runs interrupt handler.
What is Direct Memory Access (DMA)?
A dedicated controller handles memory transfers, bypassing CPU.
What are the advantages of DMA?
- Frees CPU for other tasks
- Faster bulk transfers.
What is an OS’s primary function?
Acts as an interface between hardware, programmers, and users.
What is the purpose of the OS kernel?
Core components include process, memory, and I/O management.
What does virtualization provide for each process?
Dedicated CPU, contiguous memory, exclusive hardware access.
What is the purpose of virtual memory?
Prevents processes from accessing each other’s memory and expands usable memory.