Recall & Review
beginner
What is concurrency in system design?
Concurrency means multiple tasks or processes are happening at the same time or overlapping in time to improve efficiency and performance.
Click to reveal answer
beginner
Why do we need locks or mutexes in concurrent systems?
Locks or mutexes prevent multiple processes from changing the same data at the same time, avoiding errors and data corruption.
Click to reveal answer
intermediate
What is a race condition?
A race condition happens when two or more processes try to change shared data at the same time, causing unpredictable results.
Click to reveal answer
intermediate
Explain deadlock in concurrency.
Deadlock is when two or more processes wait forever for each other to release resources, so none can continue.
Click to reveal answer
intermediate
What is the difference between concurrency and parallelism?
Concurrency is about managing multiple tasks at once, possibly by switching between them. Parallelism is running multiple tasks exactly at the same time using multiple processors.
Click to reveal answer
What problem does a mutex solve in concurrent systems?
✗ Incorrect
Mutexes ensure only one process accesses shared data at a time to avoid conflicts.
Which of the following best describes a race condition?
✗ Incorrect
Race conditions occur when concurrent processes access shared data without proper synchronization.
Deadlock occurs when:
✗ Incorrect
Deadlock is a state where processes wait endlessly for resources locked by each other.
Which technique helps avoid race conditions?
✗ Incorrect
Locks and synchronization ensure safe access to shared data, preventing race conditions.
What is the main difference between concurrency and parallelism?
✗ Incorrect
Concurrency manages multiple tasks by switching; parallelism runs tasks simultaneously on multiple processors.
Describe common concurrency problems and how to handle them.
Think about what happens when multiple processes share data or resources.
You got /4 concepts.
Explain the difference between concurrency and parallelism with examples.
Consider how tasks are managed or executed at the same time.
You got /4 concepts.
