Which of the following is NOT a system call ?

2026

Which of the following is NOT a system call ?

Answer: D. printf()A system call is the interface through which a running program asks the operating-system kernel for a service that user-space code is not permitted to perform…

  1. A.

    fork()

  2. B.

    exit()

  3. C.

    read()

  4. D.

    printf()

Attempted by 363 students.

Show answer & explanation

Correct answer: D

A system call is the interface through which a running program asks the operating-system kernel for a service that user-space code is not permitted to perform on its own — creating or terminating a process, moving data to or from a file or device, or passing data between processes. Invoking one switches the processor from user mode into kernel mode and back. A library function, by contrast, is ordinary code that executes entirely in user space; it may request a kernel service internally, but the routine itself is not that kernel interface.

The classification used in standard operating-system courses, and in Silberschatz, Galvin & Gagne's table of process-control examples, turns on one question about a named routine: does the kernel itself provide a service of that name, or is the name purely a user-space convenience layered on top of some other kernel service?

Applying that test to each option:

  • fork() names a kernel process-control service: the kernel allocates a new process control block and duplicates the caller's address-space mapping, producing a child process that starts with a copy of the parent's memory image. No user-space routine can do this by itself.

  • exit() names the kernel's process-termination service (exit / exit_group on Linux), which releases the process's resources and leaves an exit status for the parent to collect. The C library entry of the same name first runs the program's registered termination handlers and flushes its stdio buffers, and reaches that kernel service through the low-level _exit call. Standard operating-system texts list exit() among the process-control system calls on the strength of the kernel service it denotes.

  • read() names a kernel file- and device-management service: the kernel transfers up to a requested number of bytes from an open file descriptor into a buffer the program supplies, since only the kernel may safely touch the underlying file system or device.

  • printf() names no kernel service at all: formatting its arguments against a format string happens entirely in user space inside the C standard I/O library, and the resulting characters reach the terminal or file only afterwards, through a separate write() system call.

Cross-check by exclusivity: fork(), exit() and read() each name a service the kernel itself provides — their user-space wrappers exist only to enter the kernel — whereas printf() has no kernel counterpart of that name and is a formatting convenience built on top of write().

A note on precision: read strictly as C-library entries, exit() is documented in manual section 3 alongside printf(), and the raw termination call is _exit(); under the standard operating-system classification this question uses, however, exit() denotes the kernel's termination service, and printf() is the only one of the four with no kernel service behind its name. Hence printf() is the answer — it is the one library routine among four names that otherwise denote kernel services.

Explore the full course: Niacl Ao It Specialist

Loading lesson…