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...

What is the difference between Process and Threads?

Answer Posted / hetal

A process is a running instance of a program to which system allocates resources like CPU time and memory (separate heap, method area etc. which does not overlap with other process running on the system at the same time). In a big application there may be a set of cooperating processes communicating to each other in order to perform the desired functionality. Two processes communicate through well defined inter process communication mechanism, such as pipes, sockets and shared memory, if both processes are running on the same machine.

On the other hand threads exist within a process; every process has at least one thread. A thread is a light weight process that does not require as much resources as a process requires. Threads running inside a process, share the common set of resources among themselves which are allocated to the process (including the memory, the address space). All the threads share the same heap and method area (but individual stacks). All local variables are thread safe in Java because local variables are stored in each thread's own stack and each thread has its own stack created. Because threads share virtual address space, that makes inter thread communication between threads much cheaper than inter process communication between two independent processes

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the class that is used to bind the server object with RMI Registry?

2152


Where can I find seam examples and documentation?

1079


What’s jboss cache in short?

1100


Is “abc” a primitive value?

1099


What is RMI and what are the services in RMI?

1146


Are there books about seam?

1086


What is jboss?

1029


Explain the advantages and disadvantages of detached objects.

1013


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

4251


What is the purpose of the finally clause of a try-catch-finally statement?

1028


What is a clone?

1038


whats is mean by connectionpooling

2000


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

2199


What is the map interface?

1109


wahts is mean by dynavalidatorform in struts/

2060