محاضرة 3
I/O Structure, Memory, and Caching/DMA
Comparison of Synchronous and Asynchronous I/O, memory hierarchy, and DMA mechanism.
ملخص المحاضرة
Lecture 3: I/O Structure, Memory, and Caching/DMA
1. I/O Structure Comparison
| Feature | Synchronous I/O (Blocking) | Asynchronous I/O (Non-blocking) |
|---|---|---|
| Control Return | After I/O completes (CPU waits). | Immediately after I/O starts (CPU continues). |
| CPU Behavior | CPU waits or loops, wasting cycles (No I/O overlap). | CPU executes other tasks while I/O runs (I/O overlap occurs). |
| Result | Slow performance, poor multitasking. | Better system performance and multitasking. |
- Device-status Table: Maintained by the OS; stores information (type, address, state) about each I/O device to help management.
2. Storage Definitions
- Bit: The basic unit of computer storage (0 or 1).
- Byte: 8 bits; the smallest convenient chunk of storage.
- Word: The computer architecture's native unit of data (e.g., 64-bit word = 8 bytes).
3. Storage Hierarchy
Storage systems are organized based on Speed, Cost, and Volatility.
- Hierarchy (Fastest to Slowest): Registers → Cache → Main Memory (RAM) → Solid-State Disk (SSD) → Hard Disk → Optical Disk → Magnetic Tapes.
- Main Memory (RAM): Volatile; temporary storage for active programs and data.
- ROM (Read-Only Memory): Non-volatile; permanent storage for firmware.
4. Caching and DMA
- Caching: Temporarily storing frequently used data in faster storage (cache) to reduce access time.
- Example: Main memory acts as a cache for secondary storage.
- Direct Memory Access (DMA):
- Function: Allows high-speed I/O devices (like disks) to transfer blocks of data directly to/from main memory without constant CPU intervention.
- Benefit: Reduces CPU workload by generating only one interrupt per block transferred, instead of one interrupt per byte.
Audio Summary
0:000:00