176 views
2 2 votes

Consider the following statements about processes and threads. Which of them is/are correct?

  1. Using multiple threads can allow a process to continue performing useful work while one thread waits for a long-latency operation.
     
  2. A multithreaded program is useful only when it runs on a multiprocessor system.
     
  3. Thread management should always be performed entirely in user space because kernel-supported threads provide no significant advantage.
     
  4. A multithreaded server can be organised using a dispatcher thread and multiple worker threads to receive and process requests.

1 Answer

1 1 vote

Statement A is correct.
While one thread waits for I/O or communication, another ready thread may perform useful work.

Statement B is incorrect.
Threads can improve responsiveness and overlap I/O with computation even on a single-core system.
A single core provides concurrency through interleaved execution, although it cannot provide simultaneous parallel execution.

Statement C is incorrect.
User-level threads may have lower management overhead, but kernel-level threads allow independent kernel scheduling and true parallel execution on multiple cores.

Statement D is correct.
Dispatcher and worker-thread structures are commonly used to divide request acceptance from request processing.

Answer:
Position:
Show:

Related questions

3 3 votes
1 1 answer
217
217 views
GO Classes asked Jul 17
217 views
Which of the following statements about threading models are correct?User-level threads can be implemented without modifying the operating-system kernel. In a pure user-l...
4 4 votes
1 1 answer
168
168 views
GO Classes asked Jul 25
168 views
Consider the following code:$\texttt{balance}$ is a shared variable initialized to $0$.Each of two worker threads performs:$\texttt{int result = 0;}$$\texttt{result = res...
1 1 vote
1 1 answer
198
198 views
GO Classes asked Jul 16
198 views
Consider a process that successfully executes a member of the $\texttt{exec()}$ family of system calls. Which of the following statements are correct?The process continue...
1 1 vote
1 1 answer
206
206 views
GO Classes asked Jul 16
206 views
Which of the following statements are correct for threads belonging to the same process?They share the process’s code, data, and heap. Every thread has its own stack and ...