OS: Processes, Threads, and Concurrency

Operating systems flashcards — process vs thread, scheduling basics, and concurrency hazards.

12 cards· by GuruOwl

Make a deck like this from your own PDF — free.

Try it
  1. 01
    What is a process?
    A program in execution with its own address space, resources, and at least one thread of control.
    process
  2. 02
    What is a thread?
    A unit of execution within a process that shares the process address space and resources with sibling threads.
    thread
  3. 03
    What is the key isolation difference between processes and threads?
    Processes are memory-isolated from each other; threads of the same process share memory (requiring synchronization).
    comparison
  4. 04
    What is a context switch?
    Saving the state of one running task and restoring another so the CPU can change which process/thread runs.
    scheduling
  5. 05
    What is a race condition?
    When outcome depends on unpredictable timing/interleaving of concurrent operations on shared state.
    concurrency
  6. 06
    What is a critical section?
    A code region that accesses shared resources and must not be executed by multiple threads concurrently.
    concurrency
  7. 07
    What is a mutex (mutual exclusion lock)?
    A synchronization primitive that allows only one thread at a time to hold the lock and enter a critical section.
    sync
  8. 08
    What is deadlock?
    A state where threads wait forever for resources held by each other (circular wait with no progress).
    deadlock
  9. 09
    Name the four Coffman conditions for deadlock.
    Mutual exclusion; hold-and-wait; no preemption; circular wait.
    deadlock
  10. 10
    What is a semaphore?
    A synchronization counter supporting wait/signal (P/V) operations — can control access by multiple units of a resource.
    sync
  11. 11
    User-level vs kernel-level threads (one-line tradeoff)?
    User threads are cheaper to switch but a blocking syscall can block the whole process; kernel threads are scheduled by the OS with higher overhead.
    thread
  12. 12
    What does “CPU-bound” vs “I/O-bound” mean for scheduling?
    CPU-bound tasks mostly compute; I/O-bound tasks often wait on I/O — schedulers mix them for responsiveness and utilization.
    scheduling