The time required to create a thread is:
2023
The time required to create a thread is:
Answer: A. less than the time required to create a new process — Concept: A process is a fully independent unit with its own address space, file-descriptor table, and process control block (PCB). A thread is a lightweight…
- A.
less than the time required to create a new process
- B.
equal the time required to create a new process
- C.
greater than the time required to create a new process
- D.
None of the above
Attempted by 275 students.
Show answer & explanation
Correct answer: A
Concept: A process is a fully independent unit with its own address space, file-descriptor table, and process control block (PCB). A thread is a lightweight unit of execution that lives inside a process and shares that process's address space, open files, and most other resources with its sibling threads, carrying only a small thread control block (TCB) of its own. Because of this, the amount of OS work needed to create a new instance of each is generally proportional to how much private state must be set up from scratch: the more state a creation operation must allocate and duplicate, the more time it generally takes.
Application: Laying out what the OS typically has to set up for each operation makes the comparison concrete:
Setup step | Process creation | Thread creation |
|---|---|---|
Address space | New virtual address space allocated; page tables built | Reused — shares the parent's existing address space |
Resource / file tables | Duplicated (open file descriptors, etc. copied) | Shared with the parent, not duplicated |
Execution context | New stack, registers, and a brand-new PCB entry | New stack and registers, plus a thread-ID entry (TCB) inside the existing PCB |
Relative OS overhead | Heavier — several costly setup steps | Lighter — most of the costly steps are avoided |
Because thread creation reuses the parent's existing address space and resource tables instead of duplicating them, it generally requires less OS setup work than process creation, so it generally takes less time to complete. This is inconsistent with an equal cost — the two operations specifically differ in this duplication work, which process creation must do and thread creation does not — and inconsistent with a greater cost for thread creation, since thread creation does not need any extra setup step that process creation avoids.
Cross-check: On typical systems this difference shows up concretely: creating a thread (for example via pthread_create() on Linux, itself commonly backed by the lightweight clone() system call) is usually measured in tens to a few hundred microseconds, while creating a process (fork(), often followed by an exec() to load a new program image) is usually measured as several times more costly, commonly extending into a few milliseconds — because the kernel has to build fresh page tables and duplicate resource tables that thread creation simply reuses. (Exact figures vary by OS, kernel version, and workload, but the relative ordering holds.)
Therefore, thread-creation time is generally less than process-creation time.