Monday, April 30, 2007

Java: Processes and Threads

The Java Tutorials > Essential Classes > Concurrency > Processes and Threads

Sanghera's book confused me so I had to review the differences between processes and threads!

A process has a self-contained execution environment. A process generally has a complete, private set of basic run-time resources; in particular, each process has its own memory space.

...

Threads are sometimes called lightweight processes. Both processes and threads provide an execution environment, but creating a new thread requires fewer resources than creating a new process.

Labels: , ,

2 Comments:

Anonymous Anonymous said...

Hm.. to throw more mud in the water. There is also something heavier, resource wise.. virtual machines.

thread->process->virtual machines

6:53 PM  
Blogger kuri* said...

Thanks for pointing that out! I hadn't considered virtual machines.

I like that easy to remember ordering too.

5:09 AM  

Post a Comment

<< Home