Chapter 2

Threads and Multithreading Models

Compare processes and threads, then map one-to-one, many-to-one, and many-to-many models.

Estimated time: 21 min

Threads are smaller execution paths inside one process, sharing code/data but keeping their own execution state.

Modern apps rely on threads for responsiveness and background work.

Process vs Thread

From notes

Clear explanation

Processes isolate resources strongly; threads within a process share address space and communicate faster.

What it really means

Processes are separate houses; threads are roommates in one house sharing kitchen and living room.

Example

Browser tabs may run as processes; rendering and networking within a tab often use multiple threads.

Key takeaway

Threads trade isolation for lower overhead and better responsiveness.

Multithreading Mappings

From notes

Clear explanation

Many-to-one is lightweight but blocks easily; one-to-one is straightforward but kernel-thread heavy; many-to-many balances both.

What it really means

You decide how many user tasks share how many kernel execution lanes.

Key takeaway

Model determines practical concurrency quality.

  • - Saying each thread has separate address space
  • - Ignoring blocking issue in many-to-one model
  • - Forgetting thread synchronization needs shared-memory safety
  • - Process: heavy isolation; Thread: lightweight sharing
  • - Each thread has own PC/registers/stack
  • - Model choice affects blocking behavior and scalability

Exam lens for this topic

What evaluators usually expect in structured exam answers.

Must-use keywords

  • - thread
  • - process and thread
  • - types of threads
  • - multi threading
  • - one to one

Answer flow

  • - Write exact definition in first line
  • - Explain mechanism in ordered bullets
  • - Add one short example or scenario
  • - Close with key takeaway and one exam keyword

Practice Questions

  • Define process, thread and context switching.

    Source: Summer 2023 Q2(A)

    Answer focus: Clear short definitions + one comparison point each.

  • Differentiate thread and process.

    Source: Winter 2023 Q2(B) OR

    Answer focus: Address space, overhead, communication, switching, isolation.

Practice from papers (end-of-topic set)

These paper questions map directly to this topic. Solve now, then compare your structure with linked topics.

Question Bank Linked Here

Open all questions

How to answer linked exam questions

Full question bank