DMA and Interrupt-driven I/O Flashcards

1
Q

Explain why DMA is appropriate for a network.

A

Yes, using DMA for network devices is appropriate because it efficiently transfers large amounts of data between the network device and memory without constant CPU involvement. This offloads the CPU, allowing it to handle other tasks while the DMA controller manages data flow. It’s especially beneficial for high-speed networks, where fast and continuous data transfer is crucial. However, for small or irregular data transfers, DMA might be less efficient.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the difference in functionality between DMA and interrupt-driven I/O?

A
  • DMA
    Transfers data directly between memory and the device without CPU intervention. Allows the CPU to perform other tasks during data transfer, increasing efficiency.
  • ID-I/O
    The CPU is interrupted when the device is ready for data transfer. The CPU manages the transfer, one interrupt at a time, which can be slower.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What size and frequency can DMA and interrupt-driven I/O handle?

A
  • DMA
    Ideal for large, continuous data transfers.
  • ID-I/O
    Suitable for smaller, frequent data transfers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the pros and cons of DMA?

A

Pros: Reduces CPU load, high transfer speeds, efficient for large data volumes.

Cons: Requires complex hardware, can be expensive, risk of data corruption if mismanaged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the pros and cons of ID-I/O?

A

Pros:
Simpler hardware, lower cost, good for small, frequent data transfers.

Cons:
Increases CPU overhead, inefficient for large data volumes, can create bottlenecks with frequent interrupts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain the various aspects of Programmed I/O and provide an example scenario.

A

How it works
- CPU constantly checks if device is ready.
CPU Involvement
- High - CPU does all the work.
Efficiency
- Least efficient - wastes CPU time.
Ideal use Case
- Simple devices like keyboards.
Speed
- Slow - CPU constantly checks.

Example Scenario
- Reading keystrokes from a keyboard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain the various aspects of Interrupt-Driven I/O and provide an example scenario.

A

How it works
- Device interrupts CPU when ready.
CPU Involvement
- Moderate - CPU waits for the device to interrupt.
Efficiency
- More efficient - CPU can work on other tasks.
Ideal use Case
- Moderate-speed devices like printers.
Speed
- Faster than programmed I/O

Example Scenario
- Sending data to a printer while the CPU does other tasks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain the various aspects of DMA and provide an example scenario.

A

How it works
- DMA controller handles data transfer without CPU.
CPU Involvement
- Low - CPU is free; DMA does the transfer.
Efficiency
- Most efficient - CPU is mostly free.
Ideal use Case
- High-Speed transfers like hard disk to memory.
Speed
- Fastest - DMA matches device speed.

Example Scenario
- Transferring large files from disk to memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly