What Are Advantages And Disadvantages Of Thread ?

3

3 Answers

Amen Bukhari Profile
Amen Bukhari answered
Threads are light weight processes that divide main flow of control into multiple flows and each flow of control/thread will execute independently. Activity of the process in a system is represented by threads. The process that has multiple threads is called as multi threaded. Each threads has its own thread ID ( Data Type Integer), register, program counter, stack, error no. Threads can communicate using shared memory within same process.
There are different advantages of using threads to mange and maintain the subtask of applications. When we are using threads than less system resources are used for context switching and increased the throughput of application. Threads also simplify the structure of program. There is no special mechanism for communication between tasks.
Threads also have some disadvantages for example threads are not reusable as they are dependent on a process and cannot be separated from the process. Threads are not isolated as they don't have their own address space. The error cause by the thread can kill the entire process or program because that error affects the entire memory space of all threads use in that process or program. Due to the shared resources by the threads with in the process can also affect the whole process or program when a resource damage by the thread. For concurrent read and write access to the memory thread will required synchronizations. Data of the process can easily damage by the thread through data race because all the threads with in the process have write access to same piece of data.
Ritika Sharma Profile
Ritika Sharma answered

I don't think there is any kind of harm a thread can make, else you have a sensitivity issue. Moreover, if we talk of the comfortability, cotton is the most durable fabric being used.

Anonymous Profile
Anonymous answered

hi

Answer Question

Anonymous