1.

State a few benefits and a few drawbacks of using threads with respect to Operating Systems?

Answer»

A thread is a path of execution within a process. A process can have several threads. Within a process, it's a separate control flow. It consists of a CONTEXT and a series of instructions that must be followed. Threads in the same process use shared memory space. Because threads aren't truly independent of one another, they share their CODE, data, and OS resources with other threads (like open FILES and signals).

The following are the main benefits of using threads in Operating Systems:

  • A separate communication system is not required.
  • Threads simplify software structure and IMPROVE readability.
  • Threads have a faster context switching time (time to switch from one thread to another) than processes.
  • The system gets more efficient as FEWER system resources are used.

The following are the most significant drawbacks of using threads:

  • Because threads are part of a single process, they cannot be reused.
  • They interfere with the address space of their process.
  • They require synchronization for concurrent read and write memory access.


Discussion

No Comment Found