Thread · Operating System
11 questions · asked in 8 of 27 years (2000–2026)
MCQ 8 · MSQ 31-mark 10 · 2-mark 1
2000Questions per year2026
Questions 6–10 of 11
Which one of the following is FALSE?
Answer: (D)
Threads of one process, even kernel threads, use the same code segment. They also use the same data and files. Only their stacks and registers are kept apart. So the statement "kernel level threads cannot share the code segment" is false.
Answer: Kernel level threads cannot share the code segment
Answer: Kernel level threads cannot share the code segment
A thread is usually defined as a 'light weight process' because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the followings is TRUE?
Answer: (C)
All threads of one process use the same address space. So the OS keeps virtual memory information for each process, not for each thread.
A thread still has its own registers, its own stack and its own scheduling state. This makes options 1, 2 and 4 wrong.
Answer: On per-thread basis, the OS does not maintain virtual memory state
A thread still has its own registers, its own stack and its own scheduling state. This makes options 1, 2 and 4 wrong.
Answer: On per-thread basis, the OS does not maintain virtual memory state
Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is TRUE?
Answer: (C)
Switching between processes needs a mode switch and also saving and restoring the full process context (registers, memory map, TLB effects). So it takes more time than a mode switch alone.
Answer:
Answer:
Consider the following statements about user level threads and kernel level threads. Which one of the following statements is FALSE?
Answer: (D)
A. True. A kernel thread switch needs a trap into the kernel and the kernel saves and restores thread state in its own data structures. A user level thread switch is done by a library in user space, with no kernel entry, so it is cheaper.
B. True. User level threads are managed by a library, so no special hardware or kernel support is needed.
C. True. The kernel knows about every kernel level thread, so it can dispatch threads of the same process to different processors.
D. False. The kernel schedules each kernel level thread separately. When one blocks, the kernel runs another thread of the same process. Blocking of all related threads happens with user level threads in the many-to-one model, where the kernel sees only one thread.
Answer: (D)
B. True. User level threads are managed by a library, so no special hardware or kernel support is needed.
C. True. The kernel knows about every kernel level thread, so it can dispatch threads of the same process to different processors.
D. False. The kernel schedules each kernel level thread separately. When one blocks, the kernel runs another thread of the same process. Blocking of all related threads happens with user level threads in the many-to-one model, where the kernel sees only one thread.
Answer: (D)
Which one of the following is NOT shared by the threads of the same process ?
Answer: (A)
Each thread has its own stack, because a thread runs its own chain of function calls. The stack holds the return addresses, parameters and local variables of those calls, and different threads have different ones.
The other items belong to the process as a whole, so all its threads share them:
- the address space (code, global data and heap)
- the file descriptor table (open files)
- message queues, which are opened by the process, so all its threads can use them
Answer: (A)
The other items belong to the process as a whole, so all its threads share them:
- the address space (code, global data and heap)
- the file descriptor table (open files)
- message queues, which are opened by the process, so all its threads can use them
Answer: (A)
Keep practising