What is the difference between Process and Thread?

A process is a self-contained execution environment and it can be seen as a program or application whereas Thread is a single task of execution within the process. Java runtime environment runs as a single process. Thread can be called lightweight process. Thread requires less resources to create and exists in the process, thread shares the process resources.

Process => Multiple applications running simultaneously in the server, PC or Mac.
Thread => Multiple tasks running within a process.

  • OS multitasks via Processes
  • Process multitasks via Threads

Author: Mahesh

Technical Lead with 10 plus years of experience in developing web applications using Java/J2EE and web technologies. Strong in design and integration problem solving skills. Ability to learn, unlearn and relearn with strong written and verbal communications.