CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies

Search Interview Questions

Question: What is the disadvantage of threads?


Answer: The Main disadvantage of threads is : Threads is operating system dependent.



Category Java Interview Questions & Answers - Exam Mode / Learning Mode
Rating (0.9) By 469 users
Added on 8/14/2011
Views 6537
Rate it!
Question: What is the disadvantage of threads?



Answer:

The Main disadvantage of threads is : Threads is operating system dependent. Source: CoolInterview.com


The execution of thread is based upon the choice of OS .though user has created the thread but it will execute when OS allows it. that's why output of thread program is differ from PC to PC.master control is take by OS.it will decide on the basis of CPU life cycle Source: CoolInterview.com

Answered by: Rakesh Sharma | Date: | Contact Rakesh Sharma Contact Rakesh Sharma

Threads are really operating system dependent and it should follow the existing cpu life cycle that varies from system to system. Source: CoolInterview.com

Answered by: Robert | Date: | Contact Robert Contact Robert

The execution of thread is based upon the choice of OS .though user has created the thread but it will execute when OS allows it. that's why output of thread program is differ from PC to PC.master control is take by OS.it will decide on the basis of CPU life cycle
Source: CoolInterview.com

Answered by: pappu kumar | Date: | Contact pappu kumar Contact pappu kumar

thread reduces program execuiton speed Source: CoolInterview.com

Answered by: ritesh | Date: 5/1/2009 | Contact ritesh Contact ritesh

The execution of thread is based upon the choice of OS .though user has created the thread but it will execute when OS allows it. that's why output of thread program is differ from PC to PC.master control is take by OS.it will decide on the basis of CPU life cycle


Source: CoolInterview.com

Answered by: Naveen | Date: 5/9/2009 | Contact Naveen Contact Naveen

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. Source: CoolInterview.com

Answered by: Aruna | Date: 9/14/2009 | Contact Aruna Contact Aruna

threads are OS dependent so they are executed in different timings in different systems Source: CoolInterview.com

Answered by: sireesha | Date: 10/18/2009 | Contact sireesha Contact sireesha

the disadvantage is the resource (data member) management between the threads. it has high possibility ofDead Lock Source: CoolInterview.com

Answered by: luckycjs | Date: 11/27/2009 | Contact luckycjs Contact luckycjs

Threads are really operating system dependent and it should follow the existing cpu life cycle that varies from system to system. Source: CoolInterview.com

Answered by: ANINA JOSEPH | Date: 1/23/2010 | Contact ANINA JOSEPH Contact ANINA JOSEPH

well in case of single threading-there is a possibilty of deadlock, bt in case of multi threading- there is no chance of deadlock... nd bt the multi threading execution speed is fast... Source: CoolInterview.com

Answered by: mansi thakur | Date: 5/3/2010 | Contact mansi thakur Contact mansi thakur

threads depend on computer cycles.
so they are under the control of operating system. so they get into run state when a cycle is allocated to it. so thread execution is different from one system to other system Source: CoolInterview.com

Answered by: lokesh | Date: 5/5/2010 | Contact lokesh Contact lokesh

Threads should be used carefully in shared resources, improper use will lead to data Inconsistency

The actual processing speed will be reduced due to the switching time of the process Source: CoolInterview.com

Answered by: Arun Gopal | Date: 5/21/2010 | Contact Arun Gopal Contact Arun Gopal

the main disadvantage is,it gives different outputs in different pc and also at same pc because it fully dependent on OS. Source: CoolInterview.com

Answered by: mallika | Date: 5/21/2010 | Contact mallika Contact mallika


If you have the better answer, then send it to us. We will display your answer after the approval

Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.

Post your answer here

Inform me about updated answers to this question.
Related Questions
View Answer
As the Swings have more advantages over the AWT.. Why still in market are they using AWTs??
View Answer
What is the difference throw and throws

View Answer
Solve it...
public class test {

public static void main(String[] args)
{
int i=5;
i=i++;
System.out.println("result::"+i);
}
}

View Answer
What is garbage collection?Can it be forced?

View Answer
What is difference between & and && in java

View Answer
send me some interview questions on Stringhandling concept
View Answer
Is is true that JAVA is not 100% object oriented language ?

View Answer
Difference b/w synchronized Method and synchronized statement in case of whole body of method cover by synchronized statement.

View Answer
How do you know that where to use abstract class or interface?

View Answer
How System.out.println() works?

View Answer
can the main() method be overloaded? or overrided? and what happens when we do so?

View Answer
What is the use of keyword transient?

View Answer
What is Log4j in java

View Answer
Why we can not override static method?

View Answer
How to create the object to the anonomous class

View Answer
What is the difference between array list and linked list. in which situations we are use them? which is best one?

View Answer
Can i expand an interface?

View Answer
what happens if we execute the program?
class Return{
int display(){
try{
return 1;
}
finally{
return 2;
}
}
public static void main(String args[]){
Return r=new Return();
r.display();
}
}

View Answer
If interface has got four methods,and I like to implement only two methods, how this could be achieved?

View Answer
Does JVM maintain a cache by itself? Does the JVM allocate objects in heap? Is this the OS heap or the heap maintained by the JVM? Why

View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All Java Interview Questions & Answers - Exam Mode / Learning Mode




India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 1.171875 Seconds