Interviewer And Interviewee Guide

Java Multi-Threading Interview Question:

What is difference between thread and process?

Submitted by: Administrator
Process has its own memory address while the thread share the address of the process by which it is created.
Thread can access the data segment of its process directly while processes can access their own copy of the data segment of its parent process.
Threads have almost no overheads while processes may have overheads.
We can create a new thread easily but to create new process we have to duplicate the parent process.
If any changes in main thread are occurred it can affect the behavior of the other threads of the same process. While in case of process if any changes is occurred in parent process it won't affect the behavior of parent process.
The direct communication is possible between threads of same process while in case of same sibling processes only interprocess communication is possible.
Submitted by: Administrator

Read Online Java Multi-Threading Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.