Program (informatika)
A számítógépes program (vagy egyszerűen program) megmondja egy számítógépnek, hogy mit csináljon, jellemző módon azt, hogy valamilyen adatokkal milyen móveleteket végezzen. A "programokat" és az "adatokat" általában két különböző fogalomként kezeljük.
Program futtatása
Ahhoz, hogy egy számítógép egy programot végrehajtson, a számítógépet olyan alapállapotba kell hozni a program, és gyakran az adatok számítógépbe jutattásával, hogy azok végrehajthatóak legyenek, majd egy indító eljárást kell a számítógépen aktivizálni. A legalacsonyabb szinten ez a hidegindítás (boot eljárás) folyamatával kezdődik, amikor a számítógép első indításakor az indítóprogramját futtatja le, mely a későbbi működésre készíti azt elő.
Napjainkban a legtöbb számítógép működési alapállapotának eléréséhez szükséges az operációs rendszer nevű program (vagy programok rendszere) elindítása. Ez a program végzi el a későbbi futattandó programok betöltését és futtatását. Ebben a működési környezetben a számítógépes program csak az épp vizsgált egyéni futtatható programot jelenti, és nem az összes programot (beleértve az operációs rendszert) ami a számítógépen az adott pillanatban fut.
A Neumann architektúra
A napjainkban legelterjedtebb Neumann architektúra vagy más néven Harvard architektúra alapján működő számítógépeken a gép a programot és annak adatait egy külső adattároló eszközről tölti be, leggyakrabban harddiszkről. Ezután a program és az adatok a központi memóriába kerülnek, majd majd a program végrehajtása megindul, és a gép egyenként sorban végrehajtja a gépi kódú utasításokat, adatokat változtat, az ugró utasítások (illetve néhány belső folyamat, mint amilyeneke a megszakítások) hatására pedig a végrehajtást a memória más pontján folytatja. Az éppen végrehajtandó programutasítás helyét a memóriában a programszámláló (program counter) mutatja, mely az utasítások végrehajtása után növekszik, és amit az ugrások megváltoztatnak.
A gépi kód olyan program, mely a gép által megértett utasításokból áll. A Neumann architektúrán alapuló gépek program nélkül abszolút semmit sem tudnak csinálni.
A gépi kódú programokat - az egyedülieket, melyet egy ilyen számítógép megért - általában magasabb szintű programozási nyelveken készítik, és azt fordítóprogramokkal (compiler) vagy értelmezőprogrammal (interpreter) alakítják át gépi kódra.
A cikk épp fordítás alatt van, kérlek, ne módosíts rajta! --grin 2004 április 3, 11:24 (CEST)
Software
Program is sometimes used as a synonym for "software"; although the main part of any software is programs, software also often includes resource files that contain data of some kind; these are not part of the program per se.
Neural Networks
In neural network computers, many computing units with many connections between these units work in concert to solve problems. While there are many architectures following this general model, the programming of these computers often consists of weights on each connection and thresholds within the nodes. As the machine 'learns', these weights and thresholds change. In most neural networks, the learned state can be saved and later restored, making it a computer program.
Some neural networks learn from scratch every time they are turned on, and don't have programs, per se.
Virtual Machines
Many programs today run in a virtual machine. An idealized instruction set is created on top of the actual instruction set of the machines that run the program inside of the virtual machine. Many non Von Neumann machines exist only as simulations implemented as virtual machines and have not been constructed using hardware.
Analog Computers
In analog computers, as opposed to digital computers, the states saved are not discrete values like the zeros and ones of most common computers, but are rather saved as a more continuous value. For example, in the Water integrator the initial state was set by setting valve flow rates, and the amount of water in various containers of the machine.
Certain insectoid autonomous robots are good examples of this type of computer that has no program in the classic sense. They are hard wired and learn from their environment.
Data
Computer programs are generally assumed to be that part of the computer's initial state that is not data. While this distinction is trivial in most digital Von Neumann type computers, it gets much more difficult to quantify in other architectures. Are the weights in a neural network data or program? In a simulation of a neural network, they are clearly implemented as data, however they simulate program for the virtual machine. It's even more fuzzy for most analog computers. For example, is the water in a Water integrater program or data?
Algorithms
An abstract program is sometimes called an algorithm.
Computer programs are now also the subject of mathematics - for example, algorithmic information theory studies the behavior of idealized computers executing randomly generated computer programs.
An alternative British spelling is computer programme, although this is rare and the British spelling in this context is generally 'program'.