What is the main benefit of allowing concurrent execution of CPU and I/O devices?
It increases CPU utilization and throughput by allowing the CPU to execute while I/O operations are ongoing.
In early systems, what happened when CPU needed I/O?
The CPU had to wait until the I/O completed, wasting CPU cycles.
Modern operating systems are primarily ________-driven.
Interrupt-driven
What is an interrupt?
A signal from hardware or software that informs the CPU that attention is required.
What is the difference between hardware and software interrupts?
Hardware interrupts come from devices (keyboard, disk). Software interrupts (traps) come from program errors or system calls.
What happens when an interrupt occurs?
CPU saves state, jumps to interrupt service routine (ISR), executes it, restores state, and resumes program.
What is the purpose of Direct Memory Access (DMA)?
It allows device controllers to transfer data directly between memory and device without CPU intervention for every byte.
What is the advantage of DMA over traditional I/O?
CPU is interrupted once per block transfer instead of every byte, reducing CPU overhead.
In the storage hierarchy, arrange from fastest to slowest: Disk, Cache, Main Memory, Registers.
Registers → Cache → Main Memory → Disk
Why are faster memory types smaller in size?
Because they are more expensive to manufacture.
What is the principle of locality of reference?
Programs tend to access recently used instructions and data repeatedly, making caching effective.
What is a single-processor system?
A system with one CPU that executes all instructions, possibly with device-specific processors for I/O.
What is asymmetric multiprocessing (AMP)?
A multiprocessor system where one master CPU controls all other subordinate CPUs.
What is symmetric multiprocessing (SMP)?
A multiprocessor system where all CPUs are equal, share memory, and can run tasks independently.
What is the benefit of SMP?
Improves performance, scalability, and fault tolerance by balancing workload across CPUs.
What is a clustered system?
A group of computers connected via high-speed LAN to work together for reliability and performance.
What is the main benefit of clustering?
Fault tolerance and high availability — if one node fails, others can continue running.
What is a batch processing system?
A system that executes jobs without user interaction, focusing on maximizing CPU utilization.
What is a time-sharing system?
An interactive system where multiple users share CPU time, giving illusion of simultaneous execution.
What is the main difference between batch and time-sharing systems?
Batch focuses on throughput without user interaction; time-sharing focuses on responsiveness and interactivity.
Example of a batch system?
Payroll processing or data backups.
Example of a time-sharing system?
A Linux server with multiple logged-in users.
What is dual-mode operation in operating systems?
Separation of user mode (restricted) and kernel mode (privileged) to protect system resources.
What is user mode?
Restricted execution mode for applications, without direct access to hardware resources.