All mock tests are FREE till 31 December — register to save your progress

Given below are two statements:
Statement (I): A thread is a dispatchable unit of work that does not execute sequentially and is not interruptible.
Statement (II): It is not possible to alter the behaviour of a thread by altering its context when the thread is suspended.
In light of the above statements, choose the most appropriate answer.

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. Both Statement I and Statement II are incorrect

Explanation

By definition, a thread does execute sequentially (it has its own program counter and instruction sequence) and it is interruptible (it can be suspended by the scheduler and resumed later), so Statement I's claims are the exact opposite of the truth and it is incorrect. Statement II is also incorrect: a thread's behaviour is precisely controlled through its context (register values, stack pointer, program counter) while it is suspended — this is exactly what a context switch does, allowing the OS to change which instruction/data state the thread resumes with. Since both statements are false, the correct choice is (ii) Both Statement I and Statement II are incorrect.

More System Software and Operating System questions