Discussion:
Stack Question
(too old to reply)
Tom Brubaker
2005-02-17 03:36:51 UTC
Permalink
Initially, I thought the stack was a separate segment:


a.. CS - Code Segment
a.. SS - Stack Segment
a.. DS - (Default) Data Segment
a.. ES, FS, GS - Extra Data Segments


However, the LDT in User_Context only has enough room for 2 segments, and
the project 2 slides talk about adding in the size of the stack to the
allocated memory in Load_User_Program()


Finally, there's talk of a mysterious 'kernel stack.' It would seem
reasonable to me that perhaps the 'kernel stack' is the stack space added to
the code segment, while the user stack is the stack space added to the data
segment. Unfortunately, I can't find any evidence that this is really the
way things are, other than that the concept seems reasonable.

Thoughts?


-Tom-
Tom Brubaker
2005-02-17 06:21:31 UTC
Permalink
Ignore all this nonsensical hypothesizing.
There will only be two segments for each user program: code and data. The
data
segment, the stack segment, and the extra data segments will all be in a
single
segment that we will heretofore call the data segment.
Funny how all of the sentences in these things seem to be important, and not
just some of them..

Continue reading on narkive:
Loading...