DSA Factory
Free Processes and threads lessonsProcesses and threads · Stage 1 · Threads · Step 3

Threads versus processes

Pick the right one by what each shares, what a crash does, and what each costs to create. About 11 minutes.

Quick check

A thread in a multithreaded program dereferences a bad pointer and crashes. What usually happens?

  1. AThe whole process is terminated, including the other threads
  2. BOnly that thread ends; the others carry on normally
  3. CThe thread is restarted automatically
Show the answer

The whole process is terminated, including the other threads. They share one address space and one fate: the OS ends the process.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve