System call in progress

Assume that the process is running and is invoking a system call. Does this mean that the process will be blocked. Do all system calls block the process and change its state to run to block? Or does it depend on the script at the time?

+4
source share
2 answers

No, this does not mean that the process is blocked. Some system calls are blocked and some are not. However, note that during the time that the kernel processes the system call while the process continues to run, your own user code is not executed, but the kernel code is executed on behalf of the process.

+3
source

Some operating systems even have upsalls, where the user application registers some functions that will be called by the kernel (back in the user space) in some cases. Unix signaling equipment is a very simple example, but some operating systems have much more complex installations.

I think there are some OSs where syscall starts some kernel processing that can cause some upcall in user space.

I forgot the details

+1
source

Source: https://habr.com/ru/post/1391457/


All Articles