Re: confusion in book explanation

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

 



On Wed, Nov 07, 2001 at 10:18:25AM +0800, wctan@netwxs.com.my wrote:
> I am Linux Internals by Moshe Bar.
> on page 83, I come across this:
> 
> "Unlike other UNIX implementations, however, please note that
> this process structure does not occupy space in real sense of
> world.  How is this possible?
> 
> Since the advent of Linux kernel 2.2.x, the task_struct is
> allocated at the bottom of the kernel stack.  It is therefore
> possible to overlap the task_struct on the kernel stack because
> the kernel_stack is a per-task structure exactly as the
> task_struct is...bla bla bla...
> 
> Basically, what the kernel does is decrease the size of the
> "usable" kernel stack to around 7,323 bytes, by allocating the
> task structure in the bottom of the stack"
> 
> What does all these means?
> What is kernel_struct cause I can't grep it anywhere?

There is no such thing as kernel_struct in linux-2.4.

> And precisely what is the kernel stack like?

A stack, just like any other stack.

> Also, isn't there multiple task_struct, how can the kernel just
> put in the bottom of stack, won't it overflow and overwrite the
> kernel data?

The kernel maintains a separate kernel stack for each task.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
--
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