0
0
Operating Systemsknowledge~20 mins

DMA (Direct Memory Access) in Operating Systems - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
DMA Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How DMA Improves System Performance

Which of the following best explains how Direct Memory Access (DMA) improves overall system performance?

ADMA allows peripherals to transfer data directly to memory without CPU intervention, freeing the CPU for other tasks.
BDMA increases CPU clock speed to handle more data transfers simultaneously.
CDMA duplicates data transfers to ensure data integrity.
DDMA compresses data before transfer to reduce memory usage.
Attempts:
2 left
💡 Hint

Think about what happens when the CPU is not involved in every data transfer.

📋 Factual
intermediate
2:00remaining
DMA Controller Role

What is the primary role of the DMA controller in a computer system?

ATo encrypt data before sending it to memory.
BTo increase the CPU's processing speed during data transfers.
CTo schedule CPU tasks based on priority.
DTo manage direct data transfers between I/O devices and memory without CPU involvement.
Attempts:
2 left
💡 Hint

Consider what component handles data movement independently of the CPU.

🔍 Analysis
advanced
2:00remaining
DMA Transfer Modes

Which DMA transfer mode allows the CPU to continue processing while the DMA controller transfers one byte or word at a time, pausing the CPU only briefly?

ABlock transfer mode
BCycle stealing mode
CDemand transfer mode
DBurst transfer mode
Attempts:
2 left
💡 Hint

Think about a mode where the DMA controller 'steals' CPU cycles without fully stopping the CPU.

Comparison
advanced
2:00remaining
Difference Between DMA and Interrupt-Driven I/O

Which statement correctly compares DMA with interrupt-driven I/O?

ABoth DMA and interrupt-driven I/O require the CPU to be idle during data transfer.
BDMA requires the CPU to handle every data byte, while interrupt-driven I/O transfers data automatically.
CDMA transfers data directly between memory and devices without CPU intervention, while interrupt-driven I/O requires the CPU to move data byte by byte.
DInterrupt-driven I/O transfers data faster than DMA.
Attempts:
2 left
💡 Hint

Consider how much the CPU is involved in each method.

Reasoning
expert
2:00remaining
Potential Issue with DMA and Cache

Why can using DMA cause problems with CPU cache coherence, and what is a common solution?

ADMA can update memory without updating CPU cache, causing stale data; the solution is to flush or invalidate the cache before and after DMA transfers.
BDMA slows down the CPU cache, so disabling the cache during DMA is the solution.
CDMA encrypts data in cache causing corruption; the solution is to disable encryption.
DDMA causes CPU cache to overflow; the solution is to increase cache size.
Attempts:
2 left
💡 Hint

Think about what happens if memory changes without the CPU knowing.