What is the difference between a 'thread' and a 'process'?

Answer Posted / swaroopa

Process is a program in execution whereas thread is a
separate path of execution in a program. Process & Thread
share almost all datastructure except (thread has it's own
register & stack area). Process is a program under
execution,but thread is a light weight process which has
seperate way of execution.Threads are part of
process.Single process can contain number of threads at a
time.

A process is a collection of virtual memory space, code,
data, and system resources.

All thread with in a process share process
instruction,code & data segment,open file descriptor,signal
handler,userID and GroupID.

Thread has its own set of register including program
counter,stack pointer

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about return code?

642


How do you find out What is your shell?

598


What is shift command in shell script?

539


What is awk in shell script?

766


What is subshell?

536






How do I run a shell script in powershell?

560


What is @echo off?

577


What are types of shells?

561


How to print all the arguments provided to the script?

563


What is the conditional statement in shell scripting?

665


What is the fastest scripting language?

561


Is shell a scripting language?

578


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1797


What are the different types of commonly used shells on a typical linux system?

556


How to print all array elements and their respective indexes?

518