Difficulty: Easy
Correct Answer: reentrant procedures
Explanation:
Introduction / Context:
In multitasking systems, several threads or processes may call the same routine at the same time. Some procedures are designed to be safely invoked concurrently without corrupting state. Knowing the correct term is fundamental for systems, embedded, and real-time programming.
Given Data / Assumptions:
Concept / Approach:
A reentrant procedure can be paused and safely re-entered by another thread/task because it uses no shared, modifiable global data without protection, does not rely on static non-const state, and keeps all temporary data on the stack or in caller-provided storage. Reentrancy is stricter than mere “thread-safety.”
Step-by-Step Solution:
Verification / Alternative check:
Classic OS texts define reentrancy for library routines used by interrupts or multiple tasks (e.g., ISR-safe functions must be reentrant).
Why Other Options Are Wrong:
Serially usable: implies one-at-a-time, not concurrent. Concurrent procedures: vague; does not guarantee safety. Topdown procedures: relates to design style, not concurrency. None: incorrect since “reentrant” is the established term.
Common Pitfalls:
Equating “thread-safe” with “reentrant” in all cases; relying on hidden globals (e.g., errno-like variables) without protection.
Final Answer:
reentrant procedures
Discussion & Comments