DIFFERENCE BETWEEN A PROCESS AND A THREAD

Samuel Fernandes

Total Post:159

Points:1117
Posted by  Samuel Fernandes
Java 
 902  View(s)
Ratings:
Rate this:
What is the technical difference between a process and a thread? I get the feeling a word like 'process' is over used and there is also hardware and software threads. How about light-weight processes in languages like Erlang? Is there a definitive reason to use one term over the other?
  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: Difference between a process and a thread

    Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space, while processes run in separate memory spaces.

    I'm not sure what "hardware" vs "software" threads might be referring to. Threads are an operating environment feature, rather than a CPU feature (though the CPU typically has operations that make threads efficient).

    Erlang uses the term "process" because it does not expose a shared-memory multiprogramming model. Calling them "threads" would imply that they have shared memory.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!