Daily iOS
CS fundamentals and algorithms

Processes and threads

What's the difference between a process and a thread? What do threads share, and what does each one keep to itself?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

A process is a unit of execution with its own address space and resources; a thread is a flow of execution inside it that keeps only its own stack and shares the heap. Threads are expensive and more of them than cores is waste, so you hand work to the system pool.

Share a question