Yash: What is a process?
Me: Let me
think.
Yash: Also
what is Thread?
Me: Now you
are making things simpler.
Yash: How?
Me: Let us
start from scratch. In computers, a program has two characteristics. It has
some memory space (contiguous memory locations) and instructions to be executed
by processor. So process is a thing which has its own memory space and
instructions to be executed. No two processes share memory space. Each process
has its own memory space.
Yash: So you
mean to say, if I have two processes are running in a computer, both have its
own non sharing memory space at a given point of time.
Me: Yes.
Yash: Now
what is thread?
Me: Not it
is tricky. If you consider a process as a set - remember your eight grade
mathematics, and then threads are sub set of process set. It means threads run
within memory space of a process and even threads can share memory space.
Yash: I can
draw this into a picture.
Me: Try it.
Yash: so
this is my understanding.
Me: Excellent.
No comments:
Post a Comment