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 stdin, stdout and stderr?

634


What is shell application?

567


What is the significance of the shebang line in shell scripting?

530


What language is shell scripting?

580


What is the first line in a shell script?

555






What are the advantages of using shell scripts?

584


What is shell geeksforgeeks?

595


What language is used in terminal?

558


Explain about sourcing commands?

637


Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.

567


What is computer cli?

499


How many fields are present in a crontab file and what does each field specify?

582


What are zombie processes?

569


Calculate a real number calculation directly from the terminal and not any shell script.

658


How can the contents of a file inside jar be read without extracting in a shell script?

591