DIFFERENCE BETWEEN PROCESS AND THREAD?
PROCESS IS A COLLECTION OF VIRTUAL MEMORY SPACE,CODE ,DATA AND SYSTEM RESOURCES.
A THREAD IS A CODE THAT IS TO BE SERIALLY EXECUTED WITHIN THE PROCESS.
A PROCESSOR EXECUTES THREADS NOT PROCESS,A PROCESS HAVE ATLEAST HAS ONE THREAD CALLED PRIMARY THREAD.THREADS HAVE OWN SET OF STACK POINTER , REGISTERS.
THE MAIN DIFFERENCE BETWEEN THREAD AND PROCESS IS:
1.THREADS SHARE THE ADDRESS SPACE THAT PROCESS CREATED AND PROCESS HAVE THEIR OWN ADDRESS
2.THREADS CAN COMMUNICATE WITH EACH OTHER , WHEREAS PROCESS CANNOT , NEED TO COMMUNICATE USING INTER PROCESS.
3.NEW THREADS ARE EASILY CREATED , BUT NEW PROCESS NEED DUPLICATION OF PARENT PROCESS
4.CHANGES TO THREAD MAY AFFECT TO OTHER THREADS.CHANGES TO PROCESS NOT AFFECT TO CHILD CLASSES
PROCESS IS A COLLECTION OF VIRTUAL MEMORY SPACE,CODE ,DATA AND SYSTEM RESOURCES.
A THREAD IS A CODE THAT IS TO BE SERIALLY EXECUTED WITHIN THE PROCESS.
A PROCESSOR EXECUTES THREADS NOT PROCESS,A PROCESS HAVE ATLEAST HAS ONE THREAD CALLED PRIMARY THREAD.THREADS HAVE OWN SET OF STACK POINTER , REGISTERS.
THE MAIN DIFFERENCE BETWEEN THREAD AND PROCESS IS:
1.THREADS SHARE THE ADDRESS SPACE THAT PROCESS CREATED AND PROCESS HAVE THEIR OWN ADDRESS
2.THREADS CAN COMMUNICATE WITH EACH OTHER , WHEREAS PROCESS CANNOT , NEED TO COMMUNICATE USING INTER PROCESS.
3.NEW THREADS ARE EASILY CREATED , BUT NEW PROCESS NEED DUPLICATION OF PARENT PROCESS
4.CHANGES TO THREAD MAY AFFECT TO OTHER THREADS.CHANGES TO PROCESS NOT AFFECT TO CHILD CLASSES
No comments:
Post a Comment