[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: task_struct allocation?
Great, since the task_struct is 960 (I don't remember exactly, I know this
is close), it fits at the bottom, and the actual kernel stack begins right
above that. I've been going through the alloc_task_struct function, and
it's relatives for the past day or so looking at that.
Thank you,
JEff
----- Original Message -----
From: "Sourav Sen" <sourav@csa.iisc.ernet.in>
To: "Jeff McNeil" <jeffmcneil@mindspring.com>
Cc: <kernelnewbies@nl.linux.org>
Sent: Thursday, March 01, 2001 2:39 AM
Subject: Re: task_struct allocation?
>
> Ya You are right. Actually kernel stack and task_struct for it share
> 2 contiguous pages of memory. In alloc_task_struct 2 pages of memory is
> allocated.
>
> Kernel stack is above and grows down, while the task_struct points bottom
> of the 2 pages. Visit this URL which explains it a bit clearly:
>
> http://mail.nl.linux.org/kernelnewbies/2001-01/msg00015.html
>
> Hope this helps
> sourav
> --------------------------------------------------------------------------
------
> SOURAV SEN MSc(Engg.) CSA IISc BANGALORE URL :
www2.csa.iisc.ernet.in/~sourav
> ROOM NO : N-78 TEL :(080)309-2454(HOSTEL) (080)309-2906
(COMP LAB)
> --------------------------------------------------------------------------
------
> "the fault, dear Brutas, lies not in our stars, but in our memory systems"
> -Shakespeare
>
> On Wed, 28 Feb 2001, Jeff McNeil wrote:
>
> > I've read in a few places that the task_struct list is allocated in a
very non-traditional way, but I haven't been able to find any pointers/links
on the topic. Does anyone have any information on this? I remember hearing
something about it being alloc
> ated on the bottom of the kernel stack or something... which sounds
strange to me.
> >
> > -Jeff
> >
> >
>
>
>
> -
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/
> IRC Channel: irc.openprojects.net / #kernelnewbies
> Web Page: http://www.surriel.com/kernelnewbies.shtml
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml