Device Management - PPTM
Device Management - PPTM
Management
Peripheral Devices
• Types :
-Storage Devices: Hard disk ,Solid state drive (SSD), External Hard drive.
1 Character Devices: These devices transfer data character by character, and the data is not stored in a buffer.
Examples include keyboards, mice, and serial ports.
Block Devices: These devices transfer data in blocks or chunks, and the data is typically stored in buffers. Examples
include hard drives, SSDs, and optical drives.
2
Synchronous I/O: The process waits for the I/O operation to complete before proceeding. It is a blocking operation,
and the process is idle during the I/O operation.
Asynchronous I/O: The process initiates the I/O operation and continues with other tasks without waiting for it to
complete. The process is notified later when the I/O operation finishes.
Direct Memory Access (DMA):
3
DMA I/O: A separate DMA controller is used for data transfer between the I/O device and memory, reducing CPU
involvement and enhancing performance.
4
Memory-Mapped I/O: I/O devices are treated as if they are a part of the computer's memory. Reading and writing
to specific memory addresses interact with the I/O devices.
Port-Mapped I/O: I/O devices are accessed through dedicated I/O ports. Special processor instructions are used to
communicate with these ports.
5 Programmed I/O: The CPU controls data transfer between the device and memory by continuously checking the
device status.
Interrupt-Driven I/O: The I/O device interrupts the CPU when it needs attention, allowing the CPU to perform
other tasks until the interrupt occurs
Device Controller
• Hardware components responsible for managing the communication and data transfer between a computer's
CPU and peripheral devices.
• Functions:
1. Data Transfer
2. Control and Status
3. Interrupt handling
4. Buffering
5. Error handling.
Device Driver
• Software components that serve as intermediaries between the operating system and the controllers.
• Provide a standardized interface for the OS to interact with various types of device controllers.
I/O Device
Device Controller Memory CPU
• Memory-mapped I/O is a technique used in computer architecture where the same address space (memory
addresses) is used for both memory and I/O operations.
• Means specific regions of the address space are reserved for I/O device registers .
• Allows the CPU to access them using standard memory access instructions.
• Each I/O device typically has a set of control registers, status registers, and data registers.
• Set of register:
• In this computer organization, there is common bus (data, address, and control) for I/O and memory.
• Instructions:
1. Load (LDA)
- Examples: LDA R1, [0x1000]; LDR R7, [0x4000] etc.
2. Store (STR)
- Examples: STA R2, [0x2000]; STA R8, [0x8000] etc.
How the same instructions can control both I/O and Memory ?
• By using different address.
• Example:
0 x 0000
Memory
0 x FFFF
Memory Space
Figure: Memory Mapped I/O.
Merits and Demerits Memory Mapped I/O.
• Merits
1. Faster I/O Operations: CPU can access I/O devices at the same speed as it accesses memory.
2. Simplified Programming: Load(LDA) and Store(STR) instruction.
3. Efficient Use of Memory Space: I/O devices share the same address space as the memory
• Demerits
1. Limited I/O Address Space: Memory-mapped I/O limits the I/O address space.
2. Slower Response Time: If an I/O device is slow to respond, it can delay CPU’s access to memory.
3. Inefficient for Large Data Transfer: As, CPU initiates and manages the transfer.
Working of an I/O operation.
1. Device driver loads the appropriate registers in the
Printer
------ device controller.
Keyboard ------ Monitor
Mouse ---
Disks 2. Then, device controller checks these registers to
determine what action to take.
Memory
Thank You