Labels
- Apache (10)
- Articles (4)
- BPM Tools (5)
- Glassfish (16)
- Hadoop (10)
- HP ALM (6)
- HP SOA Systinet (14)
- Issues (19)
- JAVA (85)
- JBoss (16)
- jQuery (4)
- Load Runner (37)
- Quality Center (49)
- Testing (24)
- Tips and Tricks (16)
- Tomcat (4)
- Usefull Links (18)
- Weblogic (41)
- WebSphere (2)
Monday, June 11, 2012
What is the difference between process and threads in java ?
A thread is part of a process; a process may contain several different threads. Two threads of the same process share a good deal of state and are not protected against one another,whereas two different processes share no state and are protected against one another. Two threads of the same process have different values of the program counter; different stacks(local variables); and different registers. The program counter, stack pointer, and registers are therefore saved in the thread table. Two threads share open files and memory allocation; therefore, file information and memory information (e.g. base/limit register or page table) is stored in the process table.
Labels:
JAVA
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment