1

I read the following:

"All processes begin execution in user mode, and they switch to kernel mode only when obtaining a service provided by the kernel."

When it says "obtaining a service provided by the kernel", does "service" refer to a system call like fork() or I/O operation like accessing information from a peripheral like a keyboard?

Does this mean that during these kind of operations like spawning a new subprocess or I/O operations puts the currently running process in kernel mode and gives it access to kernel low level functions?

Here's the source: https://stackoverflow.com/questions/16707098/node-js-kernel-mode-threading

1
  • 2
    You might want to cite the source where you read this!
    – slm
    Jan 5, 2014 at 22:30

1 Answer 1

4

1) I suspect that a "service" means syscall in this context.

2) I think that "they switch", "obtaining" and "puts" are wrong terms of what happens. It always depends of the point of view. So the kernel spawns new processes and schedules them as tasks. The user-space process calls a kernel service like a request. So the process will never gain any access to kernel's low level functions. Nevertheless some bad guys gain access through a vulnerability to it.

BTW: Who wrote that?

3
  • I found that on a voted answer on stackoverflow: stackoverflow.com/questions/16707098/… Jan 5, 2014 at 23:18
  • Do you happen to have a link of what "kernel service" are available? I just would like to learn more about kernel services. Jan 5, 2014 at 23:19
  • This is an interesting point of view: "I call fork(), so I request kernel mode". I never saw it this way. Perhaps if the point of view is the IP(Instruction Pointer). A list of syscalls are in /usr/include/syscall.h.
    – user55518
    Jan 5, 2014 at 23:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .