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

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

593


Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.

801


What is bourne shell scripting?

533


Explain how you Automate your application using Shell scripting.

1849


Is bash an operating system?

546






What is a shell environment?

577


write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2230


What is shell and terminal?

575


How do you know which shell I am using?

588


What are script files?

551


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

1709


How do I save a powershell script?

560


What is the lifespan of a variable inside a shell script?

1124


How to check if the previous command was run successfully?

597


Write a command sequence to find the count of each word?

542