Skip to content
GATEiit

GATE CSE 2021 Set 1 Q24: C library functions that always make a system call

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

Select one or more options
Select all correct options. No negative marking, no partial marks.
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

WhatsAppDownload image

Source: official GATE 2021 Set 1 CS question paper and final answer key, organised by IIT Bombay. Question paper · Answer key