MZ Interview Question

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

Interview Answers

Anonymous

May 25, 2015

A single process encapsulates threads.

Anonymous

May 27, 2015

Thread specific items: -stack -signal mask -scheduling policy and priority -program counter -register set Shared between threads: -code segment / section -data segment / section -OS resources i.e.) task , open files, signals -address space General: -threads share same address space as the process that creates them -threads have their own data segment -processes use IPC to communicate between themselves -task switching between threads is light weight -processes carry their own state, threads share state ...

Anonymous

Feb 15, 2016

Thread is abstract of Process. rest as above