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
- Given below are an Assertion (A) and a Reason (R): Assertion (A): I/O protection is ensured by a hardware trap. Reason (R): I/O interrupts…
- Given below are two statements: Assertion A: A process involves a library function to create a thread. Reason R: The threads make system ca…
- In a multi-user operating system, requests for a particular resource arrive at an average rate of 20 per hour (a Poisson arrival process).…
- In Linux Operating system, when ________ is invoked, it is passed a set of flags that determine how much sharing is to take place between t…
- User level threads are threads that are visible to the programmer and are unknown to the kernel. The operating system kernel supports and m…
- One of the disadvantages of user-level threads compared to kernel-level threads is: