encyclopegia.org

Context (computing)

In computer science, a task context is the minimal set of data used by a task (which may be a process, thread, or fiber) that must be saved to allow a task to be interrupted, and later continued from the same point. The concept of context assumes significance in the case of interruptible tasks, wherein, upon being interrupted, the processor saves the context and proceeds to serve the interrupt service routine. Thus, the smaller the context is, the smaller the latency is. The context data may be located in processor registers, memory used by the task, or in control registers used by some operating systems to directly manage the task. The storage memory (files used by a task) is not concerned by the "task context" in the case of a context switch, even if this can be stored for some uses (checkpointing). The context can also be viewed as a mechanism that allows a state of a program to be transferred between its components.

In computer science, a task context is the minimal set of data used by a task (which may be a process, thread, or fiber) that must be saved to allow a task to be interrupted, and later continued from the same point. The concept of context assumes significance in the case of interruptible tasks, wherein, upon being interrupted, the processor saves the context and proceeds to serve the interrupt service routine. Thus, the smaller the context is, the smaller the latency is. The context data may be located in processor registers, memory used by the task, or in control registers used by some operating systems to directly manage the task. The storage memory (files used by a task) is not concerned by the "task context" in the case of a context switch, even if this can be stored for some uses (checkpointing). The context can also be viewed as a mechanism that allows a state of a program to be transferred between its components. ==Context types== In some computer languages like C#, there is also the concept of safe/secure context. For instance, if an array is needed inside a structure, it can be added to it since version 2.0, but only in an unsafe/unsecure context. Here is an example code: struct ParameterRepresentation { char target; char taskStart; char taskType; fixed byte traceValues[m_MAX_BYTES]; }; The fixed keyword prevents the garbage collector from relocating this variable. The access to an array is like in C++, i.e. using pointer arithmetic, where individual elements of the array can be accessed over its indices. ==See also== State (computer science) Task (computing) Context and Adaptivity in Pervasive Computing Environments: Links with Software Engineering and Ontological Engineering, article in Journal of Software, Vol 4, No 9 (2009), 992-1013, Nov 2009 by Ahmet Soylu, Patrick De Causmaecker and Piet Desmet ==References==

References

No reference rows published for this article.

Cite this article

MLA

"Context (computing)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/context-computing. Accessed 24 November 2026.

Chicago

"Context (computing)." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/context-computing.

APA

encyclopegia.org. (2025). Context (computing). Retrieved November 24, 2026, from https://encyclopegia.org/wiki/context-computing

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Michael Saward (priest)

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1278809743 · 0.5 · snapshot enwiki-001278809743

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.