I'm confused with system calls.
The question is: Is there a system call service routine, which is always called, in order to find a specific system call, like write, read, etc. ?
Are system calls also stored in a vector of function pointers ? Like shown on this picture ?
If so why there is a possibility to add your own system call and there is no possibility to add your own interrupt handler ? Why interrupt-vector is fixed-size and system call vector not ?
Quote from Silberschatz Operating Systems Concepts:
A system call usually takes the form of a trap to a specific location in the interrupt vector. This trap can be executed by a generic trap instruction, although some systems (such as MIPS) have a specific syscall instruction to invoke a system call.
When a system call is executed, it is typically treated by the hardware as a software interrupt. Control passes through the interrupt vector to a service routine in the operating system, and the mode bit is set to kernel mode. The system-call service routine is a part of the operating system. The kernel examines the interrupting instruction to determine what system call has occurred; a parameter indicates what type of service the user program is requesting. Additional information needed for the request may be passed in registers, on the stack, or in memory (with pointers to the memory locations passed in registers). The kernel verifies that the parameters are correct and legal, executes the request, and returns control to the instruction following the system call.