GATE CSE 2021 Set 1 Q24: C library functions that always make a system call
- Operating System
- 1 mark
- MSQ
- No negative marking
Question
Which of the following standard C library functions will always invoke a system call when executed from a single-threaded process in a UNIX/Linux operating system?
Try it: multiple select: one or more correct options
Show answer and explanation
Answer: A, C (official GATE 2021 final answer key)
Concept used: Only operations that need the kernel (terminating, blocking) must trap; malloc can often be served from heap memory already mapped.
First step: For each function ask: can it ever complete entirely in user space?
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key
More Operating System PYQs
- 2026 Session 1 · Q29False statements about deadlocks
- 2026 Session 1 · Q35Minimum resource instances for deadlock freedom (5 processes, max 2)
- 2026 Session 1 · Q59Disk transfer time for random sectors on tracks 5, 12, 7
- 2026 Session 1 · Q63Number of printf calls with fork, continue and break
- 2026 Session 1 · Q64Average FCFS waiting time for alternating A and C processes
- 2026 Session 2 · Q23CPU scheduling algorithm that cannot be preemptive