what is disadvantage of thread?

Answer Posted / nag~1417

Threads also have some disadvantages:

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 dat

Is This Answer Correct ?    35 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is scalable, portability in the view of J2EE?

2158


Can you give me a simple example of using the requiredif validator rule?

837


What is permgen or permanent generation?

755


Are enterprise beans allowed to use thread.sleep()?

872


What is the infobus?

806


Is it possible to stop the execution of a method before completion in a sessionbean?

807


How can I avoid validating a form before data is entered?

721


What is the difference between long.class and long.type?

748


A user of a web application sees a jsessionid argument in the URL whenever a resource is accessed. What does this mean? a. The form must have the field jsessionid b. URL rewriting is used as the session method c. Cookies are used for managing sessions

2006


the same information whether it will connect to the database or it will be used previous information?

783


What is threadfactory?

838


Do I need to import javlang package any time? Why ?

834


Can constructors be synchronized in java?

801


What is a sessionfactory? Is it a thread-safe object?

918


what is an isolation level?

2419