How System Call Works

Jean-Paul Rustom :

I was studying system calls from my operating systems course until this image appeared and I couldn't exactly understand its content. Can anyone explain to me what is going on in user space and kernel space?

System Call

zig razor :

I try to Explain the mechanism of a system call to answer to your question:

  • When a System call is invoked a software interrupt is raised in user space ( or better in user mode ).

  • At this point, ever in user mode, the state of the user program is saved into memory.

  • After that there is the transaction in the kernel mode ( or kernel space ) to handle the interrupt, and return the value to the user space.
  • Then ,in user mode, the state of the running user program is restored from memory and the execution goes ahead.

I leave you a complete description of system call in this link : Kernel System Call

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=12125&siteId=1