Jump to content

Program lifecycle phase

From Wikipedia, the free encyclopedia

Program lifecycle phases are the stages that 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]

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.[1]

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.[2]

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.[3]

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.[4]

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.[5]

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.[6][7]

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.[8][9]

Value of the concept of Phases of a Program

[edit]

One way that these concepts provide value is in parallel computation. One of the key functions of automated parallelization tools is specializing the code to specific hardware.[10][11] Such specialization cannot be performed until the exact details of the hardware are known. If the desire is for the same code to run on a variety of hardware platforms, even ones not yet in existence at the time the program is written and distribution begins, then such specialization cannot happen during edit or compile phases. The earliest phase would be the distribution phase,[12] if a system were put in place that gathers hardware information, then chooses an executable that is already specialized to that hardware or substantially similar hardware, or generates a specialized binary on the fly. Likewise, specialization could be performed at load time,[13] by invoking a binary rewriting tool [14] in combination with a tool that uses the control flow structure to generate a specialized form.

References

[edit]
  1. ^ Franchitti, Jean-Claude (13 November 2024). "4.2 Building C Programs". Introduction to Computer Science. OpenStax. Retrieved 12 November 2025.
  2. ^ Aho, Alfred V.; Lam, Monica S.; Sethi, Ravi; Ullman, Jeffrey D. (2006). Compilers: Principles, Techniques, and Tools (2nd ed.). Addison-Wesley. ISBN 978-0321486813.
  3. ^ Levine, John R. (1999). Linkers and Loaders. Morgan Kaufmann. ISBN 978-1558604964.
  4. ^ "Software Distribution – an overview". ScienceDirect Topics. Elsevier. Retrieved 12 November 2025.
  5. ^ "Overview of Windows Installer". Microsoft Learn. Microsoft. 7 January 2021. Retrieved 12 November 2025.
  6. ^ "ld.so(8) — dynamic linker/loader". man7.org Linux man-pages. Michael Kerrisk. Retrieved 12 November 2025.
  7. ^ "Linking (CS:APP lecture slides) — load-time vs run-time dynamic linking" (PDF). Carnegie Mellon University. 26 October 2023. Retrieved 12 November 2025.
  8. ^ "execve(2) — execute program". man7.org Linux man-pages. Michael Kerrisk. Retrieved 12 November 2025.
  9. ^ "Linking (CS:APP lecture slides) — run-time dynamic linking (dlopen)" (PDF). Carnegie Mellon University. 26 October 2023. Retrieved 12 November 2025.
  10. ^ Midkiff, Samuel P. (2012). Automatic Parallelization: An Overview of Fundamental Compiler Techniques (PDF). Synthesis Lectures on Computer Architecture. Morgan & Claypool. ISBN 978-1608458103. Retrieved 12 November 2025.
  11. ^ Tournavitis, Georgios; O’Boyle, Michael (2009). Towards a holistic approach to auto-parallelization. ACM. doi:10.1145/1543135.1542496. Retrieved 12 November 2025.
  12. ^ "Device targeting (beta)". Android Developers. Google. 21 July 2025. Retrieved 12 November 2025.
  13. ^ "LTO (Link Time Optimization)". GCC Internals Manual. Free Software Foundation. Retrieved 12 November 2025.
  14. ^ Panchenko, Maksim; Fedorov, Andrey; Ottoni, Guilherme; Condon, Rodrigo (2019). BOLT: A Practical Binary Optimizer for Data Centers and Beyond. IEEE. pp. 2–14. doi:10.1109/CGO.2019.8661187. Retrieved 12 November 2025.