Re: Why two stacks per process?

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

 



On Fri, 25 Apr 2008, Peter Teoh wrote:

> In general, user cannot see kernel memory, but kernel can see user
> memory.  To enforce this, all memory are not to be shared.  And this
> is also enforce at the x86 hardware level - no OS feature is needed
> (ie, windows/linux all worked in the same way)....the keyword to
> search is called "stack switching".
>
> And kernel have two stack - one for interrupt processing, and another
> the normal non-interrupt processing.

i don't think that's entirely true.  on x86, anyway, there is a kernel
hacking feature for 4k stacks, which reduces the normal 8k stack size
to 4k, but compensates by creating another 4k stack just for
interrupts.  in the normal case, then, i'm assuming that interrupts
will simply "borrow" the kernel stack of the interrupted process, but
i'm willing to be corrected.

see the kernel hacking variable "CONFIG_4KSTACKS".

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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