1

I am wondering what will happen if there is a multiple core system say 8 core for ex. and each task running on core makes syscall() request to kernel at same time. My question is how kernel handles multiple parallel syscall() request, parallely or sequentially or any other wavy.

2

In the past, calls into the kernel were serialised, using the Big Kernel Lock. That was removed quite a long time ago though, and even before that quite a few kernel paths no longer used the BKL, so system calls in particular have run in parallel for a long time. With the introduction of pre-emption in the kernel itself, system calls can even interrupt each other (see What was the reason of the non-preemptivity of older Linux kernels? for details).

Thus the short answer to your question is that the kernel handles multiple parallel system calls in parallel.

There will be some cases where execution of the system calls involves acquiring locks, which will serialise conflicting system calls, but that’s getting rarer as time goes on and the existing locks are removed or replaced with finer-grained locks (when they cause performance problems).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.