When a computer system creates a new context based on a pre-existing model or scheme, the model is said to have been instantiated. The encapsulated context that results from this instantiation process is referred to as an instance of the model or scheme. This general concept applies specifically across computer science in several ways.

Object-oriented programming

Typically, OOP object instances share a data layout scheme in common with numerous other runtime instances—particularly those of the same or similar data type. In order to ensure that the values stored in each instance are kept separate for the duration of their lifetimes, the system must allocate—and privately associate with each respective new context—a distinct copy of this layout image. This prevents the values in one instance from interfering with the values in any other.

Machine identity

A computer instance can be a software state which exposes an operating system or other hosting environment. Available resources in this virtual machine typically include access to storage, a CPU, and GPU, for example.

Computer graphics

In computer graphics, a polygonal model can be instantiated in order to be drawn several times in different locations in a scene. This is a technique that can be used to improve the performance of rendering, since a portion of the work needed to display each instance is reused.

Operating systems

In the context of POSIX-oriented operating systems, the term "(program) instance" typically refers to any executing process instantiated from that program (via system calls, e.g. fork() and exec()); that is, each executing process in the OS is an instance of some program which it has been instantiated from.[1]

References

  1. Bach, Maurice J. (1986). The Design of the UNIX Operating System. Prentice Hall. pp. 10, 24. ISBN 0-13-201799-7. Archived from the original on 2010-03-15.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.