Difference between Job, Task and Process
Job is work that needs to be done.
A task is a piece of work that needs to be done.
The process is a series of actions that is done for a particular purpose.
Job and task define the work to be done, whereas process defines the way the work can be done or how the work should be done.
Moving onto the computational meanings of the three of them, here is a brief introduction –
1. PROCESS :
- The process is a program under execution. A program can be defined as a set of instructions.
The program is a passive entity and the process is an active entity. When we execute a program, it remains on the hard drive of our system and when this program comes into the main memory it becomes a process.
The process can be present on a hard drive, memory or CPU.
In windows we can see each of the processes (running) in windows task manager. All the processes running in the background are visible under the processes tab in Task Manager.
Another example may be a printer program running in the background while we perform some other task on screen. That printer program will be called a process.
- A process goes through many states when it is executed. Some of these states are start, ready, running, waiting or terminated/executed. These names aren’t standardized. These states are shown in the Process state transition diagram or process life cycle.
- More than one process can be executed at the same time. When multiple processes are executed at the same time, it needs to be decided which process needs to be executed first. This is known as scheduling of a process or process scheduling. Thus, a process is also known as a schedulable and executable unit.
- A process has certain attributes and a process also has a process memory. Attributes of process are process id, process state, priority, etc.
A process memory is divided into 4 sections – text section, data section, heap and stack.
- The process also facilities interprocess communication. When multiple processes are executed, it is necessary for processes to communicate using communication protocols to maintain synchronization.
- To further dive into details of the process, you may refer to – Introduction of process management.
2. TASK :
- Task is a unit of work being executed. Task in Operating System may be synonymous with process. A task is a subpart of a job. Tasks combine to form a job.
- The task is obscure in the sense that it has many meanings.
The task may be a thread, process, a single job and much more.
A task is termed as a thread when it is undergoing execution.
- Example – When we run a thread in java, it is called a task . If a printer prints a document, it is said to perform a printing task. When the computer computes the addition of two numbers entered by the user, it is also a task (addition task).
- More than one task can be performed together at the same time and it is known as multitasking. When more than one task is performed in parallel at the same time, then it is known as parallel tasking. Multitasking is also known as time sharing. Multitasking is an extension of a multiprogramming Operating System.
3. JOB :
- A job is a complete unit of work under execution. A job consists of many tasks which in turn, consist of many processes. A job is a series of tasks in a batch mode. Programs are written to execute a job.
- Job is also obscure as it too holds many meanings. Jobs and tasks are used synonymously in computational work.
- Example – Job of a computer is taking input from the user, process the data and provide with the results. This job can be divided into several small tasks, taking input as one task, processing the data as another task, outputting the results as yet another task.
These tasks are further executed in small processes. The task of taking input has a number of processes involved. First of all, the user enters the information. Then that information is converted to binary language. Then that information goes to the CPU for further execution. Then the CPU performs necessary actions to be taken. Hence, a job is broken into tasks and these tasks are executed in the form of processes.
- A job may be one job at a time or multiple jobs at a time. A single job can be called a task. To perform multiple jobs at a time a job needs to be scheduled. A job scheduler is a kind of application program that schedules jobs. A job scheduling is also known as batch scheduling.
The concept of job, process and task revolves around each other. Job, task and process may be considered the same or different in reference to the context they refer to. A process is an isolated entity of Operating System. A task may be called a process if it is a single task. A job may be called a task if the job to be performed is a single unit of work. A process or group of processes can be termed as a task and a group of tasks can be termed as a job.