CS FundamentalsModerateGATE CS
Which items are shared by all threads of one process? 1. Heap 2. Stack 3. Open file descriptors 4. Program counter 5. Global variables
- A. 1, 2, 3 and 5
- B. 1, 3 and 5 only
- C. 1 and 5 only
- D. All five
Correct answer: B. 1, 3 and 5 only
Threads share the address space (code, globals, heap) and OS resources such as open files. Each thread has its own stack, registers and program counter.
More Operating Systems questions
- 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…
- Which of the following is TRUE about a zombie process?