Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is the difference between Task & Process?

Status
Not open for further replies.

webmegamaster

Newbie level 4
Joined
Nov 17, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
What is the difference between Task & Process? I would like to know about that in detail.
 

Re: Task Vs Process

Task is a single process which runs in parallel... it's same at thread....
 

Re: Task Vs Process

webmegamaster said:
What is the difference between Task & Process?
These terms are often tossed around rather loosely, but in general:

"Task" and "process" are synonyms for the same thing. This is an execution thread that has a private (and usually protected) memory space.

Sometimes the term "task" is used when what is really meant is "thread." A thread is not the same thing as a process: threads usually are able to share common memory while processes generally access private memory that is not accessible to other processes.
 

Task Vs Process

you can simply say that task is what that runs in kernel space while processes run in user space

now after 2.6 kernel we have threads both in use as well as kernel space.
 

Task Vs Process

A task is "an execution path through address space". In other words, a set of program instructions that is loaded in memory. The address registers have been loaded with the initial address of the program. At the next clock cycle, the CPU will start execution, in accord with the program. The sense is that some part of 'a plan is being accomplished'. As long as the program remains in this part of the address space, the task can continue, in principle, indefinitely, unless the program instructions contain a halt, exit, or return.

* In the computer field, "task" has the sense of a real-time application, as distinguished from process, which takes up space (memory), and execution time. See operating system.
o Both "task" and "process" should be distinguished from event, which takes place at a specific time and place, and which can be planned for in a computer program.
+ In a computer graphical user interface (GUI), an event can be as simple as a mouse click.
+ In older text-based computer interfaces, an event might be a keystroke



n computing, a process is a running instance of a program, including all variables and other state. A multitasking operating system may just switch between processes to give the appearance of many processes executing concurrently or simultaneously, though in fact only one process can be executing at any one time per CPU thread.

Some new processors, such as Athlon 64 X2 can actually execute two processes at a time, because they are multicore processors.

Intel's Pentium 4 with Hyperthreading capability have a different design,some doubled parts of the core allow the processor to make a context switch in almost no time.

It is usual to associate a single process with a main program, and 'daughter' processes with any spin-off, parallel processes, which behave like asynchronous subroutines. A process is said to own resources, of which an image of its program (in memory) is one such resource. (Note, however, that in multiprocessing systems, many processes may run off of, or share, the same reentrant program at the same location in memory— but each process is said to own its own image of the program.)

Processes are often called tasks in embedded operating systems. The sense of 'process' (or task) is 'something that takes up time', as opposed to 'memory', which is 'something that takes up space'. (Historically, the terms 'task' and 'process' were used interchangeably, but the term 'task' seems to be dropping from the computer lexicon.)

The above description applies to both processes managed by an operating system, and processes as defined by process calculi.

The operating system keeps its processes separated and allocates the resources they need so that they are less likely to interfere with each other and cause system failures (e.g., deadlock or thrashing). The operating system may also provide mechanisms for inter-process communication to enable processes to interact in safe and predictable ways.

In general, a computer system process consists of (or is said to 'own') the following resources:

* An image of the executable computer code associated with a program.
* Memory, (typically some region of virtual memory and/or real memory) which contains the executable code and process-specific data, including initial, intermediary, and final products.
* Operating system descriptors of resources that are allocated to the process, such as file descriptors (Unix terminology) or handles (Windows).
* Security attributes, such as the process owner and the process' set of permissions.
* Processor state (context), such as the content of registers, physical memory addressing, etc. The state is typically stored in computer registers when the process is executing, and in memory otherwise.

Any subset of resources, but typically at least the processor state, may be associated with each of the process' threads in operating systems that support threads or 'daughter' processes.

If a task/process is suspended, then it is eligible for swapping to disk, but this is transparent in a virtual memory system, where blocks of memory values may be really on disk and not in physical memory at any time. Note that even unused portions of active processes/tasks (executing programs) are eligible for swapping to disk. All parts of an executing program and its data do not have to be in physical memory for the associated process to be active. However, if the process attempts to access code or data on disk, then it will be suspended while that content is moved into physical memory through a process known as paging.
 

Re: Task Vs Process

A task has a single process, but one process can have multiple task in it.

Added after 32 seconds:

A task has a single process, but one process can have multiple task in it.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top