RE: scheduler question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> The important thing happens during a process switch is the change of
> kernel mode stack of the process ( From previous process to the next
> process's stack ) and the rest of the thing follows. In simple terms, a
> IRET instruction will cause the execution of the instruction X+1 ( when
> that process was last interuppted ) because CPU is now working with the
> next process stack.

OK so its done through an IRET and thus operates like a function in user
space. Makes sense.

> Also, one important macro is "current" ( points to the tast_struct of
> the running process ) which is actually derived from the stack pointer
> of the processor.

Hrm I will look more into that exact portion of it- I knew what current
was, but never really thought about it- should prove interesting either
way. When I get some time I'll sift through the code some, thanks.

jnf

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux