[lkml]   [2003]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectprocess switch and page directory on INTEL ????
(please CC me on answers, I haven't been admitted into this list

hi all:
thank you for reading this, this has puzzled me for quite a

I read "INTEL architecture developers' manual", and became
interested in how process / context switch ( called task switch
in INTEL doc ) is done in linux, to me , looks like these
1)an interupt gate ( for timer interupt ) directs flow
to kernel mode for old process

2) kernel changes EIP,ESP and other registers, load new cr3 for
new process

3) goes into USER mode for new process

my question is,
a) for (1) to catch the interrupt, it must know the interrupt
vector, so it must have an entry in its page directory and page
table for the IDT, ( and similarly, GDT, TSS .... ) , because
from intel doc, the IDTR ( and all other descriptor tables,
registers except cr3 ) use *linear* address instead of physical.
so , every process,and kernel thread must have a page
table/directory mapping for the IDT,and that mapping maps to the
same physical address ? same with GDT,TSS? if this is true, my
thought is, in linux, it may well be that light weight process
solves this----- sharing a page directory/table? but what with
other OS'es ? they must provide a mapping of IDT for each
process, because this is determined by hardware.

(b) from 1) to 2) , is the page table/directory changed at all?
( if changed, this might be called a "task gate" instead )
what paging system does the kernel use ?

thank you all

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.028 / U:3.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site