What is the use of thread over process?

Answers were Sorted based on User's Feedback



What is the use of thread over process?..

Answer / sandeep patra

Thread is an executable entity but it is bound to its parent
process.
now there are two types of threads.
1. user space threads and
2. kernel thread
now the kernel threads are actually known as light weight
processes.

why light weight????
>>>> as it's context switching times is lesser than all
other process.

now why the context switching time is less????
>>>>> as process have there own process address space and
maintains many more things like userID, ProcessID, groupID,
number of files opened, reisters and blah, blah
whereas thread shares it's parent process's address space
and mainly contains three things like own stack, registers
and thread related data.
so more things to swap need more time that's why thread's
context switching time is less compared to that of a process.

now the answer,
use of thread: thread are used to provide multi-programming
environment.
ok, now u ppl would think that, it can also be done creating
new processes (using fork())
yes we can,
but as i told earlier that the context switch time for
threads are very less.
moreover the inter-thread communication is more easier than
inter-process communication as all threads of a single
process uses the same address space.

Is This Answer Correct ?    61 Yes 7 No

What is the use of thread over process?..

Answer / vinay verma

Thread is a lightwait processes .it use the same resource of
main process(parant process)and it runs in the same address
space of main program .

Is This Answer Correct ?    38 Yes 12 No

What is the use of thread over process?..

Answer / mohan reddy.k.v

Thread is nothing but a normal process which shares some of
the resources with its parent, so that it decreases burden
of creating shared resources again.

Is This Answer Correct ?    26 Yes 19 No

What is the use of thread over process?..

Answer / aditya ganjiwale

Thread is sequence of execution. It is lighwieght process
hence it share a minimum resources

Is This Answer Correct ?    10 Yes 5 No

What is the use of thread over process?..

Answer / angel

Thread is a light weight process. It executes some line of
code independent of current execution. Threads are faster is
processing as compared to process. Process have their own
address space but threads share the same address space of
process under which process they are. So context switching
happened much faster in case of threads.

Is This Answer Correct ?    1 Yes 0 No

What is the use of thread over process?..

Answer / sachin tyagi

thread is part of process.it is a lightweight component
because threads take same memory area.we use threads for
faster execution.

Is This Answer Correct ?    2 Yes 3 No

What is the use of thread over process?..

Answer / mohit sharma

Thread is a light weight process used to faster the processing of a process by using the time sharing technique by which a single process is divided into multiple threads and all they work together to make quick execution time. They all share the same address space..

Is This Answer Correct ?    2 Yes 3 No

What is the use of thread over process?..

Answer / sharmila

thread is the actual executing entity inside a process
whereas a process is much more. Normally,a process will
have a single thread of execution

Is This Answer Correct ?    11 Yes 14 No

What is the use of thread over process?..

Answer / nayan

all threads can use the same global memory whereas
communication between process will happen via IPC

Is This Answer Correct ?    6 Yes 11 No

What is the use of thread over process?..

Answer / krishna

threads are the process stimulators which actually aid and
help in executing the process faster more the threads
faster the processing

Is This Answer Correct ?    19 Yes 27 No

Post New Answer

More Linux Threads Interview Questions

Can we start two threads at a time?

0 Answers  


Is face threading bad?

0 Answers  


What is a lightweight thread?

0 Answers  


What are linux kernel threads?

0 Answers  


Are processes faster than threads?

0 Answers  






Is it better to have more cores or more threads?

0 Answers  


Can a process have 0 threads?

0 Answers  


Explain each system calls used for process management in linux.

0 Answers  


What are the two types of threads?

0 Answers  


Are threads processes?

0 Answers  


How many threads can you run?

0 Answers  


What are threads in c?

0 Answers  


Categories