in Operating System retagged by
11,966 views
25 votes
25 votes

System calls are usually invoked by using

  1. a software interrupt
  2. polling
  3. an indirect jump
  4. a privileged instruction
in Operating System retagged by
12.0k views

1 comment

Ans A
6
6

2 Answers

52 votes
52 votes
Best answer
Software interrupt is the answer.

Privileged instruction cannot be the answer as system call is done from user mode and privileged instruction cannot be done from user mode.
selected by
by

4 Comments

Note: Implementing system calls requires a transfer of control from user space to kernel space, which involves some sort of architecture-specific feature. A typical way to implement this is to use a software interrupt or trap. Interrupts transfer control to the operating system kernel, so software simply needs to set up some register with the system call number needed, and execute the software interrupt.

https://en.wikipedia.org/wiki/System_call#Typical_implementations

8
8
But in the above answer it is mentioned that system call is implemented from user mode.what is correct??
0
0

 yes the system calls prolly sets the register with the system call number needed so it is executed in user mode but then the interrupt transfers the control to kernel mode. So answer and the above comment are not contradictory to each other.

0
0
15 votes
15 votes
Answer:

Related questions