What is the primary purpose of a system call in an operating system ?

2024

What is the primary purpose of a system call in an operating system ?

  1. A.

    Run arbitrary user code with full system access

  2. B.

    Request access to system resources and services in a controlled manner

  3. C.

    Communicate directly with hardware devices without OS intervention

  4. D.

    Manage other processes and control system behavior

Attempted by 202 students.

Show answer & explanation

Correct answer: B

A system call serves as the fundamental interface between a user application and the operating system kernel. Its primary purpose is to allow programs to request access to protected system resources, such as files, memory, or network connections, in a controlled and secure manner. This mechanism ensures that user code cannot directly manipulate hardware or access critical data without permission, maintaining system stability and security. Option A is incorrect because user code runs in a restricted mode (user space) and cannot have full system access without transitioning to kernel mode via a system call. Option C is wrong because direct hardware communication bypasses the OS, which violates security and stability principles; the OS must mediate all hardware interactions. Option D describes process management functions, which are tasks performed by the OS itself rather than the specific purpose of a system call interface. Therefore, Option B accurately defines the core function of system calls as controlled resource requests.

Explore the full course: Niacl Ao It Specialist