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?
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.
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.
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.
noun. a tax levied by the government at an intermediate stage in the production of goods.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With