Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Say we have three threads T1, T2 and T3 which
perform sequentially one after another is their any benefit
of using thread over here rather than having a single
process.

Answer Posted / vinod

What if T1 waits for some resource -- Let it be some Input
from keyboard. When T1 is in the wait state, T2 and T3 can
be completed hence utilizing the waiting time. If it was a
single process instead of 3 threads, then the code
equivalent of T2 and T3 will have to wait till code
equivalent of T1 is completed which is definitely a waste of
time.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do threads share heap?

868


Why do we use threads?

937


how will you distinguish if it is a process or a thread, provided you know pid in linux operating system?

813


Can threading stop hair growth?

908


Are cpu threads important?

890


What are threads and processes?

915


Do threads share page table?

833


Does linux have threads?

881


How many threads can you run?

882


Why are goroutines not lightweight threads?

828


What is context switching between threads?

856


How many threads does a core i7 have?

893


Does threading damage the skin?

809


What are linux kernel threads?

926


Are goroutines thread safe?

783