Lecture Notes 1
Lecture Notes 1
Device Management:
A. Device Drivers:
B. Interrupts:
Technique allowing devices to transfer data directly to/from memory without CPU
intervention.
Benefits:
o Improves system performance by freeing CPU for other tasks.
o Reduces CPU overhead associated with data transfer.
Example: Graphics cards use DMA to transfer image data to memory for display.
o A network card uses DMA to transfer received data packets directly to memory.
A. Parallel Communication:
Transmits one bit at a time over a single wire (often with additional control signals).
Slower than parallel but simpler and more reliable for longer distances.
Example: Modern computer peripherals (USB, HDMI) and network connections
(Ethernet).
Operating systems implement mechanisms to handle device failures and data loss.
Techniques:
o Error detection and correction (EDC): Detects and corrects errors during data
transfer. (e.g., checksums)
o Mirroring and RAID (Redundant Array of Independent Disks): Duplicates
data across multiple disks for redundancy.
o Journaling: Records file system changes for rollback in case of crashes.
o Backups: Regularly storing data on separate media for disaster recovery.
Buffering Strategies:
Concept: Temporary storage area used to hold data during transfer between devices with
different speeds (e.g., CPU and disk).
Benefits:
o Improves performance by hiding device access latencies.
o Reduces CPU overhead by allowing data transfer in larger chunks.
Types of buffering:
o Single buffering: Data is transferred from one source to a buffer and then to the
destination.
o Double buffering: Two buffers are used. While one buffer is being filled, the
other is being emptied.
o Circular buffering: Overwrites oldest data when buffer is full, useful for
continuous data streams.
Example: A keyboard buffer stores keystrokes until enough data is accumulated to send
to the application.
Conclusion:
Effective device management is essential for efficient and reliable operation of computer
systems.
Understanding key concepts like device drivers, interrupts, DMA, scheduling, allocation,
buffering, and recovery techniques is crucial.
Choosing the appropriate methods depends on specific device characteristics and system
requirements.