cancel
Showing results for 
Search instead for 
Did you mean: 

what is the diff between thread,task and process clearly

Former Member
0 Kudos

hi, i have a doubt about difference between task , thread and process. please clarify my doubt with clear information, i am waiting for u r reply

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Guruvulu,

Kindly close the thread if your doubt has been cleared. Else do revert for further queries.

Regards,

Pooja.

Former Member
0 Kudos

Hi

Thread in Java->

A thread is a thread of execution in a program. The Java Virtual Machine allows an application to have multiple threads of execution running concurrently

Task in ABAP->With a task, you generally process an actual object of an object class, for example you create a customer master record. A task consists of a set of task functions, such as "Save", "Delete" or "Select".

Process in ABAP ->It is a set of steps which are done to perform a specified function.

I hope this will help to solve your problem.

Thanks

Mrutyunjaya Tripathy

Former Member
0 Kudos

Hi,

<b>Process</b>

  • In simple terms, a process is a sequnce of steps under execution.

  • Each process provides the resources needed to execute a program.

  • A process has a virtual address space, executable code, open handles to system objects, a security context, a unique process identifier, environment variables, a base priority, minimum and maximum working set sizes, and at least one thread of execution.

  • Each process is started with a single thread, often called the primary thread, but can create additional threads from any of its threads.

<b>Thread</b>

  • A thread is a program's path of execution

  • In other words, a thread is the entity within a process that can be scheduled for execution.

  • All threads of a process share its virtual address space and system resources.

  • In addition, each thread maintains exception handlers, a scheduling priority, thread local storage, a unique thread identifier, and a set of structures the system will use to save the thread context until it is scheduled.

For more information on threads, refer this link..

http://java.sun.com/docs/books/tutorial/essential/threads/definition.html

Hope this helps.

Regards,

Uma

Former Member
0 Kudos

Hi Guruvulu,

<b>Threads</b> enhance performance and functionality by allowing a program to efficiently perform multiple <b>tasks</b> simultaneously. Task means any job that has to be done.

In the case of <i><b>common memory</b></i> <b>threads</b> naturally have shared data regions while it has to be specially created and initialized for <b>tasks</b>.

A <b>Process</b> is some job or task which is running in background.A process can have many threads.To perform a task faster we break the process in threads.

Creation of new <b>process</b> requires new resources and Address space whereas the <b>thread</b> can be created in the same address space of the process which not only saves space and resources but are also easy to create and delete,and many threads can exist in a process.

Regards,

Pooja.

Message was edited by: Pooja S

Yashpal
Active Contributor
0 Kudos

Hi,

Threads uses the same address space ...means that the parent processs have a processID(in unix ) and if same application is open again a child is created i.e thread which have the same processid as that of parent but its own data ......so if the parent application is closed all the threads can be affected.....like in windows if u open many word document and close the first opened window all the others window may close because its a parent window.....while in proccess based system each application have there own address space and processid so each process data and state is independent of each other .....like in unix system......this techology have both pros and cons....

i thread based technology.......

pros...fast as no need create a address space so memory requirement is less

cons...possible of hang of system because ..one application can affect the state of second....like in windows machines,......

Process based technology.....

pros....safer as process are indpendent of each other ...can be used for large processing of data ...like in server.......linux,unix

cons....memory requirement is more as address space is allocated for each process.......

and task is the JOB to be done......

regards,

Yash

moorthy
Active Contributor
0 Kudos

Hi,

Threads:

A thread is a single sequential flow of control within a program. It can not run its own. It is not a program.

Threads enhance performance and functionality in various programming languages .

Tasks: Are nothin gbut "To do " Items. So we can execute different tasks with the use of Threads.

Process:

Process is nothing but unit of work.

Threads share memory inside a process, vice-versa is not true.

Linux developers are using the word "Task" not thread nor Process.

So I think , there is not much difference between Process and the task. But there is a difference between process and the thread.

For more info about threads , go thru following link.

http://www.faqs.org/faqs/threads-faq/part1/

Hope this helps,

Regards,

Moorthy