Interview Q&A / Operating Systems

INTERVIEW Q&A · 42 QUESTIONS

Operating Systems interview questions

Processes, threads, scheduling, memory and deadlocks, in plain words.

  1. If a program calls fork() three times in a row, how many processes run in total?

    Each unconditional fork() doubles the number of processes, so n sequential calls give 2^n processes in total: 8 for three calls, meaning 7 new children plus the original.

    IntermediateQuick answer1 min read