RE: How Does a application switches from user mode to Ker nal mode

Then what in the case of a call to “ReadFile” in user mode application ??
This requires the switch from user mode to kernal mode…right?? how is this
done??

-----Original Message-----
From: Roddy, Mark [mailto:xxxxx@stratus.com]
Sent: Thursday, June 19, 2003 11:22 AM
To: NT Developers Interest List
Subject: [ntdev] RE: How Does a application switches from user mode to
Ker nal mode

The timer interrupt handler in the kernel starts the whole mess going.

-----Original Message-----
From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
Sent: Thursday, June 19, 2003 11:16 AM
To: NT Developers Interest List
Subject: [ntdev] How Does a application switches from user mode to Kernal
mode

hi all,
I read in Newcomer’s book that whenever a quantum of anythread
expires a DISPATCH_LEVEL software interrupt is generated (using x86’s int
instruction).

My Questions are:
1> Say if the thread is running in user mode and it’s quantum expires
1> will
it still call “int” from “user mode”.
2> Don’t we have to be in kernal mode to generate a software interrupt
2> ???
If we have to be in kenal to use software INT instrustion then how does this
switch takes place??

Anyother details are highly appriciated.
Thanks
ajitabh


You are currently subscribed to ntdev as: xxxxx@stratus.com To
unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@lsil.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The means of switching from code executing on one CPL to another are CPU
architecture dependant. On current kernel architecture , user to kernel
transitions
are done through an interrupt, or through fast system call mechanism
introduced in
PII CPU cores, on kernel builds > 2600.

For your specifc “ReadFile”, or for that matter, for any native call, the
transition interrupt used is 2E

----- Original Message -----
From: “Saxena, Ajitabh Prakash”
To: “NT Developers Interest List”
Sent: Thursday, June 19, 2003 6:29 PM
Subject: [ntdev] RE: How Does a application switches from user mode to Ker
nal mode

> Then what in the case of a call to “ReadFile” in user mode application ??
> This requires the switch from user mode to kernal mode…right?? how is
this
> done??
>
> -----Original Message-----
> From: Roddy, Mark [mailto:xxxxx@stratus.com]
> Sent: Thursday, June 19, 2003 11:22 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: How Does a application switches from user mode to
> Ker nal mode
>
>
> The timer interrupt handler in the kernel starts the whole mess going.
>
> -----Original Message-----
> From: Saxena, Ajitabh Prakash [mailto:xxxxx@lsil.com]
> Sent: Thursday, June 19, 2003 11:16 AM
> To: NT Developers Interest List
> Subject: [ntdev] How Does a application switches from user mode to Kernal
> mode
>
>
> hi all,
> I read in Newcomer’s book that whenever a quantum of anythread
> expires a DISPATCH_LEVEL software interrupt is generated (using x86’s int
> instruction).
>
> My Questions are:
> 1> Say if the thread is running in user mode and it’s quantum expires
> 1> will
> it still call “int” from “user mode”.
> 2> Don’t we have to be in kernal mode to generate a software interrupt
> 2> ???
> If we have to be in kenal to use software INT instrustion then how does
this
> switch takes place??
>
> Anyother details are highly appriciated.
> Thanks
> ajitabh
>
>
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@stratus.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@lsil.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>