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

edit

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

edit

References

edit
edit

📚 Artikel Terkait di Wikipedia

Context-aware pervasive systems

Context-aware computing refers to a general class of mobile systems that can sense their physical environment, and adapt their behavior accordingly. Three

Context awareness

Context awareness originated as a term from ubiquitous computing or as so-called pervasive computing which sought to deal with linking changes in the environment

Fog computing

computing), storage, and communication locally and routed over the Internet backbone. In 2011, the need to extend cloud computing with fog computing emerged

Daemon (computing)

can apply to many computing systems, the term daemon is used almost exclusively in the context of Unix-based systems. In other contexts, different terms

Ubiquitous computing

Ubiquitous computing (or "ubicomp") is a concept in software engineering, hardware engineering and computer science where computing is made to appear seamlessly

Computing platform

components of a computing platform may be obfuscated under layers of abstraction, the summation of the required components comprise the computing platform.

Admin

form of the words administration or administrator, particularly in computing contexts Admin, son of Arni, a minor biblical figure All pages with titles

Edge computing

Edge computing is a distributed computing model that brings computation and data storage closer to the sources of data. More broadly, it refers to any