Re: Question about software task-switching

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

 



On Wed, Oct 31, 2001 at 05:13:23PM -0800, Donald A. Dade wrote:

> Hello,
> 
> I understand that Linux 2.4 has one TSS per CPU now, and that task
> switching is done in software. From looking at the relevant pieces of
> code, though, I cannot discern exactly where the state of all the
> registers is saved/loaded. I see a subset being being saved and loaded
> in switch_to(). What is it about x86 that allows this to work?

It switches stacks - It is called via an interrupt, so all of the registers will
have been saved on the stack, switch_to() just switches the stack (and saves
registers that havn't been pushed on interrupt handler entry)

The TSS is only used for the io protection bitmap now, I believe. This cannot be
done anywhere else

-- 

Mark Zealey (aka JALH on irc.openprojects.net: #zealos and many more)
mark@zealos.org
mark@itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a16! C++++>$ P++++>+++++$ L+++>+++++$
!E---? W+++>$ N- !o? !w--- O? !M? !V? !PS !PE--@ PGP+? r++ !t---?@ !X---?
!R- b+ !tv b+ DI+ D+? G+++ e>+++++ !h++* r!-- y--

(www.geekcode.com)
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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