previous | start | next

System Call Mechanism I

One way to guarantee cpu mode switches consistently with the kind of code being executed is to use a trap instruction.

The trap instruction saves the user code address and cpu user mode in the process table entry for the user.

The trap instruction then uses the integer argument to determine an entry in a kernel table containing both the kernel code address and cpu kernel mode which are loaded into the cpu's registers so that the system routine begins executing in kernel mode.



previous | start | next