System calls are usually invoked by using
View worked solution
Answer: A
A system call is a mechanism used by an application program to request a service from the operating system kernel.
To perform this safely, the system must transition from user mode (low privilege) to kernel mode (high privilege):
- Software Interrupt (or Trap): When an application needs a system service, it executes a specific instruction (such as
INTin x86 orsyscall) that triggers a software interrupt. This hardware-supported mechanism safely switches the CPU privilege level to kernel mode and transfers control to a predefined handler in the operating system. - Why other options are incorrect:
- Polling: This is a technique where the CPU repeatedly checks the status of a device, which is unrelated to invoking system calls.
- Indirect jump: A standard jump instruction cannot change the CPU's execution privilege level from user mode to kernel mode.
- Privileged instruction: User programs are not allowed to execute privileged instructions. Attempting to do so directly in user mode triggers a processor exception (protection fault).
Free practice · Your answers on this page are not saved.
