Program lifecycle phase

From HandWiki
Revision as of 05:15, 5 August 2021 by imported>PolicyEnforcerIA (attribution)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Program lifecycle phases are the stages a computer program undergoes, from initial creation to deployment and execution. The phases are edit time, compile time, link time, distribution time, installation time, load time, and run time.

Lifecycle phases do not necessarily happen in a linear order, and they can be intertwined in various ways. For example, when modifying a program, software developers may need to repeatedly edit, compile, install, and execute it on their own computers to ensure sufficient quality before it can be distributed to users; copies of the modified program are then downloaded, installed, and executed by users on their computers.

Phases

Edit time is when the source code of the program is being edited. This spans initial creation to any bug fix, refactoring, or addition of new features. Editing is typically performed by a person, but automated design tools and metaprogramming systems may also be used.

Compile time is when source code is translated into machine code by a compiler. Part of this involves language checking, such as ensuring proper use of the type system. The result of a successful compilation is an executable.

Link time connects all of the necessary machine code components of a program, including externals. It is very common for programs to use functions implemented by external libraries, all of which must be properly linked together. There are two types of linking. Static linking is when the connection is made by the compiler, which is always prior to execution. Dynamic linking, however, is performed by the operating system (OS) just before, or even during, execution.

Distribution time is the process of transferring a copy of a program to a user. The distribution format is typically an executable, but may also be source code, especially for a program written in an interpreted language. The means of distribution can be physical media such as a USB flash drive or a remote download via the Internet.

Installation time gets the distributed program ready for execution on the user's computer, which often includes storing the executable for future loading by the OS.

Load time is when the OS takes the program's executable from storage, such as a hard drive, and places it into active memory, in order to begin execution.

Run time is the execution phase, when the central processing unit executes the program's machine code instructions. Programs may run indefinitely. If execution terminates it will either be normal, expected behavior or an abnormality such as a crash.