Be a Supporter!

Process vs Program

  • 407 Views
  • 3 Replies
New Topic Respond to this Topic
Treerung
Treerung
  • Member since: Apr. 18, 2008
  • Offline.
Forum Stats
Member
Level 11
Blank Slate
Process vs Program 2010-01-14 16:39:01 Reply

I'm not sure if this is the correct place for this thread but:
Can someone explain the differences between a program and a process?

From what I picked up a program is a set of instructions and a process is part of the program being executed.

A major difference seems to be that a process is active whereas a program is passive. Can someone verify that the above is correct?

Also there seems to be a difference between where a program and a process is stored..can someone explain that to me?

Thanks


:'(

BBS Signature
Jon-86
Jon-86
  • Member since: Jan. 30, 2007
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to Process vs Program 2010-01-14 16:58:19 Reply

A process is an active instance of a program in memory. A program can spawn many instances and have processes communicate with each other.


PHP Main :: C++ Main :: Java Main :: Vorsprung durch Technik
irc.freenode.net #ngprogramming

BBS Signature
henke37
henke37
  • Member since: Sep. 10, 2004
  • Offline.
Forum Stats
Member
Level 30
Blank Slate
Response to Process vs Program 2010-01-15 17:49:48 Reply

A process is one instance of a program that has a certain state. A program can define what states it can be in, but only a process can define what state it is in right now.


Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.

Jon-86
Jon-86
  • Member since: Jan. 30, 2007
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to Process vs Program 2010-01-15 17:54:24 Reply

At 1/15/10 05:49 PM, henke37 wrote: A process is one instance of a program that has a certain state. A program can define what states it can be in, but only a process can define what state it is in right now.

Which takes you onto context switching


PHP Main :: C++ Main :: Java Main :: Vorsprung durch Technik
irc.freenode.net #ngprogramming

BBS Signature