2

What's the conceptual difference between a procedure and a process?

If the answers depends on the language, I am thinking about this while studying the SICP book which uses lisp (scheme).

  • 2
    Both "procedure" and "process" have *lots* of different definitions, depending on the context in which they're used. Thus please provide a bit more context. – Daniel Jour Sep 04 '16 at 20:37
  • 1
    Have you read chapter 1.2, "Procedures and the Processes They Generate”? – molbdnilo Sep 05 '16 at 08:52

2 Answers2

3

A program is a description of how to compute something. If you tell the operating system to run a program, it reads a program (in the form of an executable) from disk and the starts a process aka a computation where cpu follows computational steps as given by the program. If you start the same program twice you get two processes (if you are using a GUI you have probably tried accidently to left click on an icon twice, making two windows appear (here each window belongs to a process).

In the context of sicp, the process is the running computation and the procedure is the description of the computation aka the program (or part of a program).

See https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-9.html#%_idx_114

soegaard
  • 30,661
  • 4
  • 57
  • 106
2

In the context of SICP:

  • Procedure is the description (if you want, a recipe) of the process.
  • Process is the result (in a broad meaning, not just a returned value) of applying a procedure to arguments: all the contexts that are set up, variables with defined or set values, all the computation that will take place, etc. None of this happens in the procedure itself.

Another analogy: procedure is a blueprint, a schematic of the building for example, process is actual building construction.

mobiuseng
  • 2,326
  • 1
  • 16
  • 30