Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Task vs. process, is there really any difference?

Tags:

I'm studying for my final exams in my CS major on the subject distributed systems and operating systems.

I'm in the need for a good definition for the terms task, process and threads. So far I'm confident that a process is the representation of running (or suspended, but initiated) program with its own memory, program counter, registers, stack, etc (process control block). Processes can run threads which share memory, so that communication via shared memory is possible in contrast to processes which have to communicate via IPC.

But what's the difference between tasks and process. I often read that they're interchangable and that the term task isn't used anymore. Is that really true?

like image 352
Jens Kohl Avatar asked Apr 01 '10 14:04

Jens Kohl


People also ask

Are task and process the same?

Tasks are made up of actions or steps. A process is an upper level description of a series of major steps required to accomplish an objective. Processes are generally made up of procedures or tasks. A task is another way of describing a procedure.

What is the difference between task thread and process?

The difference between a thread and a process is, when the CPU switches from one process to another the current information needs to be saved in Process Descriptor and load the information of a new process. Switching from one thread to another is simple. A task is simply a set of instructions loaded into the memory.

What is the relation between steps task and processes?

A task is the steps for doing a particular piece of work. Procedure are activities made up of a series of tasks. A process is an upper level description of a series of activities required to accomplish an objective. Processes are made up of procedures or tasks.

What is a processing task?

noun. a tax levied by the government at an intermediate stage in the production of goods.


1 Answers

The term "task" is mostly used in the context of scheduling*, when it can refer to either a thread or a *process***, that can be scheduled to run on a processor.
From the scheduler's point of view there might be little-to-no difference between a thread and a process - both represent a task that must be scheduled.

Recently, the term "task" is gaining more-widespread usage, especially among .NET developers, thanks to e.g. the Task Parallel Library. Within it, tasks are units of work that can be scheduled to run on threads from a pool of worker threads.

* e.g in kernel programming, esp. on Linux
** theoretically, you could make up your schedulable entities

like image 173
Andras Vass Avatar answered Nov 15 '22 12:11

Andras Vass