HOME

TheInfoList



OR:

In computing, a task is a unit of
execution Capital punishment, also known as the death penalty, is the state-sanctioned practice of deliberately killing a person as a punishment for an actual or supposed crime, usually following an authorized, rule-governed process to conclude that t ...
or a unit of work. The term is ambiguous; precise alternative terms include ''
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 s ...
'',
light-weight process In computer operating systems, a light-weight process (LWP) is a means of achieving multitasking. In the traditional meaning of the term, as used in Unix System V and Solaris, a LWP runs in user space on top of a single kernel thread and shares ...
, '' thread'' (for execution), ''step'', '' request'', or ''query'' (for work). In the adjacent diagram, there are queues of incoming work to do and outgoing completed work, and a
thread pool In computer programming, a thread pool is a software design pattern for achieving concurrency of execution in a computer program. Often also called a replicated workers or worker-crew model, a thread pool maintains multiple threads waiting for ...
of threads to perform this work. Either the work units themselves or the threads that perform the work can be referred to as "tasks", and these can be referred to respectively as requests/responses/threads, incoming tasks/completed tasks/threads (as illustrated), or requests/responses/tasks.


Terminology

In the sense of "unit of execution", in some
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s, a task is synonymous with 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 s ...
, and in others with a thread. In non-interactive execution ( batch processing), a task is a unit of execution within a
job Work or labor (or labour in British English) is intentional activity people perform to support the needs and wants of themselves, others, or a wider community. In the context of economics, work can be viewed as the human activity that cont ...
, with the task itself typically a process. The term " multitasking" primarily refers to the processing sense – multiple tasks ''executing'' at the same time – but has nuances of the work sense of multiple tasks being ''performed'' at the same time. In the sense of "unit of work", in a job (meaning "one-off piece of work") a task can correspond to a single step (the step itself, not the execution thereof), while in batch processing individual tasks can correspond to a single step of processing a single item in a batch, or to a single step of processing all items in the batch. In online systems, tasks most commonly correspond to a single ''request'' (in
request–response In computer science, request–response or request–reply is one of the basic methods computers use to communicate with each other in a network, in which the first computer sends a ''request'' for some data and the second ''responds'' to the r ...
architectures) or a ''query'' (in
information retrieval Information retrieval (IR) in computing and information science is the process of obtaining information system resources that are relevant to an information need from a collection of those resources. Searches can be based on full-text or other co ...
), either a single stage of handling, or the whole system-wide handling.


Examples

In the
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's most ...
programming language, these two concepts (unit of work and unit of execution) are conflated when working directly with threads, but clearly distinguished in th
Executors
framework:


IBM terminology

IBM's use of the term has been influential, though underlining the ambiguity of the term, in IBM terminology, "task" has dozens of specific meanings, including: * A unit of work representing one of the steps in a process. * A unit of work to be accomplished by a device or process. * A process and the procedures that run the process. * A set of actions designed to achieve a particular result. A task is performed on a set of targets on a specific schedule. * A unit of computation. In a parallel job, two or more concurrent tasks work together through message passing and shared memory. Although it is common to allocate one task per physical or logical processor, the terms "task" and "processor" are not interchangeable. * An activity that has business value, is initiated by a user, and is performed by software. In
z/OS z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions.Starting with the earliest: * O ...
specifically, it is defined precisely as: * "In a multiprogramming or multiprocessing environment, one or more sequences of instructions treated by a control program as an element of work to be accomplished by a computer." The term task in OS/360 through z/OS is roughly equivalent to light-weight process; the tasks in a job step share an address space. However, in
MVS/ESA Multiple Virtual Storage, more commonly called MVS, was the most commonly used operating system on the System/370 and System/390 IBM mainframe computers. IBM developed MVS, along with OS/VS1 and SVS, as a successor to OS/360. It is unrelated ...
through z/OS, a task or
Service Request Block {{unreferenced, date=December 2019 A Service Request Block (SRB) is a data structure of MVS/370 and successor versions of IBM mainframe operating systems employed mainly, but not exclusively, by the Start Input/Output interface. An SRB may be con ...
(SRB) may have access to other address spaces via its access list.


Linux kernel

The term ''task'' is used in the
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ope ...
(at least since v2.6.13, up to and including v4.8) to refer to a unit of execution, which may share various system resources with other tasks on the system. Depending on the level of sharing, the task may be regarded as a conventional thread or
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 s ...
. Tasks are brought into existence using the clone() system call, where a user can specify the desired level of resource sharing.


History

The term ''task'' for a part of a job dates to
multiprogramming In computing, multitasking is the concurrent execution of multiple tasks (also known as processes) over a certain period of time. New tasks can interrupt already started ones before they finish, instead of waiting for them to end. As a resul ...
in the early 1960s, as in this example from 1961: The term was popularized with the introduction of
OS/360 OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJO ...
(announced 1964), which featured Multiprogramming with a Fixed number of Tasks (MFT) and
Multiprogramming with a Variable number of Tasks OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB ...
(MVT). In this case tasks were identified with light-weight processes, a job consisted of a number of tasks, and, later, tasks could have sub-tasks (in modern terminology,
child process A child process in computing is a process created by another process (the parent process). This technique pertains to multitasking operating systems, and is sometimes called a subprocess or traditionally a subtask. There are two major procedures ...
es). Today the term "task" is used very ambiguously. For example, the
Windows Task Manager Task Manager, previously known as Windows Task Manager, is a task manager, system monitor, and startup manager included with Microsoft Windows systems. It provides information about computer performance and running software, including name of ru ...
manages (running) ''processes'', while
Windows Task Scheduler Task Scheduler (formerly Scheduled Tasks) is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for W ...
schedules ''programs'' to execute in future, what is traditionally known as a
job scheduler A job scheduler is a computer application for controlling unattended background program execution of jobs. This is commonly called batch scheduling, as execution of non-interactive jobs is often called batch processing, though traditional ''job' ...
, and uses the .job extension. By contrast, the term "
task queue In computing, scheduling is the action of assigning ''resources'' to perform ''tasks''. The ''resources'' may be processors, network links or expansion cards. The ''tasks'' may be threads, processes or data flows. The scheduling activity is ...
" is commonly used in the sense of "units of work".


See also

*
Task parallelism Task parallelism (also known as function parallelism and control parallelism) is a form of parallelization of computer code across multiple processors in parallel computing environments. Task parallelism focuses on distributing tasks—concurren ...
*
Task queue In computing, scheduling is the action of assigning ''resources'' to perform ''tasks''. The ''resources'' may be processors, network links or expansion cards. The ''tasks'' may be threads, processes or data flows. The scheduling activity is ...


References

{{DEFAULTSORT:Task (Computing) Computing terminology