Important Terms Related to Processes

Important terms related to processes are degree of multiprogramming, process hierarchy, turnaround time and dispatch latency. Degree of multiprogramming is the number of processes held in memory at once, process hierarchy is the parent-child tree of processes, turnaround time runs from arrival to completion, and dispatch latency is the time to stop one process and start the next.

4 min read

Several terms describing processes and their behavior come up repeatedly across process management and scheduling. Getting exact, precise definitions for them now pays off across every related topic.

Degree of multiprogramming

The degree of multiprogramming is simply the number of processes currently held in memory at once, ready to compete for the CPU. A higher degree generally means better CPU utilization (more candidates ready to run whenever one blocks on I/O), but it also means more memory pressure and more processes competing for the same limited CPU time, so real systems tune this number rather than just maximizing it blindly.

Process hierarchy

Processes form a tree-like hierarchy through creation: a parent process creates a child process (in Unix-like systems, via the fork system call), and that child can itself become a parent to further children. This hierarchy is exactly why the zombie/orphan concepts (covered in their own article) exist at all, they're specifically about what happens to that parent-child relationship when one side finishes or terminates unexpectedly.

Turnaround time

Turnaround time is the total time from when a process arrives (is submitted to the system) to when it finishes completely, including all the time it spent waiting in queues, not just the time it actually spent executing on the CPU. This is one of the standard metrics used to compare scheduling algorithms against each other (see the Process Scheduling articles for worked examples computing this).

Waiting time

Waiting time is turnaround time minus the process's actual burst (execution) time, in other words, exactly how much of a process's total time in the system was spent waiting rather than actually running. Minimizing average waiting time is the specific goal that algorithms like Shortest Job First are built around.

Dispatch latency

Dispatch latency is the time it takes the dispatcher (the part of the OS that actually hands the CPU over to a selected process) to stop one process and start running the next one, essentially the real-time cost of the context-switch mechanics themselves. Lower dispatch latency means the system can react faster when a scheduling decision needs to change, which matters a lot for real-time systems with strict deadlines.

A concrete example

Say a system has a degree of multiprogramming of 5 (five processes currently sit in memory), organized in a process hierarchy where one of them is a shell that spawned the other four as children. If one of those children arrives at time 0 and finishes at time 12 after actually running for 7 units of CPU time, its turnaround time is 12 and its waiting time is 12 minus 7, which is 5, meaning it spent 5 of its 12 total units in the system just waiting rather than executing.

Where this matters in real systems

Real schedulers are tuned and benchmarked using exactly these metrics: a scheduler change that improves average turnaround and waiting time across a realistic workload is a genuinely measurable improvement, not just a subjective one, and dispatch latency specifically is a metric real-time operating systems are held to strict, guaranteed bounds on, since a slow dispatcher could itself cause a deadline to be missed even if the scheduling decision itself was made correctly and on time.

What interviewers actually ask about these terms

  • "What is turnaround time, and how is it different from waiting time?" Turnaround time is total time from arrival to completion; waiting time is turnaround time minus the actual burst time, the portion of turnaround time spent waiting rather than executing.
  • "What is the degree of multiprogramming?" The number of processes currently held in memory, ready to compete for the CPU.
  • "What is dispatch latency, and why does it matter for real-time systems?" The time the dispatcher takes to switch the CPU from one process to another; real-time systems need this bounded and low, since a slow dispatch could itself cause a deadline to be missed.
  • "How does process hierarchy relate to zombie and orphan processes?" Both are specifically about what happens to the parent-child relationship formed by process hierarchy when one side finishes (zombie, waiting to be reaped) or terminates unexpectedly (orphan, needing a new parent).

Key takeaways

  • Degree of multiprogramming is how many processes sit in memory ready to compete for the CPU.
  • Process hierarchy is the parent-child tree formed as processes create other processes.
  • Turnaround time is total time from arrival to completion; waiting time is turnaround time minus actual execution time.
  • Dispatch latency is the real cost of the dispatcher switching the CPU between processes, a metric real-time systems are held to strict bounds on.
All 205 OS interview questions

Browse all Operating Systems topics

Log in to save which topics you've read across every subject.

Frequently asked questions

What is turnaround time, and how is it different from waiting time?

Turnaround time is total time from arrival to completion; waiting time is turnaround time minus the actual burst time, the portion of turnaround time spent waiting rather than executing.

What is the degree of multiprogramming?

The number of processes currently held in memory, ready to compete for the CPU.

What is dispatch latency, and why does it matter for real-time systems?

The time the dispatcher takes to switch the CPU from one process to another; real-time systems need this bounded and low, since a slow dispatch could itself cause a deadline to be missed.

How does process hierarchy relate to zombie and orphan processes?

Both are specifically about what happens to the parent-child relationship formed by process hierarchy when one side finishes (zombie, waiting to be reaped) or terminates unexpectedly (orphan, needing a new parent).