CS FundamentalsHardGATE CS
Which of these does a context switch between two threads of the SAME process need NOT change, but a switch between two different processes must?
- A. The page-table base register (address space)
- B. The program counter
- C. The stack pointer
- D. The general-purpose registers
Correct answer: A. The page-table base register (address space)
Threads of one process share the address space, so the page-table base (and usually TLB contents) stay the same; PC, SP and registers are per-thread and always switch.
More Operating Systems questions
- Which items are shared by all threads of one process? 1. Heap 2. Stack 3. Open file descriptors 4. Program counter 5. Global variables
- In the many-to-one threading model, which statement is correct?
- Assertion (A): User-level thread switching is usually faster than kernel-level thread switching. Reason (R): Switching user-level threads…
- A process is in the middle of a system call when a hardware interrupt arrives. Which statement about mode and stacks is correct on a…
- Which of these instructions must be privileged (allowed only in kernel mode) for the OS to keep control? 1. Disable interrupts 2. Read the…
- A process calls read() on a file. Put these in the correct order: (a) the kernel validates arguments and starts I/O; (b) the process…