process is a execution of a program and program contain set
of instructions but thread is a single sequence stream
within the process.thread is sometime called lightweight
process. single thread alows a os to perform singler task
ata time similarities between process and threads are:
4)if one thread is blocked then the next will be start to
run like process.
1)threads are not independent like process.
2)all threads can access every address in the task unlike
3)threads are design to assist onr another and process
might or not might be assisted on one another.
Technically, a thread is defined as an independent stream
of instructions that can be scheduled to run as such by the
So, in summary, in the UNIX environment a thread:
o Exists within a process and uses the process
o Has its own independent flow of control as long as
its parent process exists and the OS supports it
o Duplicates only the essential resources it needs to
be independently schedulable
o May share the process resources with other threads
that act equally independently (and dependently)
o Dies if the parent process dies - or something
o Is "lightweight" because most of the overhead has
already been accomplished through the creation of its
Whereas in case of process, every process has its own
memory management, two process cannot communicate without
using IPCS or Sockets, they do not share resources and
every process has its own process ID(pid).