Friday, 6 July 2012

Describe the difference between a Thread and a Process?

Purpose:

  • Having to deal with parallelism is one of the harder tasks as a professional developer. This acts a very basic filter to see whether a developer has a rudimentary understanding of what threads and processes are. 
  • Not being able to articulate this may be a warning sign that the developer has never written complex systems or that they will lack in understanding of writing concurrently accesses systems.

Potential Answer: 

Thread is single sequence of instructions and a call stack that operates independently from other threads while a process is an OS construct that might consists of multiple threads (It is the smallest unit of isolation on OS). A thread always runs in a process context.

No comments:

Post a Comment