P switch T switch.
What this preview is
P switch T switch. is a cooked quant interview question on operating systems, asked at Quant.
- Difficulty
- Cooked
- Topic
- Operating Systems
- Discipline
- Quant development
- Language
- Agnostic
- Companies
- 1
Understanding the cost of process vs thread context switches
This is a medium-difficulty operating systems question that tests whether you grasp the architectural differences between processes and threads, and how those differences translate into real performance costs. It's the kind of conceptual question quant shops ask to verify that candidates understand system-level tradeoffs, not just language-level abstractions.
To answer well, you need to reason about what the CPU and kernel actually do during a context switch: which memory structures must be saved and restored, which caches are invalidated, and which isolation guarantees must be enforced. The key is understanding why processes and threads carry different overheads, and being able to articulate the scenario where each matters most.
- Virtual memory and address space management
- Translation lookaside buffer (TLB) invalidation
- Kernel state vs user state in process and thread descriptors
- Cache coherency and context pollution
Related learning resources
- Operating Systems: Three Easy Pieces
Related practice
Unlock full access to getcracked
Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.