HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, a task context is the minimal set of data used by a task (which may be a
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management *Business process, activities that produce a specific se ...
, thread, or
fiber Fiber or fibre (from la, fibra, links=no) is a natural or artificial substance that is significantly longer than it is wide. Fibers are often used in the manufacture of other materials. The strongest engineering materials often incorporate ...
) that must be saved to allow a task to be
interrupt In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted, ...
ed, 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 In computer systems programming, an interrupt handler, also known as an interrupt service routine or ISR, is a special block of code associated with a specific interrupt condition. Interrupt handlers are initiated by hardware interrupts, softwar ...
. Thus, the smaller the context is, the smaller the latency is. The context data may be located in
processor register A processor register is a quickly accessible location available to a computer's processor. Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-only. ...
s, memory used by the task, or in
control register A control register is a processor register which changes or controls the general behavior of a CPU or other digital device. Common tasks performed by control registers include interrupt control, switching the addressing mode, paging control, a ...
s used by some
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s to 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 In computing, a context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point, and then restoring a different, previously saved, state. This allows multiple processes ...
, even if this can be stored for some uses (checkpointing).


Context types

In some computer languages like C#, there is also the concept of ''safe''/''secure context''. For instance, if an
array An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
is needed inside a
structure A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
, it can be added to it since version 2.0, but only in an unsafe/unsecure context.Structures in C# 2.0
/ref> Here is an example code: struct ParameterRepresentation ; Th
fixed
keyword prevents the
garbage collector A waste collector, also known as a garbageman, garbage collector, trashman (in the US), binman or (rarely) dustman (in the UK), is a person employed by a public or private enterprise to collect and dispose of municipal solid waste (refuse) and r ...
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) In information technology and computer science, a system is described as stateful if it is designed to remember preceding events or user interactions; the remembered information is called the state of the system. The set of states a system can oc ...

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


External links


Context
S-Cube Knowledge Model {{DEFAULTSORT:Context (Computing) Process (computing)