GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 16

Per-thread versus per-process state

Operating Systems · Processes, Threads & System Calls · Full GATE CSE 2011 paper

GATE 2011, Q16 1 mark · MCQ
Report issue

Processes, Threads & System Calls

Question 16, GATE 2011: Threads are called lightweight processes because the OS maintains smaller structures for a thread than a process. Which statement is TRUE?

(A) Per thread, the OS maintains only CPU register state
(B) The OS does not maintain a separate stack for each thread
(C) Per thread, the OS does not maintain virtual-memory state
(D) Per thread, the OS maintains only scheduling and accounting information
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Threads of one process share its virtual address space, so virtual-memory mappings are maintained at process level rather than separately for each thread. Each thread still needs its own register context, stack and scheduling information. Therefore C.

Independent execution requires each thread to remember its own instruction pointer and registers, and its own stack holds function calls and local execution state. The scheduler also tracks the thread's run/block status. Those facts refute A, B and D: none of the single listed items is the whole thread context, and stacks are not omitted. Virtual-memory mappings, however, describe the shared process address space, which is why C identifies the saving.

Original paper, page 4 · Answer key