What is the difference between a computer program and task?

[Edit]

Answer

A computer program (often simply called a program) is an example of computer software that prescribes the actions ("computations") that are to be carried out by a computer. Most programs consist of a loadable set of instructions which determines how the computer will react to user input when that program is running, i.e. when the instructions are 'loaded'.

A task is "an execution path through address space". In other words, a set of program instructions that is loaded in memory. The address registers have been loaded with the initial address of the program. At the next clock cycle, the CPU will start execution, in accord with the program. The sense is that some part of 'a plan is being accomplished'. As long as the program remains in this part of the address space, the task can continue, in principle, indefinitely, unless the program instructions contain a halt, exit, or return.

In the computer field, "task" has the sense of a real-time application, as distinguished from process, which takes up space (memory), and execution time.

Both "task" and "process" should be distinguished from event, which takes place at a specific time and place, and which can be planned for in a computer program.

In a computer graphical user interface (GUI), an event can be as simple as a mouse click.

In older text-based computer interfaces, an event might be a keystroke.

Improve Answer Discuss the question "What is the difference between a computer program and task?" Watch Question

First answer by Ranger22. Last edit by Ranger22. Contributor trust: 2761 [recommend contributor]. Question popularity: 13 [recommend question]

Research your answer:

Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Terminology > What is the difference between a computer program and task?

Our contributors said this page should be displayed for the questions below. (Where do these come from)
If any of these are not a genuine rephrasing of the question, please help out and edit these alternates.
Difference between program and task?  This is an error in a program that prevents a computer in carrying out its task?