How is the system call in Linux implemented?

前端 未结 6 1153
清歌不尽
清歌不尽 2020-11-28 03:44

When I invoke a system call in user mode,how did the call get processed in OS?

Does it invoke some some executable binary or some standard library?

If yes,wh

6条回答
  •  长情又很酷
    2020-11-28 04:32

    Vastly simplified, but what happens is an interrupt occurs when you try to access a reserved memory address. The interrupt switches the context to kernel mode and executes the kernel code (actual system call) on the user's behalf. Once the call is completed, control is returned to the user code.

提交回复
热议问题