Under what circumstances does control pass from userspace to the Linux kernel space? -


i'm trying understand events can cause transition userspace linux kernel. if it's relevant, scope of question can limited x86/x86_64 architecture.

here sources of transitions i'm aware of:

  • system calls (which includes accessing devices) causes context switch userspace kernel space.
  • interrupts cause context switch. far know, includes scheduler preemptions, since scheduler relies on timer interrupt work.
  • signals. seems @ least signals implemented using interrupts don't know if implemented differently i'm listing them separately.

i'm asking 2 things here:

  1. am missing userspace->kernel path?
  2. what various code paths involved in these context switches?

one missing: exceptions

(which can further broken down in faults, traps , aborts)

for example page fault, breakpoint, division 0 or floating-point exception. technically, 1 can view exceptions interrupts not way have defined interrupt in question.

you can find list of x86 exceptions @ this osdev webpage.

with regard second question:

what various code paths involved in these context switches?

that depends on architecture , os, need more specific. x86, when interrupt occurs go idt entry , sysenter to address specified in msr. happens after os.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -