• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between process and programs?  RSS feed

 
Miles Davis
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While this question does not have to do with Java in particular, it has to do with computing in general. The reason I'm asking here is because I never get replies when I ask this in other forums; everyone here, on the other hand, seems to be very helpful.

I am reading the first pages of Structure and Interpretation of Computer Programs by Abelson and Sussman, and they use the terms "process" and "procedure." Here is the quote from the book which confuses me:

"We are about to study the idea of a computational process. Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data. The evolution of a process is directed by a pattern of rules called a program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells. A computational process is indeed much like a sorcerer's idea of a spirit. It cannot be seen or touched. It is not composed of matter at all. However, it is very real. It can perform intellectual work. It can answer questions. It can affect the world by disbursing money at a bank or by controlling a robot arm in a factory. The programs we use to conjure processes are like a sorcerer's spells. They are carefully composed from symbolic expressions in arcane and esoteric programming languages that prescribe the tasks we want our processes to perform. A computational process, in a correctly working computer, executes programs precisely and accurately. Thus, like the sorcerer's apprentice, novice programmers must learn to understand and to anticipate the consequences of their conjuring. Even small errors (usually called bugs or glitches) in programs can have complex and unanticipated consequences."

As one can see, the terms "process" and "program" are thrown around a lot. I can't really get at what thee terms are exactly supposed to mean, and the relation between the two. I was thinking that maybe "process" refers to the general objective of a program, and a program is the actual code. However, this supposition isn't based on much. If someone could help me out with precisely defining these terms I would really appreciate it.

P.S. If this is an inappropriate sub-forum to post in then I'll gladly take it to another.
 
Mike. J. Thompson
Bartender
Posts: 689
17
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say that a program is the collection of instructions you the programmer assembles to accomplish your task. A process is the running instance of a program. There may me multiple processes running at once that are all instances of the same program, but they could be doing very different things if they are operating on different data.

For example think of a word processor that is being run multiple times on different documents.

In this way the relationship between a program and a process is similar to the relationship between a Class and an object.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!